summaryrefslogtreecommitdiff
path: root/cpan
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2012-08-16 00:31:32 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2012-08-16 00:31:32 +0100
commit7493073cc4692a1847372c3db8a96df7b33f9d1e (patch)
tree3e0b686082cd18d5457c0b9bf9760f0a05090ce6 /cpan
parent338a1057f3ecc833caa1897d40a280225ec1bf78 (diff)
downloadperl-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.
Diffstat (limited to 'cpan')
-rw-r--r--cpan/Module-Pluggable/lib/Module/Pluggable.pm2
-rw-r--r--cpan/Module-Pluggable/lib/Module/Pluggable/Object.pm4
-rw-r--r--cpan/Module-Pluggable/t/24local_inc_object.t6
-rw-r--r--cpan/Module-Pluggable/t/lib/Text/Abbrev.pm2
4 files changed, 9 insertions, 5 deletions
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;
}