From 89ea7481ec7c86eb4205201c1b81bd88a82e015c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 24 Jun 2013 18:40:25 -0400 Subject: 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 --- lib/Reply.pm | 4 ++-- 1 file 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); -- cgit v1.2.3-54-g00ecf