From 3a6bb271c4324c3dfff199d0bf3cacd45387474e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 26 Jul 2021 16:41:07 +0200 Subject: [PATCH] Bug 17600: Fix other occurrences in svc Signed-off-by: Jonathan Druart --- Koha/List/Patron.pm | 12 +++++++----- svc/bib | 4 ++-- svc/checkin | 2 +- svc/import_bib | 2 +- svc/members/add_to_list | 2 +- svc/renew | 2 +- svc/report | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Koha/List/Patron.pm b/Koha/List/Patron.pm index 28b1cd93ba..02112a7a78 100644 --- a/Koha/List/Patron.pm +++ b/Koha/List/Patron.pm @@ -31,9 +31,11 @@ use Carp qw( carp croak ); use Koha::Database; -use base 'Exporter'; -our @EXPORT = ( - qw( +our (@ISA, @EXPORT_OK); +BEGIN { + require Exporter; + @ISA = qw(Exporter); + @EXPORT = qw( GetPatronLists DelPatronList @@ -42,8 +44,8 @@ our @EXPORT = ( AddPatronsToList DelPatronsFromList - ) -); + ); +} =head2 GetPatronLists diff --git a/svc/bib b/svc/bib index 5d412dc7de..2fd01c773d 100755 --- a/svc/bib +++ b/svc/bib @@ -22,8 +22,8 @@ use Modern::Perl; use CGI qw ( -utf8 ); -use C4::Auth qw/check_api_auth/; -use C4::Biblio; +use C4::Auth qw( check_api_auth ); +use C4::Biblio qw( GetFrameworkCode ); use C4::Items; use XML::Simple; diff --git a/svc/checkin b/svc/checkin index 93fa49503e..3a59f6bdb0 100755 --- a/svc/checkin +++ b/svc/checkin @@ -23,7 +23,7 @@ use Modern::Perl; use CGI; use JSON qw(to_json); -use C4::Circulation; +use C4::Circulation qw( AddReturn ); use C4::Context; use C4::Auth qw(check_cookie_auth); use Koha::Checkouts; diff --git a/svc/import_bib b/svc/import_bib index 092d8fd295..47f5c455b9 100755 --- a/svc/import_bib +++ b/svc/import_bib @@ -23,7 +23,7 @@ use Modern::Perl; use CGI qw ( -utf8 ); use C4::Auth qw/check_api_auth/; use C4::Context; -use C4::ImportBatch; +use C4::ImportBatch qw( GetWebserviceBatchId AddBiblioToBatch AddItemsToImportBiblio BatchFindDuplicates BatchCommitRecords ); use C4::Matcher; use XML::Simple; # use Carp::Always; diff --git a/svc/members/add_to_list b/svc/members/add_to_list index 62bcfced9e..6c9473efd8 100755 --- a/svc/members/add_to_list +++ b/svc/members/add_to_list @@ -22,7 +22,7 @@ use CGI; use C4::Auth qw( check_cookie_auth ); use JSON qw( to_json ); -use Koha::List::Patron; +use Koha::List::Patron qw( AddPatronList GetPatronLists AddPatronsToList ); my $input = CGI->new; diff --git a/svc/renew b/svc/renew index df330ad3aa..a3edd4db43 100755 --- a/svc/renew +++ b/svc/renew @@ -23,7 +23,7 @@ use CGI; use JSON qw(to_json); use Try::Tiny; -use C4::Circulation; +use C4::Circulation qw( AddRenewal CanBookBeRenewed ); use C4::Context; use C4::Auth qw(check_cookie_auth); diff --git a/svc/report b/svc/report index cf9765fc26..a1fc818f78 100755 --- a/svc/report +++ b/svc/report @@ -23,7 +23,7 @@ use Modern::Perl; use C4::Auth qw( get_template_and_user ); use C4::Reports::Guided qw( execute_query ); use Koha::Reports; -use JSON; +use JSON qw( encode_json decode_json ); use CGI qw ( -utf8 ); use Koha::Caches; -- 2.39.5