1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Clean up Perl code according to perlcritic

Fix all perlcritic warnings of severity level 5, except in
src/backend/utils/Gen_dummy_probes.pl, which is automatically generated.

Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
This commit is contained in:
Peter Eisentraut
2017-03-26 22:24:13 -04:00
parent de4da168d5
commit facde2a98f
41 changed files with 360 additions and 358 deletions

View File

@@ -53,8 +53,8 @@ my $comment = 0;
my $non_term_id = '';
my $cc = 0;
open GRAM, $parser or die $!;
while (<GRAM>)
open my $parser_fh, '<', $parser or die $!;
while (<$parser_fh>)
{
if (/^%%/)
{
@@ -145,7 +145,7 @@ while (<GRAM>)
}
}
close GRAM;
close $parser_fh;
if ($verbose)
{
print "$cc rules loaded\n";
@@ -154,8 +154,8 @@ if ($verbose)
my $ret = 0;
$cc = 0;
open ECPG, $filename or die $!;
while (<ECPG>)
open my $ecpg_fh, '<', $filename or die $!;
while (<$ecpg_fh>)
{
if (!/^ECPG:/)
{
@@ -170,7 +170,7 @@ while (<ECPG>)
$ret = 1;
}
}
close ECPG;
close $ecpg_fh;
if ($verbose)
{