X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FTmpfile.pm;h=3040dd77d457d02f4517088edcad4f4cf858228f;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=05f359d844cb0fc8f74ca9af461ff928405ae39e;hpb=55b707d788ce13696e4411389583e720ea6dab01;p=public-inbox.git diff --git a/lib/PublicInbox/Tmpfile.pm b/lib/PublicInbox/Tmpfile.pm index 05f359d8..3040dd77 100644 --- a/lib/PublicInbox/Tmpfile.pm +++ b/lib/PublicInbox/Tmpfile.pm @@ -1,9 +1,9 @@ -# Copyright (C) 2019 all contributors +# Copyright (C) 2019-2021 all contributors # License: AGPL-3.0+ package PublicInbox::Tmpfile; use strict; -use warnings; -use base qw(Exporter); +use v5.10.1; +use parent qw(Exporter); our @EXPORT = qw(tmpfile); use Fcntl qw(:DEFAULT); use Errno qw(EEXIST); @@ -13,6 +13,9 @@ use File::Spec; # unlinked filename which makes sense when viewed with lsof # (at least on Linux) # And if we ever stop caring to have debuggable filenames, O_TMPFILE :) +# +# This is also for Perl <5.32 which lacks: open(..., '+>>', undef) +# sub tmpfile ($;$$) { my ($id, $sock, $append) = @_; if (defined $sock) {