Skip Menu |

This queue is for tickets about the Module-Pluggable CPAN distribution.

Report information
The Basics
Id: 13664
Status: resolved
Priority: 0/
Queue: Module-Pluggable

People
Owner: simonw [...] cpan.org
Requestors: alexmv [...] bestpractical.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.9
Fixed in: (no value)



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; }
[guest - Tue Jul 12 17:23:15 2005]: Show quoted text
> 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.
Whoops, good catch. I'v egot another fix I want to roll in as well so I'll try and get this fix out this week. Cheers, Simon
Fixed in 2.95