Update of /cvsroot/module-build/Module-Build/lib/Module/Build
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28152/lib/Module/Build
Modified Files:
Base.pm
Log Message:
Make sure we can find the perl executable when run from uninstalled perl.
Index: Base.pm
===================================================================
RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v
retrieving revision 1.553
retrieving revision 1.554
diff -u -d -r1.553 -r1.554
--- Base.pm 7 Mar 2006 00:03:47 -0000 1.553
+++ Base.pm 7 Mar 2006 20:59:20 -0000 1.554
@@ -333,8 +333,15 @@
} elsif (defined $exe) {
$thisperl .= $exe unless $thisperl =~ m/$exe$/i;
}
-
- foreach my $perl ( $c->{perlpath},
+
+ my $uninstperl;
+ if ($ENV{PERL_CORE}) {
+ require ExtUtils::CBuilder;
+ $uninstperl = File::Spec->catfile(ExtUtils::CBuilder::->perl_src, $thisperl);
+ }
+
+ foreach my $perl ( $uninstperl || (),
+ $c->{perlpath},
map File::Spec->catfile($_, $thisperl), File::Spec->path()
) {
return $perl if -f $perl and $proto->_perl_is_same($perl);
|