From 7d8e0cab70128e271f7cfcc321cf67c6b1027aa2 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 18 Jun 2013 12:17:40 -0400 Subject: [PATCH] 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 --- .../perlmods/lib/OpenILS/Application/Search/Biblio.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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); } -- 2.43.2