From 5c444d3e4e0d8388d89e329d49d5aa1eda0884a5 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Tue, 28 Nov 2006 16:43:17 +0000 Subject: 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 --- lib/IPC/Cmd.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/IPC') diff --git a/lib/IPC/Cmd.pm b/lib/IPC/Cmd.pm index c941c76157..3e8e6d22da 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); } -- cgit v1.2.1