postgres.git / summary / log / commit / refs

commit    145bc5debf6fdcc1546196906ee57ae68d647921
Author:   Michael Paquier <michael@paquier.xyz>
Date:     Thu Jan 19 01:02:15 2023 +0000
First released in: 16.0, 11.19, 12.14, 13.10, 14.7, 15.2

    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


src/bin/psql/create_help.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl index 08ed03215e5..d57bd4ba1d6 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"; @@ -90,7 +90,7 @@ my $maxlen = 0; my %entries; -foreach my $file (sort readdir DIR) +foreach my $file (sort readdir $dh) { my (@cmdnames, $cmddesc, $cmdsynopsis); $file =~ /\.sgml$/ or next; @@ -210,4 +210,4 @@ print $hfile_handle " close $cfile_handle; close $hfile_handle; -closedir DIR; +closedir $dh; [parent: c94d684bf4b0]