From: Andy Lester Date: Fri, 5 Mar 2010 22:32:28 +0000 (-0600) Subject: Added some temporary variables so vim's syntax highlighting doesn't freak X-Git-Tag: 2.15.1~48^2~12 X-Git-Url: http://git.postgresql.org/gitweb/static/main.js?a=commitdiff_plain;h=6bd83bad13bd3b57629dc0103b0039b683102534;p=check_postgres.git Added some temporary variables so vim's syntax highlighting doesn't freak --- 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 '' ? '' : qq{(host:$db->{host}) }, defined $db->{port} ? ($db->{port} eq $opt{defaultport} ? '' : qq{(port=$db->{port}) }) : ''; $header =~ s/\s+$//;