1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +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

@ -20,8 +20,8 @@ chdir "../../.." if (-d "../../../src/tools/msvc");
my $topdir = getcwd();
my $tmp_installdir = "$topdir/tmp_install";
require 'src/tools/msvc/config_default.pl';
require 'src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
do 'src/tools/msvc/config_default.pl';
do 'src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
# buildenv.pl is for specifying the build environment settings
# it should contain lines like:
@ -29,7 +29,7 @@ require 'src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
if (-e "src/tools/msvc/buildenv.pl")
{
require "src/tools/msvc/buildenv.pl";
do "src/tools/msvc/buildenv.pl";
}
my $what = shift || "";
@ -505,8 +505,8 @@ sub upgradecheck
sub fetchRegressOpts
{
my $handle;
open($handle, "<GNUmakefile")
|| open($handle, "<Makefile")
open($handle, '<', "GNUmakefile")
|| open($handle, '<', "Makefile")
|| die "Could not open Makefile";
local ($/) = undef;
my $m = <$handle>;
@ -521,8 +521,9 @@ sub fetchRegressOpts
# an unhandled variable reference. Ignore anything that isn't an
# option starting with "--".
@opts = grep {
s/\Q$(top_builddir)\E/\"$topdir\"/;
$_ !~ /\$\(/ && $_ =~ /^--/
my $x = $_;
$x =~ s/\Q$(top_builddir)\E/\"$topdir\"/;
$x !~ /\$\(/ && $x =~ /^--/
} split(/\s+/, $1);
}
if ($m =~ /^\s*ENCODING\s*=\s*(\S+)/m)
@ -540,8 +541,8 @@ sub fetchTests
{
my $handle;
open($handle, "<GNUmakefile")
|| open($handle, "<Makefile")
open($handle, '<', "GNUmakefile")
|| open($handle, '<', "Makefile")
|| die "Could not open Makefile";
local ($/) = undef;
my $m = <$handle>;