From a4031803f83357f115182172bce9a625f97a5d70 Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Wed, 9 Feb 2011 21:20:53 +0000 Subject: 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. --- cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cpan') 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); -- cgit v1.2.1