From 4ca96e2984bc46ebc06011dd90fa460fe795e36b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 31 Mar 2023 14:11:55 +0200 Subject: [PATCH] Bug 32548: Replace while with map Signed-off-by: Pedro Amorim --- Koha/Illrequest.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 21e94660cae..7550f38250a 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -1651,11 +1651,9 @@ sub get_notice { } my $metastring = join("\n", @metaarray); - my $illrequestattributes = {}; - my $attributes = $self->illrequestattributes; - while ( my $attribute = $attributes->next ) { - $illrequestattributes->{$attribute->type} = $attribute->value; - } + my $illrequestattributes = { + map { $_->type => $_->value } $self->illrequestattributes->as_list + }; my $letter = C4::Letters::GetPreparedLetter( module => 'ill', -- 2.30.2