]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
use v5.12 for various network client-side packages
authorEric Wong <e@80x24.org>
Mon, 13 Mar 2023 19:38:25 +0000 (19:38 +0000)
committerEric Wong <e@80x24.org>
Tue, 14 Mar 2023 20:51:00 +0000 (20:51 +0000)
None of these are affected by the Perl unicode_strings feature,
so they can `use v5.12' safely

lib/PublicInbox/GitCredential.pm
lib/PublicInbox/NetNNTPSocks.pm
lib/PublicInbox/NetReader.pm
lib/PublicInbox/NetWriter.pm
lib/PublicInbox/URIimap.pm
lib/PublicInbox/URInntps.pm

index b18bba1ec32454b29a03339a54c2ed53b17c008c..10114a10bb347decab3871c8e43f325e3b111027 100644 (file)
@@ -1,7 +1,9 @@
-# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+
+# git-credential wrapper with built-in .netrc fallback
 package PublicInbox::GitCredential;
-use strict;
+use v5.12;
 use PublicInbox::Spawn qw(popen_rd);
 
 sub run ($$;$) {
@@ -19,7 +21,7 @@ sub run ($$;$) {
 
        my $out = '';
        for my $k (qw(url protocol host username password)) {
-               defined(my $v = $self->{$k}) or next;
+               my $v = $self->{$k} // next;
                die "`$k' contains `\\n' or `\\0'\n" if $v =~ /[\n\0]/;
                $out .= "$k=$v\n";
        }
index 8495204a4cd2314780cce2a5d14ce507c5e12424..fcd2e58038266b4a3f77e09b349194d26981da62 100644 (file)
@@ -1,10 +1,9 @@
-# Copyright (C) 2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # wrap Net::NNTP client with SOCKS support
 package PublicInbox::NetNNTPSocks;
-use strict;
-use v5.10.1;
+use v5.12;
 use Net::NNTP;
 our %OPT;
 our @ISA = qw(IO::Socket::Socks);
index 4de2583e00ddeb307aea560da2b9070e3dadf99c..6802fa72c5332871b979c24207ad442479bbd128 100644 (file)
@@ -3,8 +3,7 @@
 
 # common reader code for IMAP and NNTP (and maybe JMAP)
 package PublicInbox::NetReader;
-use strict;
-use v5.10.1;
+use v5.12;
 use parent qw(Exporter PublicInbox::IPC);
 use PublicInbox::Eml;
 use PublicInbox::Config;
index 4a1f34f63c458a5733d58569c8b0c6a945678adf..7917ef891434103f395e1b0fd5a13391fbdafcf4 100644 (file)
@@ -1,10 +1,9 @@
-# Copyright (C) 2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # common writer code for IMAP (and later, JMAP)
 package PublicInbox::NetWriter;
-use strict;
-use v5.10.1;
+use v5.12;
 use parent qw(PublicInbox::NetReader);
 use PublicInbox::Smsg;
 use PublicInbox::MsgTime qw(msg_timestamp);
index 816449143e75bc10e0fe4e99fc1ab19aa01663f5..41c2842a1a81806c9efa44f3e12d3a03891165f2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 # cf. RFC 5092, which the `URI' package doesn't support
 #
@@ -11,8 +11,7 @@
 #
 # RFC 2192 also describes ";TYPE=<list_type>"
 package PublicInbox::URIimap;
-use strict;
-use v5.10.1;
+use v5.12;
 use URI::Split qw(uri_split uri_join); # part of URI
 use URI::Escape qw(uri_unescape uri_escape);
 use overload '""' => \&as_string;
index 231b247b71d4d5746d2f18a8682f2d57741f4ee9..88c8d64121ca7a5d384c3772f3d12de2cfc6a4a8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2021 all contributors <meta@public-inbox.org>
+# Copyright (C) all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # deal with the lack of URI::nntps in upstream URI.
@@ -6,7 +6,7 @@
 # cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983419
 # Fixed in URI 5.08, we can drop this by 2035 when LTS distros all have it
 package PublicInbox::URInntps;
-use strict;
+use v5.12;
 use parent qw(URI::snews);
 use URI;