From 16f19f13eb7ec8e3a7fed7b646277730af3c3fc4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 11 Mar 2022 11:37:10 -0300 Subject: [PATCH] Bug 19532: (QA follow-up) POD and import fixes This fixes some library imports and POD. To test: 1. Apply this patch 2. Run the tests => SUCCESS: No change 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: Fridolin Somers --- Koha/Biblio.pm | 2 +- Koha/Recall.pm | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index e2832c880d..0e8e477f13 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -1164,7 +1164,7 @@ sub get_marc_host { =head3 recalls - my @recalls = $biblio->recalls; + my $recalls = $biblio->recalls; Return recalls linked to this biblio diff --git a/Koha/Recall.pm b/Koha/Recall.pm index 394e74848d..c39e9b946a 100644 --- a/Koha/Recall.pm +++ b/Koha/Recall.pm @@ -21,9 +21,10 @@ use Modern::Perl; use Koha::Database; use Koha::DateUtils qw( dt_from_string ); -use Koha::Patron; -use Koha::Biblio; -use Koha::Item; +use Koha::Biblios; +use Koha::Items; +use Koha::Libraries; +use Koha::Patrons; use base qw(Koha::Object); @@ -33,7 +34,7 @@ Koha::Recall - Koha Recall Object class =head1 API -=head2 Internal methods +=head2 Class methods =cut @@ -92,8 +93,9 @@ Returns the related Koha::Library object for this recall. sub library { my ( $self ) = @_; - $self->{_library} = Koha::Libraries->find( $self->branchcode ); - return $self->{_library}; + my $library_rs = $self->_result->branch; + return unless $library_rs; + return Koha::Library->_new_from_dbic( $library_rs ); } =head3 checkout @@ -459,6 +461,8 @@ sub set_fulfilled { return $self; } +=head2 Internal methods + =head3 _type =cut -- 2.39.5