diff options
| author | Michael Paquier <michael@paquier.xyz> | 2023-01-19 10:02:10 +0900 |
|---|---|---|
| committer | Michael Paquier <michael@paquier.xyz> | 2023-01-19 10:02:10 +0900 |
| commit | efd2474ab5b40778722054659e52254840773f95 (patch) | |
| tree | 585ea70f2a93d762dacd63bdebbefc32607b292a | |
| parent | 1b62971bbc3163bbe31346846bc511386f6808cd (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/K@paquier.xyz
Backpatch-through: 11
| -rw-r--r-- | src/bin/psql/create_help.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl index 83324239740..339884102ee 100644 --- a/src/bin/psql/create_help.pl +++ b/src/bin/psql/create_help.pl @@ -41,7 +41,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"; @@ -93,7 +93,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; @@ -216,4 +216,4 @@ print $hfile_handle " close $cfile_handle; close $hfile_handle; -closedir DIR; +closedir $dh; |
