summaryrefslogtreecommitdiff
path: root/cpan/IPC-Cmd
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-06-27 16:21:21 +1000
committerTony Cook <tony@develop-help.com>2016-07-26 15:36:32 +1000
commitb8097e9479a0aafd1182244c6f9a955c57fb6b1a (patch)
treeb2972f3519bf10c282667607773c03c05e443583 /cpan/IPC-Cmd
parent38b4af19a42e6a4b9d5c8cc97fd06d954fff69a8 (diff)
downloadperl-b8097e9479a0aafd1182244c6f9a955c57fb6b1a.tar.gz
cpan/: remove . from @INC when loading optional modules
Diffstat (limited to 'cpan/IPC-Cmd')
-rw-r--r--cpan/IPC-Cmd/lib/IPC/Cmd.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpan/IPC-Cmd/lib/IPC/Cmd.pm b/cpan/IPC-Cmd/lib/IPC/Cmd.pm
index 13f3c6bed0..e8e295e213 100644
--- a/cpan/IPC-Cmd/lib/IPC/Cmd.pm
+++ b/cpan/IPC-Cmd/lib/IPC/Cmd.pm
@@ -142,6 +142,8 @@ sub can_use_ipc_run {
return if IS_WIN98;
### if we don't have ipc::run, we obviously can't use it.
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
return unless can_load(
modules => { 'IPC::Run' => '0.55' },
verbose => ($WARN && $verbose),
@@ -169,6 +171,8 @@ sub can_use_ipc_open3 {
### IPC::Open3 works on every non-VMS platform, but it can't
### capture buffers on win32 :(
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
return unless can_load(
modules => { map {$_ => '0.0'} qw|IPC::Open3 IO::Select Symbol| },
verbose => ($WARN && $verbose),