From: Lebbeous Fogle-Weekley Date: Tue, 21 Aug 2012 18:36:32 +0000 (-0400) Subject: Fix subtle Perl issue X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=34bd56e3e7fe0123f1fa1d0dc1951a1dc5086d34;p=evergreen%2Fequinox.git Fix subtle Perl issue Not a syntax error that the compiler will catch, but see "perldoc -f do" which will lead you do "perldoc perlsyn" Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm index ecac93f0e9..d7942383e4 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/URLVerify.pm @@ -681,7 +681,8 @@ sub _get_all_search_results { my $count; my $so_far = 0; - do { + LOOP: { do { # Fun fact: you cannot "last" out of a do/while in Perl + # unless you wrap it another loop structure. my $search = $session->search . " offset(".scalar(@result_ids).")"; my $res = $U->simplereq( @@ -707,7 +708,7 @@ sub _get_all_search_results { last unless @this_batch; # Protect against getting fewer results # than count promised. - } while ($count - scalar(@result_ids) > 0); + } while ($count - scalar(@result_ids) > 0); } } return (undef, @result_ids);