diff options
author | Simon McVittie <smcv@debian.org> | 2014-09-01 08:40:54 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2014-09-01 08:40:54 +0100 |
commit | d55d06ea886bf9f212e6d83301800b1176cee60d (patch) | |
tree | 2470d063fbe7a5f47d2f3cfd6b9911408d3da116 /t/img.t | |
parent | 0f9ea1f720e0899f325ad3a9a923ee2b7bc2a038 (diff) | |
download | ikiwiki-d55d06ea886bf9f212e6d83301800b1176cee60d.tar ikiwiki-d55d06ea886bf9f212e6d83301800b1176cee60d.tar.gz |
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.
Diffstat (limited to 't/img.t')
-rwxr-xr-x | t/img.t | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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"); |