aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2023-01-19 10:02:13 +0900
committerMichael Paquier <michael@paquier.xyz>2023-01-19 10:02:13 +0900
commit22411cc77a051ffd01e9c59304d2906b29724186 (patch)
tree478b090ae55859d9cce2834d332dfa490e877644 /src
parent58393ea56ef8e75bcd60af1f88d0a81b1d8e21eb (diff)
downloadpostgresql-22411cc77a051ffd01e9c59304d2906b29724186.tar.gz
postgresql-22411cc77a051ffd01e9c59304d2906b29724186.zip
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/K@paquier.xyz Backpatch-through: 11
Diffstat (limited to 'src')
-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 d8e6671e689..2e1b1227abe 100644
--- a/src/bin/psql/create_help.pl
+++ b/src/bin/psql/create_help.pl
@@ -40,7 +40,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, '>', $hfile)
or die "$0: could not open output file '$hfile': $!\n";
@@ -91,7 +91,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;
@@ -214,4 +214,4 @@ print $hfile_handle "
close $cfile_handle;
close $hfile_handle;
-closedir DIR;
+closedir $dh;