Preserved old makefile as some of its logic is in Build.PL now which we dont use.
# Peter Gibbons: I wouldn't say I've been missing it, Bob!
-$VERSION = '4.6'; # core release only!
+$VERSION = '4.7';
$FORCE_SEARCH_ALL_PATHS = 0;
sub import {
if (defined $self->{'instantiate'}) {
my $method = $self->{'instantiate'};
my @objs = ();
- foreach my $package (keys %plugins) {
- next unless $package->can($method);
+ foreach my $package (sort keys %plugins) {
+ next unless $package->can($method);
my $obj = eval { $package->$method(@_) };
- $self->{'on_instantiate_error'}->($package, $@) if $@;
+ $self->{'on_instantiate_error'}->($package, $@) if $@;
push @objs, $obj if $obj;
}
return @objs;
} else {
# no? just return the names
- return keys %plugins;
+ my @objs= sort keys %plugins;
+ return @objs;
}
}
#use_ok( 'MyTest' );
#diag "Module::Pluggable::VERSION $Module::Pluggable::VERSION";
-my @plugins = MyTest->plugins;
+my @plugins = sort MyTest->plugins;
my @plugins_after;
use_ok( 'MyTest::Plugin::Foo' );
\@plugins_after,
\@plugins,
"plugins haven't been clobbered",
-);
+) or diag Dumper(\@plugins_after,\@plugins);
can_ok ($foo, 'frobnitz');
-@plugins_after = MyTest->plugins;
+@plugins_after = sort MyTest->plugins;
is_deeply(
\@plugins_after,
\@plugins,
"plugins haven't been clobbered",
-) or diag Dumper ;
+) or diag Dumper(\@plugins_after,\@plugins);
+++ /dev/null
-/-Dodgy.pm