Bug 32548: Replace while with map

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-03-31 14:11:55 +02:00 committed by Tomas Cohen Arazi
parent ca37cbf6ca
commit 1ba08f87f8
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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',