This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module-Build to CPAN version 0.4205
[perl5.git] / cpan / Module-Build / lib / inc / latest / private.pm
index 572ae8a..c3829ca 100644 (file)
@@ -1,11 +1,13 @@
 package inc::latest::private;
+
+use if $] >= 5.019, 'deprecate';
+
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.3603';
+$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);