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.4008
[perl5.git] / cpan / Module-Build / lib / Module / Build / PPMMaker.pm
index 8567626..f526ee7 100644 (file)
@@ -3,7 +3,8 @@ package Module::Build::PPMMaker;
 use strict;
 use Config;
 use vars qw($VERSION);
-$VERSION = '0.35_09';
+
+$VERSION = '0.4008';
 $VERSION = eval $VERSION;
 
 # This code is mostly borrowed from ExtUtils::MM_Unix 6.10_03, with a
@@ -98,11 +99,11 @@ EOF
 EOF
 
   my $ppd_file = "$dist{name}.ppd";
-  my $fh = IO::File->new(">$ppd_file")
+  open(my $fh, '>', $ppd_file)
     or die "Cannot write to $ppd_file: $!";
 
-  $fh->binmode(":utf8")
-    if $fh->can('binmode') && $] >= 5.008 && $Config{useperlio};
+  binmode($fh, ":utf8")
+    if $] >= 5.008 && $Config{useperlio};
   print $fh $ppd;
   close $fh;
 
@@ -137,7 +138,7 @@ sub _varchname {  # Copied from PPM.pm
                 '<' => '&lt;',
                );
   my $rx = join '|', keys %escapes;
-  
+
   sub _simple_xml_escape {
     $_[1] =~ s/($rx)/$escapes{$1}/go;
   }
@@ -151,7 +152,6 @@ __END__
 
 Module::Build::PPMMaker - Perl Package Manager file creation
 
-
 =head1 SYNOPSIS
 
   On the command line, builds a .ppd file: