about summary refs log tree commit homepage
path: root/lib/PublicInbox/GitHTTPBackend.pm
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 /lib/PublicInbox/GitHTTPBackend.pm
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 'lib/PublicInbox/GitHTTPBackend.pm')
-rw-r--r--lib/PublicInbox/GitHTTPBackend.pm4
1 files changed, 2 insertions, 2 deletions
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;