From: Steve Hay Date: Tue, 28 Nov 2006 16:43:17 +0000 (+0000) Subject: Fix IPC-Cmd test failure on Win32: check current directory as well X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c444d3e4e0d8388d89e329d49d5aa1eda0884a5;p=p5sagit%2Fp5-mst-13.2.git Fix IPC-Cmd test failure on Win32: check current directory as well as those listed in $ENV{PATH} when searching for binaries p4raw-id: //depot/perl@29410 --- diff --git a/lib/IPC/Cmd.pm b/lib/IPC/Cmd.pm index c941c76..3e8e6d2 100644 --- a/lib/IPC/Cmd.pm +++ b/lib/IPC/Cmd.pm @@ -13,7 +13,7 @@ BEGIN { $USE_IPC_RUN $USE_IPC_OPEN3 $WARN ]; - $VERSION = '0.36'; + $VERSION = '0.36_01'; $VERBOSE = 0; $DEBUG = 0; $WARN = 1; @@ -186,7 +186,9 @@ sub can_run { return MM->maybe_command($command); } else { - for my $dir (split /\Q$Config::Config{path_sep}\E/, $ENV{PATH}) { + for my $dir ((split /\Q$Config::Config{path_sep}\E/, $ENV{PATH}), + File::Spec->curdir() + ) { my $abs = File::Spec->catfile($dir, $command); return $abs if $abs = MM->maybe_command($abs); }