From: Chris Williams Date: Wed, 14 Apr 2010 10:44:41 +0000 (+0100) Subject: Changes to CPANPLUS and CPANPLUS::Dist::Build tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=983cf2d83de228bc3435cafbd5a0a6171f3eaa85;p=p5sagit%2Fp5-mst-13.2.git Changes to CPANPLUS and CPANPLUS::Dist::Build tests Add the utils/ dir to $ENV{PATH} if running under PERL_CORE for the CPANPLUS/CPANPLUS-Dist-Build tests. Both modules' testsuites require access to the cpanp-run-perl script and the version in utils/ is already executable versus the version in cpan/CPANPLUS/bin --- diff --git a/cpan/CPANPLUS-Dist-Build/t/inc/conf.pl b/cpan/CPANPLUS-Dist-Build/t/inc/conf.pl index a104eb9..506b3ed 100644 --- a/cpan/CPANPLUS-Dist-Build/t/inc/conf.pl +++ b/cpan/CPANPLUS-Dist-Build/t/inc/conf.pl @@ -29,11 +29,10 @@ BEGIN { ### add CPANPLUS' bin dir to the front of $ENV{PATH}, so that cpanp-run-perl ### and friends get picked up, only under PERL_CORE though. + $old_env_path = $ENV{PATH}; if ( $ENV{PERL_CORE} ) { - $old_env_path = $ENV{PATH}; $ENV{'PATH'} = join $Config{'path_sep'}, - grep { defined } "$FindBin::Bin/../../CPANPLUS/bin", $ENV{'PATH'}; - + grep { defined } "$FindBin::Bin/../../../utils", $ENV{'PATH'}; } ### Fix up the path to perl, as we're about to chdir diff --git a/cpan/CPANPLUS/t/inc/conf.pl b/cpan/CPANPLUS/t/inc/conf.pl index 4f6c3d6..ca64731 100644 --- a/cpan/CPANPLUS/t/inc/conf.pl +++ b/cpan/CPANPLUS/t/inc/conf.pl @@ -30,8 +30,14 @@ BEGIN { ### add our own path to the front of $ENV{PATH}, so that cpanp-run-perl ### and friends get picked up $old_env_path = $ENV{PATH}; - $ENV{'PATH'} = join $Config{'path_sep'}, + if ( $ENV{PERL_CORE} ) { + $ENV{'PATH'} = join $Config{'path_sep'}, + grep { defined } "$FindBin::Bin/../../../utils", $ENV{'PATH'}; + } + else { + $ENV{'PATH'} = join $Config{'path_sep'}, grep { defined } "$FindBin::Bin/../bin", $ENV{'PATH'}; + } ### Fix up the path to perl, as we're about to chdir ### but only under perlcore, or if the path contains delimiters,