diff options
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Module-Build/lib/inc')
-rw-r--r-- | gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest.pm | 8 | ||||
-rw-r--r-- | gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest/private.pm | 11 |
2 files changed, 11 insertions, 8 deletions
diff --git a/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest.pm b/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest.pm index b794c4a72ac..5834e248eab 100644 --- a/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest.pm +++ b/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest.pm @@ -1,14 +1,16 @@ package inc::latest; + +use if $] >= 5.019, 'deprecate'; + use strict; use vars qw($VERSION); -$VERSION = '0.4003'; +$VERSION = '0.4205'; $VERSION = eval $VERSION; use Carp; use File::Basename (); use File::Spec (); use File::Path (); -use IO::File (); use File::Copy (); # track and return modules loaded by inc::latest @@ -43,7 +45,7 @@ sub write { # write inc/latest.pm File::Path::mkpath( $where ); - my $fh = IO::File->new( File::Spec->catfile($where,'latest.pm'), "w" ); + open my $fh, '>', File::Spec->catfile($where,'latest.pm'); print {$fh} "# This stub created by inc::latest $VERSION\n"; print {$fh} <<'HERE'; package inc::latest; diff --git a/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest/private.pm b/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest/private.pm index 2a62c57d088..c3829ca80ac 100644 --- a/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest/private.pm +++ b/gnu/usr.bin/perl/cpan/Module-Build/lib/inc/latest/private.pm @@ -1,11 +1,13 @@ package inc::latest::private; + +use if $] >= 5.019, 'deprecate'; + use strict; use vars qw($VERSION); -$VERSION = '0.4003'; +$VERSION = '0.4205'; $VERSION = eval $VERSION; use File::Spec; -use IO::File; # must ultimately "goto" the import routine of the module to be loaded # so that the calling package is correct when $mod->import() runs. @@ -60,10 +62,9 @@ sub _search_bundled { my $mypath = 'inc'; - local *DH; # Maintain 5.005 compatibility - opendir DH, $mypath or die "Can't open directory $mypath: $!"; + opendir my $DH, $mypath or die "Can't open directory $mypath: $!"; - while (defined(my $e = readdir DH)) { + while (defined(my $e = readdir $DH)) { next unless $e =~ /^inc_/; my $try = File::Spec->catfile($mypath, $e, $file); |