[Module-build-checkins] Module-Build/t metadata2.t,1.6,1.7
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <si...@us...> - 2005-12-01 08:20:25
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14270/t Modified Files: metadata2.t Log Message: Various fixes to run under Perl 5.005. Index: metadata2.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/metadata2.t,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- metadata2.t 30 Nov 2005 10:47:33 -0000 1.6 +++ metadata2.t 1 Dec 2005 08:20:17 -0000 1.7 @@ -49,6 +49,10 @@ ############################## Check generation of README file +# TODO: We need to test faking the absence of Pod::Readme when present +# so Pod::Text will be used. Also fake the absence of both to +# test that we fail gracefully. + my $provides; # Used a bunch of times below my $pod_text = <<'---'; @@ -68,10 +72,14 @@ sub _slurp { my $filename = shift; die "$filename doesn't exist. Aborting" if not -e $filename; - open my $fh, "< $filename" + + use IO::File; + my $fh = IO::File->new( "< $filename" ) or die "Couldn't open $filename: $!. Aborting."; local $/; - return scalar <$fh>; + my $content = <$fh>; + $fh->close; + return $content; } |