Author: BINGOS
Date: Thu Oct 27 13:16:38 2011
New Revision: 14965

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

Log:
Replace 'perlwrapper' use with an equivalent one-liner

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        Thu Oct 27 
13:16:38 2011
@@ -310,8 +310,8 @@
 
         my $env = ENV_CPANPLUS_IS_EXECUTING;
         local $ENV{$env} = BUILD_PL->( $dir );
-        my $run_perl    = $conf->get_program('perlwrapper');
-        my $cmd = [$perl, $run_perl, BUILD_PL->($dir), @buildflags];
+        my @run_perl    = ( '-e', CPDB_PERL_WRAPPER );
+        my $cmd = [$perl, @run_perl, BUILD_PL->($dir), @buildflags];
 
         unless ( scalar run(    command => $cmd,
                                 buffer  => \$prep_output,
@@ -389,9 +389,9 @@
           my @buildflags = $dist->_buildflags_as_list( $buildflags );
 
           # Use the new Build action 'prereq_data'
-          my $run_perl    = $conf->get_program('perlwrapper');
+          my @run_perl    = ( '-e', CPDB_PERL_WRAPPER );
 
-          unless ( scalar run(    command => [$perl, $run_perl, BUILD->($dir), 
'prereq_data', @buildflags],
+          unless ( scalar run(    command => [$perl, @run_perl, BUILD->($dir), 
'prereq_data', @buildflags],
                                 buffer  => \$content,
                                 verbose => 0 )
           ) {
@@ -569,7 +569,7 @@
     my $fail; my $prereq_fail; my $test_fail;
     RUN: {
 
-        my $run_perl    = $conf->get_program('perlwrapper');
+        my @run_perl    = ( '-e', CPDB_PERL_WRAPPER );
 
         ### this will set the directory back to the start
         ### dir, so we must chdir /again/
@@ -601,7 +601,7 @@
             $cmd = [$perl, BUILD->($dir), @buildflags];
         }
         else {
-            $cmd = [$perl, $run_perl, BUILD->($dir), @buildflags];
+            $cmd = [$perl, @run_perl, BUILD->($dir), @buildflags];
         }
 
         unless ( scalar run(    command => $cmd,
@@ -629,7 +629,7 @@
                 $cmd     = [$perl, BUILD->($dir), "test", @buildflags];
             }
             else {
-                $cmd     = [$perl, $run_perl, BUILD->($dir), "test", 
@buildflags];
+                $cmd     = [$perl, @run_perl, BUILD->($dir), "test", 
@buildflags];
             }
             unless ( scalar run(    command => $cmd,
                                     buffer  => \$test_output,
@@ -742,7 +742,7 @@
 
     my $fail;
     my @buildflags = $dist->_buildflags_as_list( $buildflags );
-    my $run_perl    = $conf->get_program('perlwrapper');
+    my @run_perl    = ( '-e', CPDB_PERL_WRAPPER );
 
     ### hmm, how is this going to deal with sudo?
     ### for now, check effective uid, if it's not root,
@@ -757,7 +757,7 @@
             $cmd     = [$perl, BUILD->($dir), "install", @buildflags];
         }
         else {
-            $cmd     = [$perl, $run_perl, BUILD->($dir), "install", 
@buildflags];
+            $cmd     = [$perl, @run_perl, BUILD->($dir), "install", 
@buildflags];
         }
 
         ### Detect local::lib type behaviour. Do not use 'sudo' in these cases
@@ -785,7 +785,7 @@
             $cmd     = [$perl, BUILD->($dir), "install", @buildflags];
         }
         else {
-            $cmd     = [$perl, $run_perl, BUILD->($dir), "install", 
@buildflags];
+            $cmd     = [$perl, @run_perl, BUILD->($dir), "install", 
@buildflags];
         }
         unless( scalar run( command => $cmd,
                             buffer  => \$install_output,

Reply via email to