X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/40c9afb285aadac3203714fd5da54bc20a6a1535..18b2aa6a0d8618a3be3fe009940a585eddae1e52:/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm diff --git a/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm b/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm index 18de060..9645f19 100644 --- a/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm +++ b/cpan/Module-Build/lib/Module/Build/Platform/Windows.pm @@ -2,13 +2,12 @@ package Module::Build::Platform::Windows; use strict; use vars qw($VERSION); -$VERSION = '0.3607'; +$VERSION = '0.4200'; $VERSION = eval $VERSION; use Config; use File::Basename; use File::Spec; -use IO::File; use Module::Build::Base; @@ -49,7 +48,7 @@ sub ACTION_realclean { my $null_arg = (Win32::IsWinNT()) ? '""' : ''; my $cmd = qq(start $null_arg /min "\%comspec\%" /c del "$full_progname"); - my $fh = IO::File->new(">> $basename.bat") + open(my $fh, '>>', "$basename.bat") or die "Can't create $basename.bat: $!"; print $fh $cmd; close $fh ; @@ -137,9 +136,9 @@ EOT my $start = $Config{startperl}; $start = "#!perl" unless $start =~ /^#!.*perl/; - my $in = IO::File->new("< $opts{in}") or die "Can't open $opts{in}: $!"; + open(my $in, '<', "$opts{in}") or die "Can't open $opts{in}: $!"; my @file = <$in>; - $in->close; + close($in); foreach my $line ( @file ) { $linenum++; @@ -164,13 +163,13 @@ EOT } } - my $out = IO::File->new("> $opts{out}") or die "Can't open $opts{out}: $!"; + open(my $out, '>', "$opts{out}") or die "Can't open $opts{out}: $!"; print $out $head; print $out $start, ( $opts{usewarnings} ? " -w" : "" ), "\n#line ", ($headlines+1), "\n" unless $linedone; print $out @file[$skiplines..$#file]; print $out $tail unless $taildone; - $out->close; + close($out); return $opts{out}; }