diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-06-24 18:40:25 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-06-24 18:40:25 -0400 |
commit | 89ea7481ec7c86eb4205201c1b81bd88a82e015c (patch) | |
tree | a190613ea33ba963e8d9703e256311503ab09160 /lib/Reply.pm | |
parent | 54f6e5fdb9a8089ebafe530c373458640a04c152 (diff) | |
download | reply-89ea7481ec7c86eb4205201c1b81bd88a82e015c.tar.gz reply-89ea7481ec7c86eb4205201c1b81bd88a82e015c.zip |
use require_module instead of use_package_optimistically
use_package_optimistically has a bug
(https://rt.cpan.org/Ticket/Display.html?id=86394)
and the chances of someone trying to load a plugin that doesn't have its
own file seem pretty low i think
Diffstat (limited to 'lib/Reply.pm')
-rw-r--r-- | lib/Reply.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Reply.pm b/lib/Reply.pm index 18f0440..e84e56e 100644 --- a/lib/Reply.pm +++ b/lib/Reply.pm @@ -3,7 +3,7 @@ use strict; use warnings; # ABSTRACT: read, eval, print, loop, yay! -use Module::Runtime qw(compose_module_name use_package_optimistically); +use Module::Runtime qw(compose_module_name require_module); use Scalar::Util qw(blessed); use Try::Tiny; @@ -182,7 +182,7 @@ sub _load_plugin { if (!blessed($plugin)) { $plugin = compose_module_name("Reply::Plugin", $plugin); - use_package_optimistically($plugin); + require_module($plugin); die "$plugin is not a valid plugin" unless $plugin->isa("Reply::Plugin"); $plugin = $plugin->new(%$opts); |