Skip to content

Commit f9d1796

Browse files
author
Greg Sabino Mullane
committed
Perl::Critic insipred fixes
1 parent 63689d1 commit f9d1796

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

check_postgres.pl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,7 +2263,7 @@ sub run_command {
22632263
$ENV{PGSERVICE} = $db->{dbservice};
22642264
}
22652265
else {
2266-
$db->{pname} = "port=" . ($db->{port} || $opt{defaultport}) . " host=$db->{host} db=$db->{dbname} user=$db->{dbuser}";
2266+
$db->{pname} = 'port=' . ($db->{port} || $opt{defaultport}) . " host=$db->{host} db=$db->{dbname} user=$db->{dbuser}";
22672267
}
22682268

22692269
## If all we want is a connection string, give it and leave now
@@ -4751,7 +4751,7 @@ sub check_hot_standby_delay {
47514751

47524752
# Check if master is online (e.g. really a master)
47534753
for my $x (1..2) {
4754-
my $info = run_command($SQL, { dbnumber => $x, regex => qr(t|f) });
4754+
my $info = run_command($SQL, { dbnumber => $x, regex => qr([tf]) });
47554755

47564756
for $db (@{$info->{db}}) {
47574757
my $status = $db->{slurp}[0];
@@ -5550,18 +5550,19 @@ sub check_pgagent_jobs {
55505550
next;
55515551
}
55525552

5553-
my ($is_crit, @msg);
5553+
my ($is_critical, @msg);
55545554
my $log_id = -1;
55555555
for my $step (@rows) {
55565556
my $output = $step->{jsloutput} || '(NO OUTPUT)';
55575557
push @msg => "$step->{jslresult} $step->{jobname}/$step->{jstname}: $output";
5558-
$is_crit ||= $step->{critical};
5558+
$is_critical ||= $step->{critical};
55595559
}
55605560

55615561
(my $msg = join '; ' => @msg) =~ s{\r?\n}{ }g;
5562-
if ($is_crit) {
5562+
if ($is_critical) {
55635563
add_critical $msg;
5564-
} else {
5564+
}
5565+
else {
55655566
add_warning $msg;
55665567
}
55675568
}

t/02_disk_space.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use CP_Testing;
1212

1313
# df might fail in chroot environments, e.g. on build daemons where
1414
# check-postgres packages are built
15-
system "df > /dev/null 2>&1";
15+
system q{df > /dev/null 2>&1};
1616
if ($?) {
1717
plan skip_all => 'Skipping disk_space tests because df does not work';
1818
} else {

t/02_last_vacuum.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $t = qq{$S exclude rules work};
6161
$cp->drop_table_if_exists($testtbl);
6262
$dbh->do(qq{CREATE TABLE $testtbl AS SELECT 123::INTEGER AS a FROM generate_series(1,200000)});
6363
$dbh->commit();
64-
like ($cp->run("-w 0 --exclude=~.*"),
64+
like ($cp->run(q{-w 0 --exclude=~.*}),
6565
qr{No matching tables found due to exclusion}, $t);
6666

6767
$t = qq{$S sees a recent VACUUM};

0 commit comments

Comments
 (0)