From: Greg Sabino Mullane Date: Wed, 9 Oct 2013 18:14:05 +0000 (-0400) Subject: 'no warnings' makes Perl::Critic cry. Try a different way. X-Git-Tag: 2.22.0~37 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=850caee4cefb10dc0d5198e070ee24d131c3c6b7;p=check_postgres.git 'no warnings' makes Perl::Critic cry. Try a different way. --- 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'); }