diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-18 23:10:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-18 23:10:57 +0000 |
commit | 40b4b6e177c62a14c166dbba6adf3abc415af4b2 (patch) | |
tree | 2996bf29509c806bd8064fb6cf38092c1b375ff8 /Master/tlpkg/tlperl/lib/App | |
parent | 8e743c86b6872f30b7a35c72aa944455157d4b3f (diff) |
tlperl 5.24.1 from siep
git-svn-id: svn://tug.org/texlive/trunk@43914 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/App')
-rw-r--r-- | Master/tlpkg/tlperl/lib/App/Cpan.pm | 23 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/App/Prove.pm | 4 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/App/Prove/State.pm | 4 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/App/Prove/State/Result.pm | 4 | ||||
-rw-r--r-- | Master/tlpkg/tlperl/lib/App/Prove/State/Result/Test.pm | 4 |
5 files changed, 25 insertions, 14 deletions
diff --git a/Master/tlpkg/tlperl/lib/App/Cpan.pm b/Master/tlpkg/tlperl/lib/App/Cpan.pm index e8c9bb78eea..94607d9b0f2 100644 --- a/Master/tlpkg/tlperl/lib/App/Cpan.pm +++ b/Master/tlpkg/tlperl/lib/App/Cpan.pm @@ -6,7 +6,7 @@ use vars qw($VERSION); use if $] < 5.008 => 'IO::Scalar'; -$VERSION = '1.63'; +$VERSION = '1.63_01'; =head1 NAME @@ -530,9 +530,20 @@ sub AUTOLOAD { 1 } sub DESTROY { 1 } } +# load a module without searching the default entry for the current +# directory +sub _safe_load_module { + my $name = shift; + + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; + + eval "require $name; 1"; +} + sub _init_logger { - my $log4perl_loaded = eval "require Log::Log4perl; 1"; + my $log4perl_loaded = _safe_load_module("Log::Log4perl"); unless( $log4perl_loaded ) { @@ -993,7 +1004,7 @@ sub _load_local_lib # -I { $logger->debug( "Loading local::lib" ); - my $rc = eval { require local::lib; 1; }; + my $rc = _safe_load_module("local::lib"); unless( $rc ) { $logger->die( "Could not load local::lib" ); } @@ -1121,7 +1132,7 @@ sub _get_file { my $path = shift; - my $loaded = eval "require LWP::Simple; 1;"; + my $loaded = _safe_load_module("LWP::Simple"); croak "You need LWP::Simple to use features that fetch files from CPAN\n" unless $loaded; @@ -1143,7 +1154,7 @@ sub _gitify { my $args = shift; - my $loaded = eval "require Archive::Extract; 1;"; + my $loaded = _safe_load_module("Archive::Extract"); croak "You need Archive::Extract to use features that gitify distributions\n" unless $loaded; @@ -1207,7 +1218,7 @@ sub _show_Changes sub _get_changes_file { croak "Reading Changes files requires LWP::Simple and URI\n" - unless eval "require LWP::Simple; require URI; 1"; + unless _safe_load_module("LWP::Simple") && _safe_load_module("URI"); my $url = shift; diff --git a/Master/tlpkg/tlperl/lib/App/Prove.pm b/Master/tlpkg/tlperl/lib/App/Prove.pm index 46089782869..32eb59c2a5c 100644 --- a/Master/tlpkg/tlperl/lib/App/Prove.pm +++ b/Master/tlpkg/tlperl/lib/App/Prove.pm @@ -18,11 +18,11 @@ App::Prove - Implements the C<prove> command. =head1 VERSION -Version 3.35 +Version 3.36 =cut -our $VERSION = '3.35'; +our $VERSION = '3.36_01'; =head1 DESCRIPTION diff --git a/Master/tlpkg/tlperl/lib/App/Prove/State.pm b/Master/tlpkg/tlperl/lib/App/Prove/State.pm index 0e237d5fa4d..e352fb3f4a5 100644 --- a/Master/tlpkg/tlperl/lib/App/Prove/State.pm +++ b/Master/tlpkg/tlperl/lib/App/Prove/State.pm @@ -25,11 +25,11 @@ App::Prove::State - State storage for the C<prove> command. =head1 VERSION -Version 3.35 +Version 3.36 =cut -our $VERSION = '3.35'; +our $VERSION = '3.36_01'; =head1 DESCRIPTION diff --git a/Master/tlpkg/tlperl/lib/App/Prove/State/Result.pm b/Master/tlpkg/tlperl/lib/App/Prove/State/Result.pm index 6725c5a38a5..931e52b1d95 100644 --- a/Master/tlpkg/tlperl/lib/App/Prove/State/Result.pm +++ b/Master/tlpkg/tlperl/lib/App/Prove/State/Result.pm @@ -14,11 +14,11 @@ App::Prove::State::Result - Individual test suite results. =head1 VERSION -Version 3.35 +Version 3.36 =cut -our $VERSION = '3.35'; +our $VERSION = '3.36_01'; =head1 DESCRIPTION diff --git a/Master/tlpkg/tlperl/lib/App/Prove/State/Result/Test.pm b/Master/tlpkg/tlperl/lib/App/Prove/State/Result/Test.pm index a776f8ffef0..4819ed82183 100644 --- a/Master/tlpkg/tlperl/lib/App/Prove/State/Result/Test.pm +++ b/Master/tlpkg/tlperl/lib/App/Prove/State/Result/Test.pm @@ -9,11 +9,11 @@ App::Prove::State::Result::Test - Individual test results. =head1 VERSION -Version 3.35 +Version 3.36 =cut -our $VERSION = '3.35'; +our $VERSION = '3.36_01'; =head1 DESCRIPTION |