summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2023-01-19 01:01:53 +0000
committerMichael Paquier2023-01-19 01:01:53 +0000
commit6ba6306256a37524bbbc76402e69ef3d32d355fd (patch)
treefa6381c5e199c5595d5901c470e477561d667f70
parenta3b65fb28238fe7f4a1ae9685d39ff0c11bdb9d3 (diff)
Fix failure with perlcritic in psql's create_help.pl
No buildfarm members have reported that yet, but a recently-refreshed Debian host did. Reviewed-by: Andrew Dunstan Discussion: https://postgr.es/m/Y8ey5z4Nav62g4/[email protected] Backpatch-through: 11
-rw-r--r--src/bin/psql/create_help.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl
index 2c5fed203eb..1d5366db16c 100644
--- a/src/bin/psql/create_help.pl
+++ b/src/bin/psql/create_help.pl
@@ -44,7 +44,7 @@ my $define = $hfilebasename;
$define =~ tr/a-z/A-Z/;
$define =~ s/\W/_/g;
-opendir(DIR, $docdir)
+opendir(my $dh, $docdir)
or die "$0: could not open documentation source dir '$docdir': $!\n";
open(my $hfile_handle, '>', "$outdir/$hfile")
or die "$0: could not open output file '$hfile': $!\n";
@@ -103,7 +103,7 @@ my $maxlen = 0;
my %entries;
-foreach my $file (sort readdir DIR)
+foreach my $file (sort readdir $dh)
{
my ($cmdid, @cmdnames, $cmddesc, $cmdsynopsis);
$file =~ /\.sgml$/ or next;
@@ -230,4 +230,4 @@ print $hfile_handle "
close $cfile_handle;
close $hfile_handle;
close $depfile_handle if ($depfile);
-closedir DIR;
+closedir $dh;