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.4201
[perl5.git] / cpan / Module-Build / lib / Module / Build / Compat.pm
index 08f0c3b..2518aac 100644 (file)
@@ -2,11 +2,10 @@ package Module::Build::Compat;
 
 use strict;
 use vars qw($VERSION);
-$VERSION = '0.4002';
+$VERSION = '0.4201';
 
 use File::Basename ();
 use File::Spec;
-use IO::File;
 use Config;
 use Module::Build;
 use Module::Build::ModuleInfo;
@@ -123,7 +122,7 @@ HERE
     $args{file} ||= 'Makefile.PL';
     local $build->{properties}{quiet} = 1;
     $build->delete_filetree($args{file});
-    $fh = IO::File->new("> $args{file}") or die "Can't write $args{file}: $!";
+    open($fh, '>', "$args{file}") or die "Can't write $args{file}: $!";
   }
 
   print {$fh} "# Note: this file was auto-generated by ", __PACKAGE__, " version $VERSION\n";
@@ -406,7 +405,7 @@ EOF
 
 sub fake_prereqs {
   my $file = File::Spec->catfile('_build', 'prereqs');
-  my $fh = IO::File->new("< $file") or die "Can't read $file: $!";
+  open(my $fh, '<', "$file") or die "Can't read $file: $!";
   my $prereqs = eval do {local $/; <$fh>};
   close $fh;