From 3371b08123ad5848ee6202c1ac8609276c46f9a1 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 30 Dec 2016 10:12:24 -0500 Subject: [PATCH] Bug 17447: %opt is unused Deleted the line. perlcritic -4 before and after. Before there are issues. After there is not. Also, changed function to not rely on implicit return value of last line, but explicitly stated a return. And operator changed, due to precedence issues. Signed-off-by: Mark Tompsett Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Kyle M Hall --- misc/batchRebuildItemsTables.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/batchRebuildItemsTables.pl b/misc/batchRebuildItemsTables.pl index a18e321779..9e38757d58 100755 --- a/misc/batchRebuildItemsTables.pl +++ b/misc/batchRebuildItemsTables.pl @@ -34,7 +34,6 @@ my $count = 0; my $errorcount = 0; my $starttime = gettimeofday; my @errors; -my %opt; my ( $confirm, $help, $test_parameter, $where ); GetOptions( 'c' => \$confirm, @@ -110,5 +109,5 @@ if ( scalar(@errors) > 0 ) { sub defnonull { my $var = shift; - defined $var and $var ne ""; + return defined $var && $var ne q{}; } -- 2.39.5