From a073b5a441576e3348391669a6e6ea94a304a5ce Mon Sep 17 00:00:00 2001
From: Mike Rylander <mrylander@gmail.com>
Date: Tue, 1 Aug 2017 12:34:11 -0400
Subject: [PATCH] LP#1707549: Remove Perl 5.24+ syntax restriction

Quoth the Perl docs: "An experimental feature added in Perl 5.14 allowed each,
keys, push, pop, shift, splice, unshift, and values to be called with a scalar
argument. This experiment is considered unsuccessful, and has been removed.
The postderef feature may meet your needs better."

The specific instance here was probably just a typo or thinko the did the
right thing on Perls "of a certain age" ... so, we fix that here, now.

To test:

[1] Upon applying the patch, verify that Perl 5.24+ will successfully
    compile metabib.pm, that the open-ils.storage service will
    start up, and that catalog searches continue to work.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
---
 .../src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
index 92ba04c546..d8a65c1488 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
@@ -3186,7 +3186,7 @@ sub query_parser_fts_wrapper {
     $top_org ||= actor::org_unit->search( { parent_ou => undef } )->next;
 
     my $base_query = $args{query} || '';
-    if (scalar(keys($args{searches}))) {
+    if (scalar(keys(%{$args{searches}}))) {
         $log->debug("Constructing QueryParser query from staged search hash ...", DEBUG);
         for my $sclass ( keys %{$args{searches}} ) {
             $log->debug(" --> staged search key: $sclass --> term: $args{searches}{$sclass}{term}", DEBUG);
-- 
2.11.0