]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/httpd-corner.t
avoid IO::File for anonymous temporary files
[public-inbox.git] / t / httpd-corner.t
index 1e8465c2ba6059846a2f7c7ebf2a0feb1d973f37..8a0337c2b5f38c34d910dead87118d379a0acefd 100644 (file)
@@ -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);