diff options
author | Tony Cook <tony@develop-help.com> | 2016-06-21 10:02:02 +1000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2016-07-25 10:12:16 +0100 |
commit | 5f66e9fffdc3d0c6e0846cd1f11298e70c786c30 (patch) | |
tree | 2519637590bcb600e4ca59ae6f029e72e3dc2487 | |
parent | 46b7ac49cca5dd8c4b20bdc00d54042dfa9e069a (diff) | |
download | perl-5f66e9fffdc3d0c6e0846cd1f11298e70c786c30.tar.gz |
(perl #127834) remove . from the end of @INC if complex modules are loaded
While currently Encode and Storable are know to attempt to load modules
not included in the core, updates to other modules may lead to those
also attempting to load new modules, so be safe and remove . for those
as well.
-rw-r--r-- | cpan/Archive-Tar/bin/ptar | 1 | ||||
-rw-r--r-- | cpan/Archive-Tar/bin/ptardiff | 1 | ||||
-rw-r--r-- | cpan/Archive-Tar/bin/ptargrep | 1 | ||||
-rw-r--r-- | cpan/CPAN/scripts/cpan | 1 | ||||
-rw-r--r-- | cpan/Digest-SHA/shasum | 1 | ||||
-rw-r--r-- | cpan/Encode/bin/enc2xs | 1 | ||||
-rw-r--r-- | cpan/Encode/bin/encguess | 1 | ||||
-rw-r--r-- | cpan/Encode/bin/piconv | 1 | ||||
-rw-r--r-- | cpan/Encode/bin/ucmlint | 1 | ||||
-rw-r--r-- | cpan/Encode/bin/unidump | 1 | ||||
-rw-r--r-- | cpan/ExtUtils-MakeMaker/bin/instmodsh | 1 | ||||
-rw-r--r-- | cpan/IO-Compress/bin/zipdetails | 1 | ||||
-rw-r--r-- | cpan/JSON-PP/bin/json_pp | 1 | ||||
-rw-r--r-- | cpan/Test-Harness/bin/prove | 1 | ||||
-rw-r--r-- | dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp | 1 | ||||
-rw-r--r-- | dist/Module-CoreList/corelist | 1 | ||||
-rw-r--r-- | ext/Pod-Html/bin/pod2html | 1 | ||||
-rw-r--r-- | utils/c2ph.PL | 1 | ||||
-rw-r--r-- | utils/h2ph.PL | 2 | ||||
-rw-r--r-- | utils/h2xs.PL | 2 | ||||
-rw-r--r-- | utils/libnetcfg.PL | 1 | ||||
-rw-r--r-- | utils/perlbug.PL | 1 | ||||
-rw-r--r-- | utils/perldoc.PL | 5 | ||||
-rw-r--r-- | utils/perlivp.PL | 2 | ||||
-rw-r--r-- | utils/splain.PL | 6 |
25 files changed, 36 insertions, 1 deletions
diff --git a/cpan/Archive-Tar/bin/ptar b/cpan/Archive-Tar/bin/ptar index 0eaffa7ccb..9dc6402c66 100644 --- a/cpan/Archive-Tar/bin/ptar +++ b/cpan/Archive-Tar/bin/ptar @@ -1,6 +1,7 @@ #!/usr/bin/perl use strict; +BEGIN { pop @INC if $INC[-1] eq '.' } use File::Find; use Getopt::Std; use Archive::Tar; diff --git a/cpan/Archive-Tar/bin/ptardiff b/cpan/Archive-Tar/bin/ptardiff index 66bd859d06..4668fa6be0 100644 --- a/cpan/Archive-Tar/bin/ptardiff +++ b/cpan/Archive-Tar/bin/ptardiff @@ -1,5 +1,6 @@ #!/usr/bin/perl +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use Archive::Tar; use Getopt::Std; diff --git a/cpan/Archive-Tar/bin/ptargrep b/cpan/Archive-Tar/bin/ptargrep index 1a320f1985..8dc6b4f896 100644 --- a/cpan/Archive-Tar/bin/ptargrep +++ b/cpan/Archive-Tar/bin/ptargrep @@ -4,6 +4,7 @@ # archive. See 'ptargrep --help' for more documentation. # +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use warnings; diff --git a/cpan/CPAN/scripts/cpan b/cpan/CPAN/scripts/cpan index 5f4320e284..ccba47e227 100644 --- a/cpan/CPAN/scripts/cpan +++ b/cpan/CPAN/scripts/cpan @@ -1,5 +1,6 @@ #!/usr/local/bin/perl +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use vars qw($VERSION); diff --git a/cpan/Digest-SHA/shasum b/cpan/Digest-SHA/shasum index 14ddd606af..62a2b0ec3c 100644 --- a/cpan/Digest-SHA/shasum +++ b/cpan/Digest-SHA/shasum @@ -13,6 +13,7 @@ ## "-0" option for reading bit strings, and ## "-p" option for portable digests (to be deprecated). +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use warnings; use Fcntl; diff --git a/cpan/Encode/bin/enc2xs b/cpan/Encode/bin/enc2xs index ec4732cc7c..f8d9f52f2a 100644 --- a/cpan/Encode/bin/enc2xs +++ b/cpan/Encode/bin/enc2xs @@ -4,6 +4,7 @@ BEGIN { # with $ENV{PERL_CORE} set # In case we need it in future... require Config; import Config; + pop @INC if $INC[-1] eq '.'; } use strict; use warnings; diff --git a/cpan/Encode/bin/encguess b/cpan/Encode/bin/encguess index 5d7ac80aac..0be5c7c428 100644 --- a/cpan/Encode/bin/encguess +++ b/cpan/Encode/bin/encguess @@ -1,5 +1,6 @@ #!./perl use 5.008001; +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use warnings; use Encode; diff --git a/cpan/Encode/bin/piconv b/cpan/Encode/bin/piconv index c1dad9ee04..60b2a59b78 100644 --- a/cpan/Encode/bin/piconv +++ b/cpan/Encode/bin/piconv @@ -1,6 +1,7 @@ #!./perl # $Id: piconv,v 2.7 2014/05/31 09:48:48 dankogai Exp $ # +BEGIN { pop @INC if $INC[-1] eq '.' } use 5.8.0; use strict; use Encode ; diff --git a/cpan/Encode/bin/ucmlint b/cpan/Encode/bin/ucmlint index 622376d885..25e0d67ef6 100644 --- a/cpan/Encode/bin/ucmlint +++ b/cpan/Encode/bin/ucmlint @@ -3,6 +3,7 @@ # $Id: ucmlint,v 2.2 2008/03/12 09:51:11 dankogai Exp $ # +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; our $VERSION = do { my @r = (q$Revision: 2.2 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; diff --git a/cpan/Encode/bin/unidump b/cpan/Encode/bin/unidump index ae0da30852..f19082744f 100644 --- a/cpan/Encode/bin/unidump +++ b/cpan/Encode/bin/unidump @@ -1,5 +1,6 @@ #!./perl +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use Encode; use Getopt::Std; diff --git a/cpan/ExtUtils-MakeMaker/bin/instmodsh b/cpan/ExtUtils-MakeMaker/bin/instmodsh index 8b9aa95ae7..ab0f9d1ffe 100644 --- a/cpan/ExtUtils-MakeMaker/bin/instmodsh +++ b/cpan/ExtUtils-MakeMaker/bin/instmodsh @@ -1,5 +1,6 @@ #!/usr/bin/perl -w +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use IO::File; use ExtUtils::Packlist; diff --git a/cpan/IO-Compress/bin/zipdetails b/cpan/IO-Compress/bin/zipdetails index 0249850457..1b9c70a8f4 100644 --- a/cpan/IO-Compress/bin/zipdetails +++ b/cpan/IO-Compress/bin/zipdetails @@ -5,6 +5,7 @@ # Display info on the contents of a Zip file # +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use warnings ; diff --git a/cpan/JSON-PP/bin/json_pp b/cpan/JSON-PP/bin/json_pp index df9d243eba..896cd2f368 100644 --- a/cpan/JSON-PP/bin/json_pp +++ b/cpan/JSON-PP/bin/json_pp @@ -1,5 +1,6 @@ #!/usr/bin/perl +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use Getopt::Long; diff --git a/cpan/Test-Harness/bin/prove b/cpan/Test-Harness/bin/prove index 6637cc4446..d71b2387d9 100644 --- a/cpan/Test-Harness/bin/prove +++ b/cpan/Test-Harness/bin/prove @@ -1,5 +1,6 @@ #!/usr/bin/perl -w +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use warnings; use App::Prove; diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp b/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp index e2ac71a323..d596cdff42 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp @@ -1,5 +1,6 @@ #!perl use 5.006; +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; eval { require ExtUtils::ParseXS; diff --git a/dist/Module-CoreList/corelist b/dist/Module-CoreList/corelist index aa4a94571a..bbe61ccee4 100644 --- a/dist/Module-CoreList/corelist +++ b/dist/Module-CoreList/corelist @@ -130,6 +130,7 @@ requested perl versions. =cut +BEGIN { pop @INC if $INC[-1] eq '.' } use Module::CoreList; use Getopt::Long qw(:config no_ignore_case); use Pod::Usage; diff --git a/ext/Pod-Html/bin/pod2html b/ext/Pod-Html/bin/pod2html index b022859190..7d1d23268b 100644 --- a/ext/Pod-Html/bin/pod2html +++ b/ext/Pod-Html/bin/pod2html @@ -216,6 +216,7 @@ This program is distributed under the Artistic License. =cut +BEGIN { pop @INC if $INC[-1] eq '.' } use Pod::Html; pod2html @ARGV; diff --git a/utils/c2ph.PL b/utils/c2ph.PL index 466223c800..ea87a6f246 100644 --- a/utils/c2ph.PL +++ b/utils/c2ph.PL @@ -280,6 +280,7 @@ Anyway, here it is. Should run on perl v4 or greater. Maybe less. $RCSID = '$Id: c2ph,v 1.7 95/10/28 10:41:47 tchrist Exp Locker: tchrist $'; +BEGIN { pop @INC if $INC[-1] eq '.' } use File::Temp; ###################################################################### diff --git a/utils/h2ph.PL b/utils/h2ph.PL index d082f22723..2523c0a654 100644 --- a/utils/h2ph.PL +++ b/utils/h2ph.PL @@ -36,6 +36,8 @@ $Config{startperl} print OUT <<'!NO!SUBS!'; +BEGIN { pop @INC if $INC[-1] eq '.' } + use strict; use Config; diff --git a/utils/h2xs.PL b/utils/h2xs.PL index 4cb0943742..8fda87b0a7 100644 --- a/utils/h2xs.PL +++ b/utils/h2xs.PL @@ -35,6 +35,8 @@ $Config{startperl} print OUT <<'!NO!SUBS!'; +BEGIN { pop @INC if $INC[-1] eq '.' } + use warnings; =head1 NAME diff --git a/utils/libnetcfg.PL b/utils/libnetcfg.PL index 59a2de87c8..26d2f995a9 100644 --- a/utils/libnetcfg.PL +++ b/utils/libnetcfg.PL @@ -97,6 +97,7 @@ Jarkko Hietaniemi, conversion into libnetcfg for inclusion into Perl 5.8. # $Id: Configure,v 1.8 1997/03/04 09:22:32 gbarr Exp $ +BEGIN { pop @INC if $INC[-1] eq '.' } use strict; use IO::File; use Getopt::Std; diff --git a/utils/perlbug.PL b/utils/perlbug.PL index 885785ae00..ae8c343052 100644 --- a/utils/perlbug.PL +++ b/utils/perlbug.PL @@ -57,6 +57,7 @@ print OUT <<'!NO!SUBS!'; my @patches = Config::local_patches(); my $patch_tags = join "", map /(\S+)/ ? "+$1 " : (), @patches; +BEGIN { pop @INC if $INC[-1] eq '.' } use warnings; use strict; use Config; diff --git a/utils/perldoc.PL b/utils/perldoc.PL index e201de9d91..cd60bd4354 100644 --- a/utils/perldoc.PL +++ b/utils/perldoc.PL @@ -44,7 +44,10 @@ $Config{startperl} # This "$file" file was generated by "$0" require 5; -BEGIN { \$^W = 1 if \$ENV{'PERLDOCDEBUG'} } +BEGIN { + \$^W = 1 if \$ENV{'PERLDOCDEBUG'}; + pop \@INC if \$INC[-1] eq '.'; +} use Pod::Perldoc; exit( Pod::Perldoc->run() ); diff --git a/utils/perlivp.PL b/utils/perlivp.PL index c2f0a11f15..e5229133f4 100644 --- a/utils/perlivp.PL +++ b/utils/perlivp.PL @@ -39,6 +39,8 @@ print OUT "\n# perlivp $^V\n"; print OUT <<'!NO!SUBS!'; +BEGIN { pop @INC if $INC[-1] eq '.' } + sub usage { warn "@_\n" if @_; print << " EOUSAGE"; diff --git a/utils/splain.PL b/utils/splain.PL index 9c70b61afd..cae84a0d38 100644 --- a/utils/splain.PL +++ b/utils/splain.PL @@ -38,6 +38,12 @@ $Config{startperl} if \$running_under_some_shell; !GROK!THIS! +print <<'!NO!SUBS!'; + +BEGIN { pop @INC if $INC[-1] eq '.' } + +!NO!SUBS! + while (<IN>) { print OUT unless /^package diagnostics/; } |