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>
$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);