mirror of
https://github.com/postgres/postgres.git
synced 2025-05-11 05:41:32 +03:00
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
This commit is contained in:
parent
13764e9bf7
commit
1391916736
@ -41,7 +41,7 @@ my $define = $hfilebasename;
|
|||||||
$define =~ tr/a-z/A-Z/;
|
$define =~ tr/a-z/A-Z/;
|
||||||
$define =~ s/\W/_/g;
|
$define =~ s/\W/_/g;
|
||||||
|
|
||||||
opendir(DIR, $docdir)
|
opendir(my $dh, $docdir)
|
||||||
or die "$0: could not open documentation source dir '$docdir': $!\n";
|
or die "$0: could not open documentation source dir '$docdir': $!\n";
|
||||||
open(my $hfile_handle, '>', $hfile)
|
open(my $hfile_handle, '>', $hfile)
|
||||||
or die "$0: could not open output file '$hfile': $!\n";
|
or die "$0: could not open output file '$hfile': $!\n";
|
||||||
@ -93,7 +93,7 @@ my $maxlen = 0;
|
|||||||
|
|
||||||
my %entries;
|
my %entries;
|
||||||
|
|
||||||
foreach my $file (sort readdir DIR)
|
foreach my $file (sort readdir $dh)
|
||||||
{
|
{
|
||||||
my ($cmdid, @cmdnames, $cmddesc, $cmdsynopsis);
|
my ($cmdid, @cmdnames, $cmddesc, $cmdsynopsis);
|
||||||
$file =~ /\.sgml$/ or next;
|
$file =~ /\.sgml$/ or next;
|
||||||
@ -216,4 +216,4 @@ print $hfile_handle "
|
|||||||
|
|
||||||
close $cfile_handle;
|
close $cfile_handle;
|
||||||
close $hfile_handle;
|
close $hfile_handle;
|
||||||
closedir DIR;
|
closedir $dh;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user