Update CPANPLUS-Dist-Build to CPAN version 0.60
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 27 Oct 2011 21:49:07 +0000 (22:49 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Thu, 27 Oct 2011 22:38:17 +0000 (23:38 +0100)
  [DELTA]

  0.60 Thu Oct 27 20:54:22 BST 2011
    - Eliminate the need to use 'perlwrapper' at all by using
      an equivalent one-liner.

Porting/Maintainers.pl
cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build.pm
cpan/CPANPLUS-Dist-Build/lib/CPANPLUS/Dist/Build/Constants.pm
pod/perldelta.pod

index bd95837..4735921 100755 (executable)
@@ -483,7 +483,7 @@ use File::Glob qw(:case);
     'CPANPLUS::Dist::Build' =>
        {
        'MAINTAINER'    => 'bingos',
-       'DISTRIBUTION'  => 'BINGOS/CPANPLUS-Dist-Build-0.58.tar.gz',
+       'DISTRIBUTION'  => 'BINGOS/CPANPLUS-Dist-Build-0.60.tar.gz',
        'FILES'         => q[cpan/CPANPLUS-Dist-Build],
        'EXCLUDED'      => [ qr{^inc/},
                             qw{ t/99_pod.t
index 7c394d6..e3dcee5 100644 (file)
@@ -30,7 +30,7 @@ use Locale::Maketext::Simple    Class => 'CPANPLUS', Style => 'gettext';
 
 local $Params::Check::VERBOSE = 1;
 
-$VERSION = '0.58';
+$VERSION = '0.60';
 
 =pod
 
@@ -310,8 +310,8 @@ sub prepare {
 
         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 @@ sub _find_prereqs {
           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 @@ sub create {
     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 @@ sub create {
             $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 @@ sub create {
                 $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 @@ sub install {
 
     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 @@ sub install {
             $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 @@ sub install {
             $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,
index 381fa25..0ca9c90 100644 (file)
@@ -9,9 +9,9 @@ BEGIN {
     require Exporter;
     use vars    qw[$VERSION @ISA @EXPORT];
 
-    $VERSION    = '0.58';
+    $VERSION    = '0.60';
     @ISA        = qw[Exporter];
-    @EXPORT     = qw[ BUILD_DIR BUILD ];
+    @EXPORT     = qw[ BUILD_DIR BUILD CPDB_PERL_WRAPPER];
 }
 
 
@@ -30,6 +30,9 @@ use constant BUILD          => sub { my $file = @_
                                      return $file;
                             };
 
+
+use constant CPDB_PERL_WRAPPER   => 'use strict; BEGIN { my $old = select STDERR; $|++; select $old; $|++; $0 = shift(@ARGV); my $rv = do($0); die $@ if $@; }';
+
 1;
 
 =head1 NAME
index d59b546..a20d73f 100644 (file)
@@ -100,6 +100,10 @@ L<Archive::Extract> has been upgraded from version 0.56 to version 0.58.
 
 =item *
 
+L<CPANPLUS::Dist::Build> has been upgraded from version 0.58 to version 0.60.
+
+=item *
+
 L<ExtUtils::MakeMaker> has been upgraded from version 6.61_01 to version 6.63_01.
 
 =item *