summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-24 18:40:25 -0400
committerJesse Luehrs <doy@tozt.net>2013-06-24 18:40:25 -0400
commit89ea7481ec7c86eb4205201c1b81bd88a82e015c (patch)
treea190613ea33ba963e8d9703e256311503ab09160
parent54f6e5fdb9a8089ebafe530c373458640a04c152 (diff)
downloadreply-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
-rw-r--r--lib/Reply.pm4
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);