diff options
author | Andy Lester | 2010-03-05 22:32:28 +0000 |
---|---|---|
committer | Andy Lester | 2010-03-05 22:32:28 +0000 |
commit | 6bd83bad13bd3b57629dc0103b0039b683102534 (patch) | |
tree | 215fd7fe508a3061fecb5501fcaa9c50b17a68bf /check_postgres.pl | |
parent | 3a103ae6350190e792477de52e2c667ff5203d6b (diff) |
Added some temporary variables so vim's syntax highlighting doesn't freak
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 4a8d4b4af..f9d4d7521 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1051,9 +1051,11 @@ sub add_response { push @{$type->{''}} => [$msg, length $nohost > 1 ? $nohost : '']; return; } + my $dbservice = $db->{dbservice}; + my $dbname = $db->{dbname}; my $header = sprintf q{%s%s%s}, - $action_info->{$action}[0] ? '' : (defined $db->{dbservice} and length $db->{dbservice}) ? - qq{service=$db->{dbservice} } : qq{DB "$db->{dbname}" }, + $action_info->{$action}[0] ? '' : (defined $dbservice and length $dbservice) ? + qq{service=$dbservice } : qq{DB "$dbname" }, $db->{host} eq '<none>' ? '' : qq{(host:$db->{host}) }, defined $db->{port} ? ($db->{port} eq $opt{defaultport} ? '' : qq{(port=$db->{port}) }) : ''; $header =~ s/\s+$//; |