Subject: | Tries to require Some/Plugin//ISA/CACHE.pm |
Under perl 5.8.7 (and possibly earlier, I don't know) Module::Pluggable tries to include the ::::ISA::CACHE namespace that perl creates under the module. This makes it look for Some/Module//ISA/CACHE.pm, which it fails to find, and thus dies a glorious death. The attached patch skips ::::ISA::CACHE when padwalking.
There was obviously a fix already in palce to try to do such a thing, but it didn't actually affect which files Module::Pluggable tried to require, only which files it returned at the end.
- Alex
diff -ru Module-Pluggable-2.9/lib/Module/Pluggable.pm Module-Pluggable-new/lib/Module/Pluggable.pm
--- Module-Pluggable-2.9/lib/Module/Pluggable.pm 2005-07-09 08:20:37.000000000 -0400
+++ Module-Pluggable-new/lib/Module/Pluggable.pm 2005-07-12 17:22:14.000000000 -0400
@@ -386,7 +386,6 @@
# probably not necessary but hey ho
my %plugins;
for(@plugins) {
- next if ($_ =~ /::::ISA::CACHE$/);
next if (keys %only && !$only{$_} );
next unless (!defined $only || m!$only! );
@@ -437,7 +436,7 @@
push @packs, "$pack$_" unless @children or /^::/;
push @packs, @children;
}
- return @packs;
+ return grep {$_ !~ /::::ISA::CACHE/} @packs;
}