From e98cc9c568cb365f3a211136d125e98cf1ba7bcc 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 --- Koha/Illrequest.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm index 21e94660ca..7550f38250 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