From c008654229a9a693840ed30fadf6930bcd633b71 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 26 Nov 2016 08:52:50 +0000 Subject: avoid IO::File for anonymous temporary files 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. --- t/httpd-corner.t | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 't/httpd-corner.t') 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); -- cgit v1.2.3-24-ge0c7