From d79be06a8cf9f0de4a71f15bcd64f1b1e72f0665 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Mon, 14 Jul 2014 16:28:27 +0100 Subject: [PATCH] Bug 12573: Use correct comparison for comparing strings Perl issues a warning when you try to do a numeric comparison on non numeric values. While in 99% of the caeses numeric and string comparison behave similarly when they dont tracking down resulting bugs is hard. Also we dont want to be logging errors for normal operations. replace numeric == with eq (also switched to non-interpolating quotes so we dont generate a warning from static code checkers like perlcritic) --- authorities/blinddetail-biblio-search.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorities/blinddetail-biblio-search.pl b/authorities/blinddetail-biblio-search.pl index c6a3042..16732c8 100755 --- a/authorities/blinddetail-biblio-search.pl +++ b/authorities/blinddetail-biblio-search.pl @@ -86,7 +86,7 @@ if ($authid) { # Get all values for each distinct subfield my %subfields; for ( $field->subfields ) { - next if $_->[0] == "9"; # $9 will be set with authid value + next if $_->[0] eq '9'; # $9 will be set with authid value my $letter = $_->[0]; next if defined $subfields{$letter}; my @values = $field->subfield($letter); -- 1.9.3