summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-08-02 03:24:29 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-08-02 03:24:29 +0000
commit846f184a411112e14d934cbf61a7c3ecf3fc7f42 (patch)
treea43b596bc0baf1521dc6f54116b9198d01e45a1e /lib
parentee239bfe47dc5d504cf50bb8f48401031aa791d7 (diff)
downloadperl-846f184a411112e14d934cbf61a7c3ecf3fc7f42.tar.gz
fix MM_Win32::maybe_command()
p4raw-id: //depot/maint-5.005/perl@1678
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils/MM_Win32.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm
index 72c32fb195..53d7b4f12a 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";
}