]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/CmdIPC4.pm
lei: move to v5.12 to avoid "use strict"
[public-inbox.git] / lib / PublicInbox / CmdIPC4.pm
index c3a7f56ec7e3f356243d270447402aa3217c499a..e368d0324199d1db9617838d8b7d0f4ed874f4bf 100644 (file)
@@ -1,12 +1,11 @@
-# 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>
 
 # callers should use PublicInbox::CmdIPC4->can('send_cmd4') (or recv_cmd4)
 # first choice for script/lei front-end and 2nd choice for lei backend
 # libsocket-msghdr-perl is in Debian but not many other distros as of 2021.
 package PublicInbox::CmdIPC4;
-use strict;
-use v5.10.1;
+use v5.12;
 use Socket qw(SOL_SOCKET SCM_RIGHTS);
 BEGIN { eval {
 require Socket::MsgHdr; # XS
@@ -32,7 +31,7 @@ no warnings 'once';
 *recv_cmd4 = sub ($$$) {
        my ($s, undef, $len) = @_; # $_[1] = destination buffer
        my $mh = Socket::MsgHdr->new(buflen => $len, controllen => 256);
-       my $r = Socket::MsgHdr::recvmsg($s, $mh, 0) // return ($_[1] = undef);
+       my $r = Socket::MsgHdr::recvmsg($s, $mh, 0) // return (undef);
        $_[1] = $mh->buf;
        return () if $r == 0;
        my (undef, undef, $data) = $mh->cmsghdr;