about summary refs log tree commit homepage
path: root/t/httpd-corner.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-11-26 08:52:50 +0000
committerEric Wong <e@80x24.org>2016-11-26 08:52:50 +0000
commitc008654229a9a693840ed30fadf6930bcd633b71 (patch)
treedffade86b539d195c04f312c8e3705251e0e0e42 /t/httpd-corner.t
parent57024ca2ae548a103dae12efaaf2f852d2c47e0e (diff)
downloadpublic-inbox-c008654229a9a693840ed30fadf6930bcd633b71.tar.gz
We do not need to import IO::File into the main programs
since Perl 5.8+ supports literal "undef" for generating
anonymous temporary file handles.
Diffstat (limited to 't/httpd-corner.t')
-rw-r--r--t/httpd-corner.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index 1e8465c2..8a0337c2 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -243,7 +243,6 @@ my $check_self = sub {
 
 SKIP: {
         use POSIX qw(dup2);
-        use IO::File;
         my $have_curl = 0;
         foreach my $p (split(':', $ENV{PATH})) {
                 -x "$p/curl" or next;
@@ -255,7 +254,7 @@ SKIP: {
         my $url = 'http://' . $sock->sockhost . ':' . $sock->sockport . '/sha1';
         my ($r, $w);
         pipe($r, $w) or die "pipe: $!";
-        my $tout = IO::File->new_tmpfile or die "new_tmpfile: $!";
+        open(my $tout, '+>', undef) or die "open temporary file: $!";
         my $pid = fork;
         defined $pid or die "fork: $!";
         my @cmd = (qw(curl --tcp-nodelay --no-buffer -T- -HExpect: -sS), $url);