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
parent
0f9ea1f720
commit
d55d06ea88
5
t/img.t
5
t/img.t
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue