Author: BINGOS
Date: Fri Jan 22 23:54:59 2010
New Revision: 13767

Modified:
   CPANPLUS-Dist-Build/trunk/Changes
   CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm
   CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm

Log:
Make the prereq resolving *actually* fallback to _build/ querying if the 
'prereq_data' action fails.

The edge-case of a distribution that is bundling an older version of 
Module::Build exposed this
flaw. Thanks to Johan Vromans for questioning the test report for EekBoek.

Modified: CPANPLUS-Dist-Build/trunk/Changes
==============================================================================
--- CPANPLUS-Dist-Build/trunk/Changes   (original)
+++ CPANPLUS-Dist-Build/trunk/Changes   Fri Jan 22 23:54:59 2010
@@ -1,5 +1,9 @@
 Revision history for Perl extension CPANPLUS::Dist::Build.
 
+0.46 Sat Jan 23 07:52:19 GMT 2010
+  - actually make the prereq resolving fallback to _build/ querying
+    if the 'prereq_data' action fails. *facepalm*
+
 0.44 Wed Nov 18 12:37:03 GMT 2009
   - Make the prereq resolving fallback to _build/ querying 
     if the 'prereq_data' action fails. Spotted by Johan Vromans.

Modified: CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm
==============================================================================
--- CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm        (original)
+++ CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build.pm        Fri Jan 22 
23:54:59 2010
@@ -30,7 +30,7 @@
 
 local $Params::Check::VERBOSE = 1;
 
-$VERSION = '0.44';
+$VERSION = '0.46';
 
 =pod
 
@@ -403,19 +403,19 @@
           }
 
         }
-        else {
-          my $file = File::Spec->catfile( $dir, '_build', 'prereqs' );
-          return unless -f $file;
 
-          my $fh = FileHandle->new();
+        my $file = File::Spec->catfile( $dir, '_build', 'prereqs' );
+        return unless -f $file;
 
-          unless( $fh->open( $file ) ) {
-            error( loc( "Cannot open '%1': %2", $file, $! ) );
-            return;
-          }
-        
-          $content = do { local $/; <$fh> };
+        my $fh = FileHandle->new();
+
+        unless( $fh->open( $file ) ) {
+          error( loc( "Cannot open '%1': %2", $file, $! ) );
+          return;
         }
+        
+        $content = do { local $/; <$fh> };
+
       }
 
       return unless $content;

Modified: CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm
==============================================================================
--- CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm      
(original)
+++ CPANPLUS-Dist-Build/trunk/lib/CPANPLUS/Dist/Build/Constants.pm      Fri Jan 
22 23:54:59 2010
@@ -9,7 +9,7 @@
     require Exporter;
     use vars    qw[$VERSION @ISA @EXPORT];
   
-    $VERSION    = '0.44';
+    $VERSION    = '0.46';
     @ISA        = qw[Exporter];
     @EXPORT     = qw[ BUILD_DIR BUILD ];
 }

Reply via email to