From d0406b42d531eb2106abea364d9ed4e12293dbe6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 27 Nov 2024 02:35:17 +0000 Subject: [PATCH] xapcmd: suppress opendir + my usage warning Apparently perl gets confused here regardless of autodie, so we add a parenthese around the subroutine call to disambiguate. This only appears to happen when the target directory name is a scalar variable and not if it's a constant and when the result of opendir isn't explicitly checked. --- lib/PublicInbox/Xapcmd.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Xapcmd.pm b/lib/PublicInbox/Xapcmd.pm index 4af50ea81..2ec0c073c 100644 --- a/lib/PublicInbox/Xapcmd.pm +++ b/lib/PublicInbox/Xapcmd.pm @@ -217,7 +217,7 @@ sub prepare_run { PublicInbox::Syscall::nodatacow_dir($wip->dirname); push @queue, [ $old, $wip ]; } elsif (defined $old) { - opendir my $dh, $old; + opendir(my $dh, $old); my @old_shards; while (defined(my $dn = readdir($dh))) { if ($dn =~ /\A[0-9]+\z/) { -- 2.47.3