summaryrefslogtreecommitdiff
path: root/cpan/Module-Load-Conditional
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-02-09 21:20:53 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-02-09 21:21:53 +0000
commita4031803f83357f115182172bce9a625f97a5d70 (patch)
treedd498f27f382e4aa6a92e305ac15736c12809983 /cpan/Module-Load-Conditional
parentf31eab29fb562e59e570c45f857e4df78d08b77f (diff)
downloadperl-a4031803f83357f115182172bce9a625f97a5d70.tar.gz
Update Module-Load-Conditional to CPAN version 0.42
[DELTA] Changes for 0.42 Wed Feb 9 15:27:14 GMT 2011 ================================================= * Apply patch from Phillip Moore RT #60916, which fixes an edge-case with obj/ref @INC entries.
Diffstat (limited to 'cpan/Module-Load-Conditional')
-rw-r--r--cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm
index cff442dcb8..f110e53626 100644
--- a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm
+++ b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm
@@ -18,7 +18,7 @@ BEGIN {
$FIND_VERSION $ERROR $CHECK_INC_HASH];
use Exporter;
@ISA = qw[Exporter];
- $VERSION = '0.40';
+ $VERSION = '0.42';
$VERBOSE = 0;
$DEPRECATED = 0;
$FIND_VERSION = 1;
@@ -204,6 +204,8 @@ sub check_install {
if ( ref $dir ) {
### @INC hook -- we invoke it and get the filehandle back
### this is actually documented behaviour as of 5.8 ;)
+
+ my $existed_in_inc = $INC{$file_inc};
if (UNIVERSAL::isa($dir, 'CODE')) {
($fh) = $dir->($dir, $file);
@@ -222,6 +224,8 @@ sub check_install {
}
$filename = $INC{$file_inc} || $file;
+
+ delete $INC{$file_inc} if not $existed_in_inc;
} else {
$filename = File::Spec->catfile($dir, $file);