diff options
author | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2016-07-29 13:10:36 +0100 |
---|---|---|
committer | Chris 'BinGOs' Williams <chris@bingosnet.co.uk> | 2016-07-29 13:32:43 +0100 |
commit | 2c34ec1b60eadacbf29fae442ed08c82ee42863b (patch) | |
tree | 88f53cc8c5e3797ef07b2ac9009a872003a8b845 /cpan | |
parent | 2c25177bbcb0217f887201e4237280b5033145b6 (diff) | |
download | perl-2c34ec1b60eadacbf29fae442ed08c82ee42863b.tar.gz |
Update Module-Load-Conditional to CPAN version 0.68
[DELTA]
0.68 Fri Jul 29 08:01:12 BST 2016
* Fix unconditional @INC localisation
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm index 592bfbb073..89e22b5720 100644 --- a/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm +++ b/cpan/Module-Load-Conditional/lib/Module/Load/Conditional.pm @@ -22,7 +22,7 @@ BEGIN { $FIND_VERSION $ERROR $CHECK_INC_HASH $FORCE_SAFE_INC ]; use Exporter; @ISA = qw[Exporter]; - $VERSION = '0.66'; + $VERSION = '0.68'; $VERBOSE = 0; $DEPRECATED = 0; $FIND_VERSION = 1; @@ -202,8 +202,7 @@ sub check_install { ### so scan the dirs unless( $filename ) { - local @INC = @INC; - pop @INC if $FORCE_SAFE_INC && $INC[-1] eq '.'; + local @INC = @INC[0..$#INC-1] if $FORCE_SAFE_INC && $INC[-1] eq '.'; DIR: for my $dir ( @INC ) { @@ -311,8 +310,7 @@ sub check_install { } if ( $DEPRECATED and "$]" >= 5.011 ) { - local @INC = @INC; - pop @INC if $INC[-1] eq '.'; + local @INC = @INC[0..$#INC-1] if $FORCE_SAFE_INC && $INC[-1] eq '.'; require Module::CoreList; require Config; @@ -450,8 +448,7 @@ sub can_load { if ( $CACHE->{$mod}->{uptodate} ) { - local @INC = @INC; - pop @INC if $FORCE_SAFE_INC && $INC[-1] eq '.'; + local @INC = @INC[0..$#INC-1] if $FORCE_SAFE_INC && $INC[-1] eq '.'; if ( $args->{autoload} ) { my $who = (caller())[0]; @@ -518,8 +515,7 @@ sub requires { return undef; } - local @INC = @INC; - pop @INC if $FORCE_SAFE_INC && $INC[-1] eq '.'; + local @INC = @INC[0..$#INC-1] if $FORCE_SAFE_INC && $INC[-1] eq '.'; my $lib = join " ", map { qq["-I$_"] } @INC; my $oneliner = 'print(join(qq[\n],map{qq[BONG=$_]}keys(%INC)),qq[\n])'; |