From d8017ec70f07938415805361e12b4e2ee1fe0fd0 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 8 Nov 2019 22:50:04 +0100 Subject: [PATCH] TT#69200 Use none() instead of comparin $mode with each value Change-Id: Ib13f0ff01e9665feabb78aac08c14e5276c08cf7 (cherry picked from commit c5522cdc8bbf4e317ffc6d0ca649b477327ba4d2) --- lib/NGCP/BulkProcessor/Array.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NGCP/BulkProcessor/Array.pm b/lib/NGCP/BulkProcessor/Array.pm index 5aed82d..9c3c3cb 100644 --- a/lib/NGCP/BulkProcessor/Array.pm +++ b/lib/NGCP/BulkProcessor/Array.pm @@ -3,7 +3,7 @@ use strict; ## no critic -use List::Util qw(any uniq); +use List::Util qw(any none uniq); use NGCP::BulkProcessor::Table; @@ -256,7 +256,7 @@ sub array_to_map { $get_value_code = sub { return shift; }; } $mode = lc $mode; - if (not ($mode eq 'group' or $mode eq 'first' or $mode eq 'last')) { + if (none { $mode eq $_ } qw(group first last)) { $mode = 'group'; } foreach my $item (@{$array_ptr}) {