From: Jason Boyer Date: Tue, 15 Sep 2020 12:50:26 +0000 (-0400) Subject: LP1895660: Silence Perl Warnings X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=87f86d8404c1335765f89df25ad6af39af84f19c;p=evergreen%2Fpines.git LP1895660: Silence Perl Warnings There are many perl warnings in make check and the day-to-day logs when using Evergreen. This branch aims to address the warnings and to make reviewing easier each file will be individually committed with a small rationale for the changes though it is assumed that this branch will be largely squashed away if / when committed. Booking.pm: Possible precedence issue with control flow operator The precedence of 'or' is significantly lower than '||', so much so that it can be less than the precedence for assignments. Replace 'or' with '||' since they're equivalent in this case anyway, and also add parens for flavor. Signed-off-by: Jason Boyer Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm index c01db43442..f396de7c1e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Booking.pm @@ -1274,7 +1274,7 @@ sub get_captured_reservations { return $patron; }, "ready" => sub { - return $e->search_booking_reservation([ + return ($e->search_booking_reservation([ { "usr" => $patron->id, "capture_time" => {"!=" => undef}, @@ -1283,10 +1283,10 @@ sub get_captured_reservations { "cancel_time" => undef }, $bresv_flesh - ]) or $e->die_event; + ]) || $e->die_event); }, "out" => sub { - return $e->search_booking_reservation([ + return ($e->search_booking_reservation([ { "usr" => $patron->id, "pickup_time" => {"!=" => undef}, @@ -1294,17 +1294,17 @@ sub get_captured_reservations { "cancel_time" => undef }, $bresv_flesh - ]) or $e->die_event; + ]) || $e->die_event); }, "in" => sub { - return $e->search_booking_reservation([ + return ($e->search_booking_reservation([ { "usr" => $patron->id, "return_time" => {">=" => "today"}, "cancel_time" => undef }, $bresv_flesh - ]) or $e->die_event; + ]) || $e->die_event); } };