summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2001-12-16 12:53:55 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-17 17:31:35 +0000
commit66929e520036e026099e247dab1737cbf0507b6e (patch)
tree29844bad72963cfc015537d18f2656d698be930d /lib
parent083bda0273e218fe3e0e3d7d62103426dba06c88 (diff)
downloadperl-66929e520036e026099e247dab1737cbf0507b6e.tar.gz
miniperl found before perl
Message-ID: <20011216225354.GE8900@blackrider> p4raw-id: //depot/perl@13731
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils/MM_Unix.pm23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm
index f2b6ef2b25..2d203142c0 100644
--- a/lib/ExtUtils/MM_Unix.pm
+++ b/lib/ExtUtils/MM_Unix.pm
@@ -2035,16 +2035,27 @@ usually solves this kind of problem.
# --- Initialize Perl Binary Locations
# Find Perl 5. The only contract here is that both 'PERL' and 'FULLPERL'
- # will be working versions of perl 5. miniperl has priority over perl
- # for PERL to ensure that $(PERL) is usable while building ./ext/*
+ # will be working versions of perl 5.
my ($component,@defpath);
- foreach $component ($self->{PERL_SRC}, $self->path(), $Config::Config{binexp}) {
+ foreach $component ($self->{PERL_SRC}, $self->path(),
+ $Config::Config{binexp})
+ {
push @defpath, $component if defined $component;
}
+
+ my @perls = ($self->canonpath($^X), 'perl', 'perl5', "perl$Config{version}");
+
+ # miniperl has priority over all but the cannonical perl when in the
+ # core. Otherwise its a last resort.
+ if( $self->{PERL_CORE} ) {
+ splice @perls, 1, 0, 'miniperl';
+ }
+ else {
+ push @perls, 'miniperl';
+ }
+
$self->{PERL} ||=
- $self->find_perl(5.0, [ $self->canonpath($^X), 'miniperl',
- 'perl','perl5',"perl$Config{version}" ],
- \@defpath, $Verbose );
+ $self->find_perl(5.0, \@perls, \@defpath, $Verbose );
# don't check if perl is executable, maybe they have decided to
# supply switches with perl