summaryrefslogtreecommitdiff
path: root/dist/IO/IO.pm
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2016-06-23 14:06:40 +1000
committerTony Cook <tony@develop-help.com>2016-07-26 15:36:32 +1000
commit8901ddee94b1bc3764b4278d1cb26bed30bc2605 (patch)
treec8be8c6e8e8204a6dafb13ae1d2119cd4dfee443 /dist/IO/IO.pm
parentdcfbcce2b273096853629671e1e3a9c34c7ac7c8 (diff)
downloadperl-8901ddee94b1bc3764b4278d1cb26bed30bc2605.tar.gz
dist/: remove . from @INC when loading optional modules
I didn't update base.pm since that seems more likely to be loading modules *expected* to be in the current directory. Opinions welcome.
Diffstat (limited to 'dist/IO/IO.pm')
-rw-r--r--dist/IO/IO.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/dist/IO/IO.pm b/dist/IO/IO.pm
index de3e991a90..833f1a2358 100644
--- a/dist/IO/IO.pm
+++ b/dist/IO/IO.pm
@@ -18,6 +18,8 @@ sub import {
my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)
or croak $@;
}