diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2012-08-16 00:31:32 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2012-08-16 00:31:32 +0100 |
commit | 7493073cc4692a1847372c3db8a96df7b33f9d1e (patch) | |
tree | 3e0b686082cd18d5457c0b9bf9760f0a05090ce6 | |
parent | 338a1057f3ecc833caa1897d40a280225ec1bf78 (diff) | |
download | perl-7493073cc4692a1847372c3db8a96df7b33f9d1e.tar.gz |
Upgrade Module-Pluggable to 4.3
There is also no need to list Build.PL as EXCLUDED since it is IGNORABLE
anyway.
-rwxr-xr-x | Porting/Maintainers.pl | 3 | ||||
-rw-r--r-- | cpan/Module-Pluggable/lib/Module/Pluggable.pm | 2 | ||||
-rw-r--r-- | cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm | 4 | ||||
-rw-r--r-- | cpan/Module-Pluggable/t/24local_inc_object.t | 6 | ||||
-rw-r--r-- | cpan/Module-Pluggable/t/lib/Text/Abbrev.pm | 2 | ||||
-rw-r--r-- | pod/perldelta.pod | 2 |
6 files changed, 11 insertions, 8 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 61815886cc..99b6601e17 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1303,9 +1303,8 @@ use File::Glob qw(:case); 'Module::Pluggable' => { 'MAINTAINER' => 'simonw', - 'DISTRIBUTION' => 'SIMONW/Module-Pluggable-4.2.tar.gz', + 'DISTRIBUTION' => 'SIMONW/Module-Pluggable-4.3.tar.gz', 'FILES' => q[cpan/Module-Pluggable], - 'EXCLUDED' => ['Build.PL'], 'UPSTREAM' => 'cpan', 'CUSTOMIZED' => ['Makefile.PL'], }, diff --git a/cpan/Module-Pluggable/lib/Module/Pluggable.pm b/cpan/Module-Pluggable/lib/Module/Pluggable.pm index d11156d022..5ce4ca993f 100644 --- a/cpan/Module-Pluggable/lib/Module/Pluggable.pm +++ b/cpan/Module-Pluggable/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 = '4.2'; +$VERSION = '4.3'; $FORCE_SEARCH_ALL_PATHS = 0; sub import { diff --git a/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm b/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm index 3077b166fd..d5ab8a8e36 100644 --- a/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm +++ b/cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm @@ -8,7 +8,7 @@ use Carp qw(croak carp confess); use Devel::InnerPackage; use vars qw($VERSION); -$VERSION = '4.2'; +$VERSION = '4.3'; sub new { @@ -83,7 +83,7 @@ sub plugins { my @objs = (); foreach my $package (keys %plugins) { next unless $package->can($method); - my $obj = eval { $package->new(@_) }; + my $obj = eval { $package->$method(@_) }; $self->{'on_instantiate_error'}->($package, $@) if $@; push @objs, $obj if $obj; } diff --git a/cpan/Module-Pluggable/t/24local_inc_object.t b/cpan/Module-Pluggable/t/24local_inc_object.t index bedacbdac9..c8e00facfc 100644 --- a/cpan/Module-Pluggable/t/24local_inc_object.t +++ b/cpan/Module-Pluggable/t/24local_inc_object.t @@ -10,7 +10,11 @@ ok($ta); is($ta->MPCHECK, "HELLO"); package IncTest; -use Module::Pluggable search_path => "Text", search_dirs => "t/lib", instantiate => 'new', on_instantiate_error => sub {}; +use Module::Pluggable search_path => "Text", + search_dirs => "t/lib", + instantiate => 'module_pluggable', + on_require_error => sub { }, + on_instantiate_error => sub { }; sub new { my $class = shift; diff --git a/cpan/Module-Pluggable/t/lib/Text/Abbrev.pm b/cpan/Module-Pluggable/t/lib/Text/Abbrev.pm index fb176ba0ef..8417072f3e 100644 --- a/cpan/Module-Pluggable/t/lib/Text/Abbrev.pm +++ b/cpan/Module-Pluggable/t/lib/Text/Abbrev.pm @@ -1,7 +1,7 @@ package Text::Abbrev; use strict; -sub new { +sub module_pluggable { return bless {}, shift; } diff --git a/pod/perldelta.pod b/pod/perldelta.pod index b5ef8d73e2..1628a40dba 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -194,7 +194,7 @@ up by about 40%. =item * -L<Module::Pluggable> has been upgraded from version 4.0 to 4.2. Amongst other +L<Module::Pluggable> has been upgraded from version 4.0 to 4.3. Amongst other changes, triggers are now allowed on events, which gives a powerful way to modify behaviour. |