This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module-Load-Conditional to CPAN version 0.42
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Wed, 9 Feb 2011 21:20:53 +0000 (21:20 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Wed, 9 Feb 2011 21:21:53 +0000 (21:21 +0000)
  [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
cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm
pod/perldelta.pod

index a3c980b..8718a2a 100755 (executable)
@@ -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',
        },
index cff442d..f110e53 100644 (file)
@@ -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);
index 5d6918f..a326ead 100644 (file)
@@ -148,6 +148,10 @@ Module::Build::YAML has been deprecated in favor of L<CPAN::Meta::YAML>.
 
 =item *
 
+C<Module::Load::Conditional> has been upgraded from version 0.40 to 0.42
+
+=item *
+
 C<Module::Metadata> has been upgraded from version 1.000003 to 1.000004.
 
 =item *