From 1ba08f87f8bf5fed31c951736e3d941ef1c9e0c8 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 Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- Koha/Illrequest.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 7e2aaaafb6..4af4aa8c75 100644 --- a/Koha/Illrequest.pm +++ b/Koha/Illrequest.pm @@ -1700,11 +1700,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.39.5