From 20bdf110ce92055ba423e3cf3a52b05efaef0b8e 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 --- 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 28b1cd93baf..02112a7a785 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 5d412dc7deb..2fd01c773de 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 93fa49503e7..3a59f6bdb02 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 092d8fd2958..47f5c455b94 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 62bcfced9e4..6c9473efd86 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 df330ad3aad..a3edd4db435 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 cf9765fc262..a1fc818f783 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.20.1