diff --git a/Build.PL b/Build.PL index f75952ab..630ef2fa 100644 --- a/Build.PL +++ b/Build.PL @@ -13,23 +13,24 @@ my $build = new Module::Build module_name => 'Module::Build', license => 'perl', requires => { - perl => '5.6.0', + perl => '5.005_03', Config => 0, - Data::Dumper => 0, - File::Basename => 0, - File::Compare => 0, - File::Copy => 0, - File::Find => 0, - File::Path => 0, - File::Spec => 0, - ExtUtils::Install => 0, + 'Data::Dumper' => 0, + 'File::Basename' => 0, + 'File::Compare' => 0, + 'File::Copy' => 0, + 'File::Find' => 0, + 'File::Path' => 0, + 'File::Spec' => 0, + 'ExtUtils::Install' => 0, + 'IO::File' => 0, Cwd => 0, }, recommends => { YAML => 0.35, - Archive::Tar => 0.23, - ExtUtils::Install => 0.30, - ExtUtils::ParseXS => 0, + 'Archive::Tar' => 0.23, + 'ExtUtils::Install' => 0.30, + 'ExtUtils::ParseXS' => 0, # Module::Signature => 0.21, # Our support isn't good enough yet }, build_requires => { diff --git a/lib/Module/Build/Compat.pm b/lib/Module/Build/Compat.pm index 78492530..a57f0f8e 100644 --- a/lib/Module/Build/Compat.pm +++ b/lib/Module/Build/Compat.pm @@ -4,6 +4,7 @@ $VERSION = '0.02'; use strict; use File::Spec; +use IO::File; use Config; my %makefile_to_build = @@ -54,7 +55,7 @@ EOF sub fake_prereqs { my $file = File::Spec->catfile('_build', 'prereqs'); - open my $fh, "< $file" or die "Can't read $file: $!"; + my $fh = IO::File->new("< $file") or die "Can't read $file: $!"; my $prereqs = eval do {local $/; <$fh>}; close $fh; diff --git a/t/common.pl b/t/common.pl index e8f7cd0e..24b6339e 100644 --- a/t/common.pl +++ b/t/common.pl @@ -15,7 +15,7 @@ sub stdout_of { } sub slurp { - open my($fh), $_[0] or die "Can't open $_[0]: $!"; + my $fh = IO::File->new($_[0]) or die "Can't open $_[0]: $!"; local $/; return <$fh>; } diff --git a/t/runthrough.t b/t/runthrough.t index 266eae33..0286ac72 100644 --- a/t/runthrough.t +++ b/t/runthrough.t @@ -56,7 +56,7 @@ if ($HAVE_YAML) { ok not -e File::Spec->catdir('Sample-0.01', 'blib'); # Make sure all of the above was done by the new version of Module::Build - open my($fh), File::Spec->catfile($goto, 'META.yml'); + my $fh = IO::File->new(File::Spec->catfile($goto, 'META.yml')); my $contents = do {local $/; <$fh>}; ok $contents, "/Module::Build version ". $build->VERSION ."/";