From: Chris Williams Date: Mon, 1 Jun 2009 22:28:45 +0000 (+0100) Subject: Update CPANPLUS::Dist::Build to CPAN version 0.32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e42df61ffa4b532a113a57b2965d347ce4da44b3;p=p5sagit%2Fp5-mst-13.2.git Update CPANPLUS::Dist::Build to CPAN version 0.32 --- diff --git a/lib/CPANPLUS/Dist/Build.pm b/lib/CPANPLUS/Dist/Build.pm index 36d8712..5a834f0 100644 --- a/lib/CPANPLUS/Dist/Build.pm +++ b/lib/CPANPLUS/Dist/Build.pm @@ -30,7 +30,7 @@ use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; local $Params::Check::VERBOSE = 1; -$VERSION = '0.30'; +$VERSION = '0.32'; =pod @@ -308,10 +308,11 @@ sub prepare { # done at a much higher level). my $prep_output; - my $env = 'ENV_CPANPLUS_IS_EXECUTING'; + my $env = ENV_CPANPLUS_IS_EXECUTING; local $ENV{$env} = BUILD_PL->( $dir ); + my $run_perl = $conf->get_program('perlwrapper'); - unless ( scalar run( command => [$perl, BUILD_PL->($dir), @buildflags], + unless ( scalar run( command => [$perl, $run_perl, BUILD_PL->($dir), @buildflags], buffer => \$prep_output, verbose => $verbose ) ) { @@ -381,8 +382,9 @@ sub _find_prereqs { my @buildflags = $dist->_buildflags_as_list( $buildflags ); # Use the new Build action 'prereq_data' - - unless ( scalar run( command => [$perl, BUILD->($dir), 'prereq_data', @buildflags], + my $run_perl = $conf->get_program('perlwrapper'); + + unless ( scalar run( command => [$perl, $run_perl, BUILD->($dir), 'prereq_data', @buildflags], buffer => \$content, verbose => 0 ) ) { @@ -552,6 +554,8 @@ sub create { my $fail; my $prereq_fail; my $test_fail; RUN: { + my $run_perl = $conf->get_program('perlwrapper'); + ### this will set the directory back to the start ### dir, so we must chdir /again/ my $ok = $dist->_resolve_prereqs( @@ -579,7 +583,7 @@ sub create { my $captured; - unless ( scalar run( command => [$perl, BUILD->($dir), @buildflags], + unless ( scalar run( command => [$perl, $run_perl, BUILD->($dir), @buildflags], buffer => \$captured, verbose => $verbose ) ) { @@ -601,7 +605,7 @@ sub create { unless( $skiptest ) { my $test_output; my $flag = ON_VMS ? '"test"' : 'test'; - my $cmd = [$perl, BUILD->($dir), $flag, @buildflags]; + my $cmd = [$perl, $run_perl, BUILD->($dir), $flag, @buildflags]; unless ( scalar run( command => $cmd, buffer => \$test_output, verbose => $verbose ) @@ -711,6 +715,7 @@ sub install { my $fail; my @buildflags = $dist->_buildflags_as_list( $dist->status->_buildflags ); + my $run_perl = $conf->get_program('perlwrapper'); ### hmm, how is this going to deal with sudo? ### for now, check effective uid, if it's not root, @@ -722,7 +727,7 @@ sub install { ### M::B at the top of the build.pl ### On VMS, flags need to be quoted my $flag = ON_VMS ? '"install"' : 'install'; - my $cmd = [$perl, BUILD->($dir), $flag, @buildflags]; + my $cmd = [$perl, $run_perl, BUILD->($dir), $flag, @buildflags]; my $sudo = $conf->get_program('sudo'); unshift @$cmd, $sudo if $sudo; @@ -738,7 +743,7 @@ sub install { } else { my $install_output; my $flag = ON_VMS ? '"install"' : 'install'; - my $cmd = [$perl, BUILD->($dir), $flag, @buildflags]; + my $cmd = [$perl, $run_perl, BUILD->($dir), $flag, @buildflags]; unless( scalar run( command => $cmd, buffer => \$install_output, verbose => $verbose ) diff --git a/lib/CPANPLUS/Dist/Build/Constants.pm b/lib/CPANPLUS/Dist/Build/Constants.pm index 2595f1a..9ed2b07 100644 --- a/lib/CPANPLUS/Dist/Build/Constants.pm +++ b/lib/CPANPLUS/Dist/Build/Constants.pm @@ -9,7 +9,7 @@ BEGIN { require Exporter; use vars qw[$VERSION @ISA @EXPORT]; - $VERSION = '0.30'; + $VERSION = '0.32'; @ISA = qw[Exporter]; @EXPORT = qw[ BUILD_DIR BUILD ]; } diff --git a/lib/CPANPLUS/Dist/Build/t/02_CPANPLUS-Dist-Build.t b/lib/CPANPLUS/Dist/Build/t/02_CPANPLUS-Dist-Build.t index 10a20cc..b7686ef 100644 --- a/lib/CPANPLUS/Dist/Build/t/02_CPANPLUS-Dist-Build.t +++ b/lib/CPANPLUS/Dist/Build/t/02_CPANPLUS-Dist-Build.t @@ -198,7 +198,7 @@ while( my($path,$need_cc) = each %Map ) { ### test ENV setting while running Build.PL code SKIP: { ### use print() not die() -- we're redirecting STDERR in tests! skip("Known issues due to capturing with this test and MSWin32") if ON_WIN32; - my $env = 'ENV_CPANPLUS_IS_EXECUTING'; + my $env = ENV_CPANPLUS_IS_EXECUTING; my $clone = $Mod->clone; ok( $clone, 'Testing ENV settings $dist->prepare' );