diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-03-26 22:24:13 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-03-27 08:18:22 -0400 |
commit | facde2a98f0b5f7689b4e30a9e7376e926e733b8 (patch) | |
tree | ab8b2cc1b2bd47b7db5e2def26d8eca4ce6ca438 /src/test/perl/PostgresNode.pm | |
parent | de4da168d57de812bb30d359394b7913635d21a9 (diff) | |
download | postgresql-facde2a98f0b5f7689b4e30a9e7376e926e733b8.tar.gz postgresql-facde2a98f0b5f7689b4e30a9e7376e926e733b8.zip |
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>
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r-- | src/test/perl/PostgresNode.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 5ef007f7d44..1ad8f7fc1cd 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -347,7 +347,7 @@ sub set_replication_conf $self->host eq $test_pghost or die "set_replication_conf only works with the default host"; - open my $hba, ">>$pgdata/pg_hba.conf"; + open my $hba, '>>', "$pgdata/pg_hba.conf"; print $hba "\n# Allow replication (set up by PostgresNode.pm)\n"; if ($TestLib::windows_os) { @@ -399,7 +399,7 @@ sub init @{ $params{extra} }); TestLib::system_or_bail($ENV{PG_REGRESS}, '--config-auth', $pgdata); - open my $conf, ">>$pgdata/postgresql.conf"; + open my $conf, '>>', "$pgdata/postgresql.conf"; print $conf "\n# Added by PostgresNode.pm\n"; print $conf "fsync = off\n"; print $conf "log_line_prefix = '%m [%p] %q%a '\n"; @@ -820,7 +820,7 @@ sub _update_pid # If we can open the PID file, read its first line and that's the PID we # want. If the file cannot be opened, presumably the server is not # running; don't be noisy in that case. - if (open my $pidfile, $self->data_dir . "/postmaster.pid") + if (open my $pidfile, '<', $self->data_dir . "/postmaster.pid") { chomp($self->{_pid} = <$pidfile>); print "# Postmaster PID for node \"$name\" is $self->{_pid}\n"; @@ -1357,7 +1357,7 @@ sub lsn chomp($result); if ($result eq '') { - return undef; + return; } else { |