[Bps-public-commit] r19276 - Shipwright/trunk/lib/Shipwright/Source

sunnavy at bestpractical.com sunnavy at bestpractical.com
Sat Apr 18 03:24:55 EDT 2009


Author: sunnavy
Date: Sat Apr 18 03:24:53 2009
New Revision: 19276

Modified:
   Shipwright/trunk/lib/Shipwright/Source/Base.pm

Log:
tweak the source part: test the cmd in CleanINC mode more strictly, some Makefile.PL do *not* die even some errors happen

Modified: Shipwright/trunk/lib/Shipwright/Source/Base.pm
==============================================================================
--- Shipwright/trunk/lib/Shipwright/Source/Base.pm	(original)
+++ Shipwright/trunk/lib/Shipwright/Source/Base.pm	Sat Apr 18 03:24:53 2009
@@ -152,7 +152,7 @@
                 ],
                 1, # don't die if this fails
             );
-            Shipwright::Util->run( [ $^X, 'Build.PL' ] );
+            Shipwright::Util->run( [ $^X, 'Build.PL' ] ) if $? || !-e 'Build';
             my $source = read_file( catfile( '_build', 'prereqs' ) )
               or confess "can't read _build/prereqs: $!";
             my $eval = '$require = ' . $source;
@@ -302,7 +302,7 @@
                     1, # don't die if this fails
                 );
                 Shipwright::Util->run( [ $^X, 'shipwright_makefile.pl' ] )
-                  if $?;
+                  if $? || !-e 'Makefile';
                 my $prereqs = read_file( catfile('shipwright_prereqs') )
                   or confess "can't read prereqs: $!";
                 eval $prereqs or confess "eval error: $@";    ## no critic
@@ -321,12 +321,8 @@
                     ],
                     1, # don't die if this fails
                 );
-                Shipwright::Util->run(
-                    [
-                        $^X,
-                        'Makefile.PL'
-                    ]
-                ) if $?;
+                Shipwright::Util->run( [ $^X, 'Makefile.PL' ] )
+                  if $? || !-e 'Makefile';
 
                 my ($source) = grep { /PREREQ_PM/ } read_file('Makefile');
                 if ( $source && $source =~ /({.*})/ ) {



More information about the Bps-public-commit mailing list