From 4d45bd575569880676a212655d3d747f368697e4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 31 Jul 2018 08:21:00 -0300 Subject: [PATCH] Bug 19604: Fix perlcritic "Loop iterator is not lexical" Loop iterator is not lexical at line 318, column 13. See page 108 of PBP. (Severity: 5) Signed-off-by: Tomas Cohen Arazi --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index 5d7136ca6d..4e6a6e98b3 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -315,8 +315,8 @@ sub build_authorities_query { # regular wordlist stuff # push @query_parts, { match => {$wh => { query => $val, operator => 'and' }} }; my @values = split(' ',$val); - foreach $val (@values) { - push @query_parts, { wildcard => { "$wh.phrase" => "*" . lc $val . "*" } }; + foreach my $v (@values) { + push @query_parts, { wildcard => { "$wh.phrase" => "*" . lc $v . "*" } }; } } } -- 2.39.5