Bug 17447: %opt is unused
authorMark Tompsett <mtompset@hotmail.com>
Fri, 30 Dec 2016 15:12:24 +0000 (10:12 -0500)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 13 Jan 2017 11:37:01 +0000 (11:37 +0000)
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 <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
misc/batchRebuildItemsTables.pl

index a18e321..9e38757 100755 (executable)
@@ -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{};
 }