Skip to content

Commit 1391916

Browse files
committed
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
1 parent 13764e9 commit 1391916

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/psql/create_help.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
$define =~ tr/a-z/A-Z/;
4242
$define =~ s/\W/_/g;
4343

44-
opendir(DIR, $docdir)
44+
opendir(my $dh, $docdir)
4545
or die "$0: could not open documentation source dir '$docdir': $!\n";
4646
open(my $hfile_handle, '>', $hfile)
4747
or die "$0: could not open output file '$hfile': $!\n";
@@ -93,7 +93,7 @@
9393

9494
my %entries;
9595

96-
foreach my $file (sort readdir DIR)
96+
foreach my $file (sort readdir $dh)
9797
{
9898
my ($cmdid, @cmdnames, $cmddesc, $cmdsynopsis);
9999
$file =~ /\.sgml$/ or next;
@@ -216,4 +216,4 @@
216216

217217
close $cfile_handle;
218218
close $hfile_handle;
219-
closedir DIR;
219+
closedir $dh;

0 commit comments

Comments
 (0)