diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CPAN.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/CPAN.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Master/tlpkg/tlperl/lib/CPAN.pm b/Master/tlpkg/tlperl/lib/CPAN.pm index 6096916bd9c..25bf3494a8e 100644 --- a/Master/tlpkg/tlperl/lib/CPAN.pm +++ b/Master/tlpkg/tlperl/lib/CPAN.pm @@ -2,7 +2,7 @@ # vim: ts=4 sts=4 sw=4: use strict; package CPAN; -$CPAN::VERSION = '2.11'; +$CPAN::VERSION = '2.11_01'; $CPAN::VERSION =~ s/_//; # we need to run chdir all over and we would get at wrong libraries @@ -1104,6 +1104,8 @@ sub has_usable { ] }; if ($usable->{$mod}) { + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; for my $c (0..$#{$usable->{$mod}}) { my $code = $usable->{$mod}[$c]; my $ret = eval { &$code() }; @@ -1146,6 +1148,8 @@ sub has_inst { $CPAN::META->{dontload_hash}{$mod}||=1; # unsafe meta access, ok return 0; } + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; my $file = $mod; my $obj; $file =~ s|::|/|g; |