Author: BINGOS
Date: Tue Apr 6 14:33:10 2010
New Revision: 13892
Modified:
CPANPLUS-Dist-Build/trunk/Changes
CPANPLUS-Dist-Build/trunk/t/inc/conf.pl
Log:
Explicitly set the location of cpanp-run-perl when under PERL_CORE in
t/inc/conf.pl
Modified: CPANPLUS-Dist-Build/trunk/Changes
==============================================================================
--- CPANPLUS-Dist-Build/trunk/Changes (original)
+++ CPANPLUS-Dist-Build/trunk/Changes Tue Apr 6 14:33:10 2010
@@ -1,5 +1,8 @@
Revision history for Perl extension CPANPLUS::Dist::Build.
+ - Explicitly set the location of cpanp-run-perl when under PERL_CORE
+ in t/inc/conf.pl
+
0.46 Sat Jan 23 07:52:19 GMT 2010
- actually make the prereq resolving fallback to _build/ querying
if the 'prereq_data' action fails. *facepalm*
Modified: CPANPLUS-Dist-Build/trunk/t/inc/conf.pl
==============================================================================
--- CPANPLUS-Dist-Build/trunk/t/inc/conf.pl (original)
+++ CPANPLUS-Dist-Build/trunk/t/inc/conf.pl Tue Apr 6 14:33:10 2010
@@ -187,6 +187,24 @@
}
}
+ ### CPANPLUS::Config checks 3 specific scenarios first
+ ### when looking for cpanp-run-perl: parallel to cpanp,
+ ### parallel to CPANPLUS.pm, or installed into a custom
+ ### prefix like /tmp/foo. Only *THEN* does it check the
+ ### the path.
+ ### If the perl core is extracted to a directory that has
+ ### cpanp-run-perl installed the same amount of 'uplevels'
+ ### as the /tmp/foo prefix, we'll pull in the wrong script
+ ### by accident.
+ ### Since we set the path to cpanp-run-perl explicitily
+ ### at the top of this script, it's best to update the config
+ ### ourselves with a path lookup, rather than rely on its
+ ### heuristics. Thanks to David Wheeler, Josh Jore and Vincent
+ ### Pit for helping to track this down.
+ if( $ENV{PERL_CORE} ) {
+ $conf->set_program( "perlwrapper" =>
IPC::Cmd::can_run('cpanp-run-perl') );
+ }
+
$conf->set_conf( source_engine => $ENV{CPANPLUS_SOURCE_ENGINE} )
if $ENV{CPANPLUS_SOURCE_ENGINE};