From a4031803f83357f115182172bce9a625f97a5d70 Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Wed, 9 Feb 2011 21:20:53 +0000 Subject: [PATCH] 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. --- Porting/Maintainers.pl | 2 +- cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm | 6 +++++- pod/perldelta.pod | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index a3c980b..8718a2a 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1046,7 +1046,7 @@ use File::Glob qw(:case); 'Module::Load::Conditional' => { 'MAINTAINER' => 'kane', - 'DISTRIBUTION' => 'BINGOS/Module-Load-Conditional-0.40.tar.gz', + 'DISTRIBUTION' => 'BINGOS/Module-Load-Conditional-0.42.tar.gz', 'FILES' => q[cpan/Module-Load-Conditional], 'UPSTREAM' => 'cpan', }, diff --git a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm index cff442d..f110e53 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); diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 5d6918f..a326ead 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -148,6 +148,10 @@ Module::Build::YAML has been deprecated in favor of L. =item * +C has been upgraded from version 0.40 to 0.42 + +=item * + C has been upgraded from version 1.000003 to 1.000004. =item * -- 2.7.4