use readfile() instead of reinventing it

This avoids potential action-at-a-distance from locally redefining $/
but never reaching the end of the redefinition's scope.
master
Simon McVittie 2014-09-01 08:40:54 +01:00
parent 0f9ea1f720
commit d55d06ea88
1 changed files with 1 additions and 4 deletions

View File

@ -52,10 +52,7 @@ sub size($) {
}
my $outpath = "t/tmp/out/imgconversions";
open (my $outhtmlfd, "<", "$outpath.html");
local $/=undef;
my $outhtml = <$outhtmlfd>;
close $outhtmlfd;
my $outhtml = readfile("$outpath.html");
is(size("$outpath/10x-redsquare.png"), "10x10");
ok(! -e "$outpath/30x-redsquare.png");