Change 13731 by jhi@alpha on 2001/12/17 17:31:35
Subject: [PATCH lib/ExtUtils/MM_Unix.pm] miniperl found before perl
From: Michael G Schwern <[EMAIL PROTECTED]>
Date: Sun, 16 Dec 2001 17:53:55 -0500
Message-ID: <20011216225354.GE8900@blackrider>
Affected files ...
.... //depot/perl/lib/ExtUtils/MM_Unix.pm#130 edit
Differences ...
==== //depot/perl/lib/ExtUtils/MM_Unix.pm#130 (text) ====
Index: perl/lib/ExtUtils/MM_Unix.pm
--- perl/lib/ExtUtils/MM_Unix.pm.~1~ Mon Dec 17 10:45:05 2001
+++ perl/lib/ExtUtils/MM_Unix.pm Mon Dec 17 10:45:05 2001
@@ -2035,16 +2035,27 @@
# --- 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
End of Patch.