From: Dan Scott Date: Tue, 18 Jun 2013 16:17:40 +0000 (-0400) Subject: Prevent uninit var warnings in Search/Biblio.pm X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7d8e0cab70128e271f7cfcc321cf67c6b1027aa2;p=evergreen%2Fpines.git Prevent uninit var warnings in Search/Biblio.pm The logger messages in Search/Biblio.pm throw _many_ uninitialized variable warnings. With a little care, we can prevent those warnings and return our attention to more important log messages. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 71a856350d..c8b290d5ed 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -1384,7 +1384,10 @@ sub staged_search { if $page == 0; $logger->debug("staged search: located $current_count, with estimated hits=". - $summary->{estimated_hit_count}." : visible=".$summary->{visible}.", checked=".$summary->{checked}); + ($summary->{estimated_hit_count} || "none") . + " : visible=" . ($summary->{visible} || "none") . ", checked=" . + ($summary->{checked} || "none") + ); if (defined($summary->{estimated_hit_count})) { foreach (qw/ checked visible excluded deleted /) { @@ -1618,7 +1621,9 @@ sub cache_staged_search_page { }; $logger->info("staged search: cached with key=$key, superpage=$page, estimated=". - $summary->{estimated_hit_count}.", visible=".$summary->{visible}); + ($summary->{estimated_hit_count} || "none") . + ", visible=" . ($summary->{visible} || "none") + ); $cache->put_cache($key, $data, $cache_timeout); }