mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +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:
@@ -25,7 +25,7 @@ my $filename = shift;
|
||||
# Suck in the whole file.
|
||||
local $/ = undef;
|
||||
my $cfile;
|
||||
open($cfile, $filename) || die "opening $filename for reading: $!";
|
||||
open($cfile, '<', $filename) || die "opening $filename for reading: $!";
|
||||
my $ccode = <$cfile>;
|
||||
close($cfile);
|
||||
|
||||
@@ -45,7 +45,7 @@ $ccode =~ s|(struct yyguts_t \* yyg = \(struct yyguts_t\*\)yyscanner; /\* This v
|
||||
|s;
|
||||
|
||||
# Write the modified file back out.
|
||||
open($cfile, ">$filename") || die "opening $filename for writing: $!";
|
||||
open($cfile, '>', $filename) || die "opening $filename for writing: $!";
|
||||
print $cfile $ccode;
|
||||
close($cfile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user