From: Steve Peters Date: Tue, 6 Feb 2007 16:42:50 +0000 (+0000) Subject: Upgrade to Module-Pluggable-3.5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2de60a54cd852c1f9739646cb232342703c02435;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Module-Pluggable-3.5 p4raw-id: //depot/perl@30143 --- diff --git a/lib/Module/Pluggable.pm b/lib/Module/Pluggable.pm index b24a119..e1c4582 100644 --- a/lib/Module/Pluggable.pm +++ b/lib/Module/Pluggable.pm @@ -9,7 +9,7 @@ use Module::Pluggable::Object; # Peter Gibbons: I wouldn't say I've been missing it, Bob! -$VERSION = '3.4'; +$VERSION = '3.5'; sub import { my $class = shift; diff --git a/lib/Module/Pluggable/Object.pm b/lib/Module/Pluggable/Object.pm index 564ef34..6de9ca5 100644 --- a/lib/Module/Pluggable/Object.pm +++ b/lib/Module/Pluggable/Object.pm @@ -159,7 +159,7 @@ sub search_paths { next unless $plugin =~ m!(?:[a-z\d]+)[a-z\d]!i; - my $err = eval { $self->handle_finding_plugin($plugin) }; + my $err = $self->handle_finding_plugin($plugin); carp "Couldn't require $plugin : $err" if $err; push @plugins, $plugin; @@ -215,7 +215,7 @@ sub handle_innerpackages { foreach my $plugin (Devel::InnerPackage::list_packages($path)) { - my $err = eval { $self->handle_finding_plugin($plugin) }; + my $err = $self->handle_finding_plugin($plugin); #next if $err; #next unless $INC{$plugin}; push @plugins, $plugin; @@ -228,6 +228,7 @@ sub handle_innerpackages { sub _require { my $self = shift; my $pack = shift; + local $@; eval "CORE::require $pack"; return $@; }