diff options
author | Tony Cook <tony@develop-help.com> | 2016-06-27 16:21:21 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-07-26 15:36:32 +1000 |
commit | b8097e9479a0aafd1182244c6f9a955c57fb6b1a (patch) | |
tree | b2972f3519bf10c282667607773c03c05e443583 /cpan/File-Fetch | |
parent | 38b4af19a42e6a4b9d5c8cc97fd06d954fff69a8 (diff) | |
download | perl-b8097e9479a0aafd1182244c6f9a955c57fb6b1a.tar.gz |
cpan/: remove . from @INC when loading optional modules
Diffstat (limited to 'cpan/File-Fetch')
-rw-r--r-- | cpan/File-Fetch/lib/File/Fetch.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpan/File-Fetch/lib/File/Fetch.pm b/cpan/File-Fetch/lib/File/Fetch.pm index 7d6a263e2b..5a8799b76a 100644 --- a/cpan/File-Fetch/lib/File/Fetch.pm +++ b/cpan/File-Fetch/lib/File/Fetch.pm @@ -567,6 +567,8 @@ sub _lwp_fetch { }; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; unless( can_load( modules => $use_list ) ) { $METHOD_FAIL->{'lwp'} = 1; return; @@ -619,6 +621,8 @@ sub _httptiny_fetch { }; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; unless( can_load(modules => $use_list) ) { $METHOD_FAIL->{'httptiny'} = 1; return; @@ -658,6 +662,8 @@ sub _httplite_fetch { }; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; unless( can_load(modules => $use_list) ) { $METHOD_FAIL->{'httplite'} = 1; return; @@ -733,6 +739,8 @@ sub _iosock_fetch { 'IO::Select' => '0.0', }; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; unless( can_load(modules => $use_list) ) { $METHOD_FAIL->{'iosock'} = 1; return; @@ -814,6 +822,8 @@ sub _netftp_fetch { check( $tmpl, \%hash ) or return; ### required modules ### + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; my $use_list = { 'Net::FTP' => 0 }; unless( can_load( modules => $use_list ) ) { |