From 850caee4cefb10dc0d5198e070ee24d131c3c6b7 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 9 Oct 2013 14:14:05 -0400 Subject: [PATCH] 'no warnings' makes Perl::Critic cry. Try a different way. --- check_postgres.pl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/check_postgres.pl b/check_postgres.pl index d0625bd07..fae344f66 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -6139,14 +6139,13 @@ sub check_replicate_row { if (!defined $sourcedb) { ndie msg('rep-norow', "$table.$col"); } - my $value1 = $info1->{db}[0]{slurp}[0]{c}; + my $value1 = $info1->{db}[0]{slurp}[0]{c} || ''; my $info2 = run_command($select, { dbnumber => 2 }); my $slave = 0; for my $d (@{$info2->{db}}) { $slave++; - my $value2 = $d->{slurp}[0]{c}; - no warnings 'uninitialized'; + my $value2 = $d->{slurp}[0]{c} || ''; if ($value1 ne $value2) { ndie msg('rep-notsame'); } -- 2.30.2