@@ -, +, @@ by rebase --- Koha/Biblio.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/Koha/Biblio.pm +++ a/Koha/Biblio.pm @@ -350,9 +350,11 @@ sub article_requests_finished { =head3 items +my @items = $biblio->items(); my $items = $biblio->items(); -Returns the related Koha::Items object for this biblio +Returns the related Koha::Items object for this biblio in scalar context, +or list of Koha::Item objects in list context. =cut @@ -361,9 +363,13 @@ sub items { my $items_rs = $self->_result->items; - return Koha::Items->_new_from_dbic( $items_rs ); + return + wantarray + ? Koha::Items->_new_from_dbic($items_rs)->as_list + : Koha::Items->_new_from_dbic($items_rs); } + =head3 itemtype my $itemtype = $biblio->itemtype(); --