From: Gurusamy Sarathy Date: Sun, 2 Aug 1998 03:24:29 +0000 (+0000) Subject: fix MM_Win32::maybe_command() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=846f184a411112e14d934cbf61a7c3ecf3fc7f42;p=p5sagit%2Fp5-mst-13.2.git fix MM_Win32::maybe_command() p4raw-id: //depot/maint-5.005/perl@1678 --- diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index 72c32fb..53d7b4f 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -67,7 +67,21 @@ sub replace_manpage_separator { sub maybe_command { my($self,$file) = @_; - return "$file.exe" if -e "$file.exe"; + my @e = exists($ENV{'PATHEXT'}) + ? split(/;/, $ENV{PATHEXT}) + : qw(.com .exe .bat .cmd); + my $e = ''; + for (@e) { $e .= "\Q$_\E|" } + chop $e; + # see if file ends in one of the known extensions + if ($file =~ /($e)$/) { + return $file if -e $file; + } + else { + for (@e) { + return "$file$_" if -e "$file$_"; + } + } return; } @@ -718,6 +732,7 @@ We don't want manpage process. XXX add pod2html support later. =cut sub manifypods { + my($self) = shift; return "\nmanifypods :\n\t$self->{NOECHO}\$(NOOP)\n"; }