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. --- lib/PublicInbox/GitHTTPBackend.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/GitHTTPBackend.pm') diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm index 322005b5..1987a013 100644 --- a/lib/PublicInbox/GitHTTPBackend.pm +++ b/lib/PublicInbox/GitHTTPBackend.pm @@ -7,7 +7,7 @@ package PublicInbox::GitHTTPBackend; use strict; use warnings; use Fcntl qw(:seek); -use IO::File; +use IO::Handle; use HTTP::Date qw(time2str); use HTTP::Status qw(status_message); use Plack::Util; @@ -272,7 +272,7 @@ sub serve_smart { sub input_to_file { my ($env) = @_; - my $in = IO::File->new_tmpfile; + open(my $in, '+>', undef); unless (defined $in) { err($env, "could not open temporary file: $!"); return; -- cgit v1.2.3-24-ge0c7