From d55d06ea886bf9f212e6d83301800b1176cee60d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 1 Sep 2014 08:40:54 +0100 Subject: [PATCH] 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. --- t/img.t | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/t/img.t b/t/img.t index 088a98328..9a48cb1c5 100755 --- a/t/img.t +++ b/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"); -- 2.44.0