From 5ef524f950272f19a574746e4a26df324c9b629e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 20 Aug 2021 08:43:01 +0000 Subject: [PATCH] Bug 28883: [OPTIONAL] (follow-up) Should we force scalar context within map? Content-Type: text/plain; charset=utf-8 Currently, this does not seem necessary. Somehow it feels better imo. Signed-off-by: Marcel de Rooy --- Koha/Objects.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Objects.pm b/Koha/Objects.pm index 86de594469..e56378b684 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -528,7 +528,7 @@ wraps the DBIC object in a corresponding Koha object sub _wrap { my ( $self, @dbic_rows ) = @_; - my @objects = map { $self->object_class->_new_from_dbic( $_ ) } @dbic_rows; + my @objects = map { scalar $self->object_class->_new_from_dbic( $_ ) } @dbic_rows; return @objects; } -- 2.20.1