From: Paul Green Date: Tue, 15 Jan 2002 22:28:10 +0000 (-0500) Subject: Tidy up EXE_EXT patches to MM_Unix.pm X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21732b6f21f2a4e95da53f553d77543428ef4fba;p=p5sagit%2Fp5-mst-13.2.git Tidy up EXE_EXT patches to MM_Unix.pm Message-ID: <95AE3CDB3543D511883A0020485B38B9023534F0@exna3.stratus.com> p4raw-id: //depot/perl@14298 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 24e36a1..10d96a5 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -11,7 +11,7 @@ use strict; our ($Is_Mac,$Is_OS2,$Is_VMS,$Is_Win32,$Is_Dos, $Verbose,%pm,%static,$Xsubpp_Version); -our $VERSION = '1.12606'; +our $VERSION = '1.12607'; require ExtUtils::MakeMaker; ExtUtils::MakeMaker->import(qw($Verbose &neatvalue)); @@ -2027,21 +2027,20 @@ usually solves this kind of problem. push @defpath, $component if defined $component; } - my @perls = ($self->canonpath($^X), 'perl', 'perl5', "perl$Config{version}"); + # Build up a set of file names (not command names). + my $thisperl = $self->canonpath($^X); + $thisperl .= $Config{exe_ext} unless $thisperl =~ m/$Config{exe_ext}$/i; + my @perls = ('perl', 'perl5', "perl$Config{version}"); + @perls = ($thisperl, (map $_.=$Config{exe_ext}, @perls)); - # miniperl has priority over all but the cannonical perl when in the + # miniperl has priority over all but the cannonical perl when in the # core. Otherwise its a last resort. + my $miniperl = "miniperl$Config{exe_ext}"; if( $self->{PERL_CORE} ) { - splice @perls, 1, 0, 'miniperl'; + splice @perls, 1, 0, $miniperl; } else { - push @perls, 'miniperl'; - } - - # Build up a set of file names (not command names). - foreach $element (@perls) { - $element .= $Config{exe_ext} - unless $element =~ m/$Config{exe_ext}$/i; + push @perls, $miniperl; } $self->{PERL} ||=