Bugzilla – Attachment 64466 Details for
Bug 17600
Standardize the EXPORT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17600: Standardize our EXPORT_OK
Bug-17600-Standardize-our-EXPORTOK.patch (text/plain), 41.75 KB, created by
Jonathan Druart
on 2017-06-20 19:31:04 UTC
(
hide
)
Description:
Bug 17600: Standardize our EXPORT_OK
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-06-20 19:31:04 UTC
Size:
41.75 KB
patch
obsolete
>From 14d7258b1d93843fb943e9e82f4a10e5ef9b9809 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 9 Nov 2016 12:06:44 +0000 >Subject: [PATCH] Bug 17600: Standardize our EXPORT_OK > >On bug 17591 we discovered that there was something weird going on with >the way we export and use subroutines/modules. >This patch tries to standardize our EXPORT to use EXPORT_OK only. > >That way we will need to explicitely define the subroutine we want to >use from a module. >There are still a lot of things to do, it would be good to write >a script to do what's need to be done. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth.pm | 18 ++++---- > C4/Auth_with_cas.pm | 5 +- > C4/Auth_with_ldap.pm | 6 +-- > C4/Auth_with_shibboleth.pm | 6 +-- > C4/Barcodes.pm | 7 --- > C4/Biblio.pm | 36 +++------------ > C4/Bookseller.pm | 6 --- > C4/Boolean.pm | 9 ++-- > C4/Breeding.pm | 5 +- > C4/Charset.pm | 5 +- > C4/Circulation.pm | 95 ++++++++++++++++---------------------- > C4/ClassSortRoutine.pm | 18 ++++---- > C4/ClassSource.pm | 46 +++++++++--------- > C4/CourseReserves.pm | 6 +-- > C4/External/BakerTaylor.pm | 11 +++-- > C4/HoldsQueue.pm | 2 +- > C4/ImportBatch.pm | 5 +- > C4/ImportExportFramework.pm | 5 +- > C4/InstallAuth.pm | 17 ++++--- > C4/Items.pm | 6 +-- > C4/Koha.pm | 11 ++--- > C4/Languages.pm | 8 ++-- > C4/Letters.pm | 5 +- > C4/Members.pm | 16 ++----- > C4/Members/Attributes.pm | 5 +- > C4/Members/Statistics.pm | 4 +- > C4/Output.pm | 24 +++++----- > C4/Overdues.pm | 17 +------ > C4/Reports.pm | 4 +- > C4/Reports/Guided.pm | 4 +- > C4/Reserves.pm | 8 ++-- > C4/SIP/Sip.pm | 2 +- > C4/SIP/Sip/Checksum.pm | 11 +++-- > C4/Scheduler.pm | 4 +- > C4/Search.pm | 27 +++++------ > C4/Serials.pm | 5 +- > C4/ShelfBrowser.pm | 7 +-- > C4/Tags.pm | 4 +- > C4/TmplTokenType.pm | 32 ++++++------- > C4/XISBN.pm | 4 +- > Koha/AuthUtils.pm | 9 ++-- > Koha/EDI.pm | 2 +- > Koha/Item/Search/Field.pm | 22 +++++---- > Koha/Patron/Password/Recovery.pm | 5 +- > Koha/SimpleMARC.pm | 36 +++++++-------- > Koha/Util/FrameworkPlugin.pm | 8 ---- > acqui/pdfformat/layout2pagesde.pm | 1 - > misc/translator/TmplTokenizer.pm | 5 -- > misc/translator/VerboseWarnings.pm | 34 +++++++------- > t/db_dependent/Members/IssueSlip.t | 4 +- > 50 files changed, 273 insertions(+), 369 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 9e787c0567..123525a4b0 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -25,7 +25,6 @@ use JSON qw/encode_json/; > use URI::Escape; > use CGI::Session; > >-require Exporter; > use C4::Context; > use C4::Templates; # to get the template > use C4::Languages; >@@ -41,8 +40,8 @@ use List::MoreUtils qw/ any /; > use Encode qw( encode is_utf8); > > # use utf8; >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout $shib $shib_login); >- >+use vars qw($debug $ldap $cas $caslogout $shib $shib_login); >+our (@ISA, @EXPORT_OK); > BEGIN { > sub psgi_env { any { /^psgi\./ } keys %ENV } > >@@ -51,13 +50,14 @@ BEGIN { > else { exit } > } > >- $debug = $ENV{DEBUG}; >- @ISA = qw(Exporter); >- @EXPORT = qw(&checkauth &get_template_and_user &haspermission &get_user_subpermissions); >- @EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash >- &get_all_subpermissions &get_user_subpermissions >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw( >+ &check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash >+ &get_all_subpermissions &get_user_subpermissions > ); >- %EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] ); >+ >+ $debug = $ENV{DEBUG}; > $ldap = C4::Context->config('useldapserver') || 0; > $cas = C4::Context->preference('casAuthentication'); > $shib = C4::Context->config('useshibboleth') || 0; >diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm >index b69124b0f7..e93d3dabac 100644 >--- a/C4/Auth_with_cas.pm >+++ b/C4/Auth_with_cas.pm >@@ -29,13 +29,14 @@ use FindBin; > use YAML; > > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug); >+use vars qw($debug); >+our (@ISA, @EXPORT_OK); > > BEGIN { > require Exporter; > $debug = $ENV{DEBUG}; > @ISA = qw(Exporter); >- @EXPORT = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url); >+ @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url); > } > my $defaultcasserver; > my $casservers; >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index bbb1094229..61eb78a16c 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -34,12 +34,12 @@ use List::MoreUtils qw( any ); > use Net::LDAP; > use Net::LDAP::Filter; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug); >- >+use vars qw($debug); >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( checkpw_ldap ); >+ @EXPORT_OK = qw( checkpw_ldap ); > } > > # Redefine checkpw_ldap: >diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm >index 6b20511df5..3521fbfad6 100644 >--- a/C4/Auth_with_shibboleth.pm >+++ b/C4/Auth_with_shibboleth.pm >@@ -28,13 +28,13 @@ use C4::Members::Messaging; > use Carp; > use CGI; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug); >- >+use vars qw($debug); >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > $debug = $ENV{DEBUG}; > @ISA = qw(Exporter); >- @EXPORT = >+ @EXPORT_OK = > qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib); > } > >diff --git a/C4/Barcodes.pm b/C4/Barcodes.pm >index 256a177680..dfc78bec30 100644 >--- a/C4/Barcodes.pm >+++ b/C4/Barcodes.pm >@@ -29,16 +29,9 @@ use C4::Barcodes::annual; > use C4::Barcodes::incremental; > use C4::Barcodes::EAN13; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > use vars qw($debug $cgi_debug); # from C4::Debug, of course > use vars qw($max $prefformat); > >-BEGIN { >- require Exporter; >- @ISA = qw(Exporter); >- @EXPORT_OK = qw(); >-} >- > sub _prefformat { > unless (defined $prefformat) { > unless ($prefformat = C4::Context->preference('autoBarcode')) { >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index d52d7807af..968be874ea 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -32,11 +32,12 @@ use Module::Load::Conditional qw(can_load); > use C4::Koha; > use C4::Log; # logaction > use C4::Budgets; >-use C4::ClassSource; >-use C4::Charset; >+use C4::ClassSource qw( GetClassSort ); >+use C4::Charset qw( SetUTF8Flag ); > use C4::Linker; > use C4::OAI::Sets; > use C4::Debug; >+use C4::Items; > > use Koha::Caches; > use Koha::Authority::Types; >@@ -47,9 +48,8 @@ use Koha::Holds; > use Koha::SearchEngine; > use Koha::Libraries; > >-use vars qw(@ISA @EXPORT); > use vars qw($debug $cgi_debug); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > > require Exporter; >@@ -57,12 +57,8 @@ BEGIN { > > # to add biblios > # EXPORTED FUNCTIONS. >- push @EXPORT, qw( >- &AddBiblio >- ); >- >- # to get something >- push @EXPORT, qw( >+ @EXPORT_OK = qw( >+ AddBiblio > GetBiblio > GetBiblioData > GetMarcBiblio >@@ -104,38 +100,19 @@ BEGIN { > &CountItemsIssued > &CountBiblioInOrders > &GetSubscriptionsId >- ); > >- # To modify something >- push @EXPORT, qw( > &ModBiblio > &ModZebra > &UpdateTotalIssues > &RemoveAllNsb >- ); > >- # To delete something >- push @EXPORT, qw( > &DelBiblio >- ); > >- # To link headings in a bib record >- # to authority records. >- push @EXPORT, qw( > &BiblioAutoLink > &LinkBibHeadingsToAuthorities >- ); > >- # Internal functions >- # those functions are exported but should not be used >- # they are useful in a few circumstances, so they are exported, >- # but don't use them unless you are a core developer ;-) >- push @EXPORT, qw( > &ModBiblioMarc >- ); > >- # Others functions >- push @EXPORT, qw( > &TransformMarcToKoha > &TransformHtmlToMarc > &TransformHtmlToXml >@@ -2254,7 +2231,6 @@ sub PrepHostMarcField { > my ($hostbiblionumber,$hostitemnumber, $marcflavour) = @_; > $marcflavour ||="MARC21"; > >- require C4::Items; > my $hostrecord = GetMarcBiblio($hostbiblionumber); > my $item = C4::Items::GetItem($hostitemnumber); > >diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm >index dff325ef1f..6f3c1acda9 100644 >--- a/C4/Bookseller.pm >+++ b/C4/Bookseller.pm >@@ -21,12 +21,6 @@ package C4::Bookseller; > use strict; > use warnings; > >-use base qw( Exporter ); >- >-our @EXPORT_OK = qw( >- GetBooksellersWithLateOrders >-); >- > =head1 NAME > > C4::Bookseller - Koha functions for dealing with booksellers. >diff --git a/C4/Boolean.pm b/C4/Boolean.pm >index 7ef9fc0674..8ce090a549 100644 >--- a/C4/Boolean.pm >+++ b/C4/Boolean.pm >@@ -25,9 +25,12 @@ use strict; > use warnings; > > use Carp; >-use base qw(Exporter); >- >-our @EXPORT_OK = qw( true_p); >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ @ISA = qw( Exporter ); >+ @EXPORT_OK = qw( true_p ); >+}; > > =head1 NAME > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index ee14c81d7c..e3dd9b2552 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -31,12 +31,11 @@ use C4::Languages; > use Koha::Database; > use Koha::XSLT_Handler; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth); >+ @EXPORT_OK = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth); > } > > =head1 NAME >diff --git a/C4/Charset.pm b/C4/Charset.pm >index 906321f476..6b3fbcd395 100644 >--- a/C4/Charset.pm >+++ b/C4/Charset.pm >@@ -26,12 +26,11 @@ use C4::Debug; > use Unicode::Normalize; > use Encode qw( decode encode is_utf8 ); > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > NormalizeString > IsStringUTF8ish > MarcToUTF8Record >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index a439021ba3..12b81da066 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -65,61 +65,48 @@ use Date::Calc qw( > Day_of_Week > Add_Delta_Days > ); >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); > BEGIN { >- require Exporter; >- @ISA = qw(Exporter); >- >- # FIXME subs that should probably be elsewhere >- push @EXPORT, qw( >- &barcodedecode >- &LostItem >- &ReturnLostItem >- &GetPendingOnSiteCheckouts >- ); >- >- # subs to deal with issuing a book >- push @EXPORT, qw( >- &CanBookBeIssued >- &CanBookBeRenewed >- &AddIssue >- &AddRenewal >- &GetRenewCount >- &GetSoonestRenewDate >- &GetLatestAutoRenewDate >- &GetItemIssue >- &GetIssuingCharges >- &GetBranchBorrowerCircRule >- &GetBranchItemRule >- &GetBiblioIssues >- &GetOpenIssue >- &CheckIfIssuedToPatron >- &IsItemIssued >- GetTopIssues >- ); >- >- # subs to deal with returns >- push @EXPORT, qw( >- &AddReturn >- &MarkIssueReturned >- ); >- >- # subs to deal with transfers >- push @EXPORT, qw( >- &transferbook >- &GetTransfers >- &GetTransfersFromTo >- &updateWrongTransfer >- &DeleteTransfer >- &IsBranchTransferAllowed >- &CreateBranchTransferLimit >- &DeleteBranchTransferLimits >- &TransferSlip >- ); >- >- # subs to deal with offline circulation >- push @EXPORT, qw( >+ require Exporter; >+ @ISA = qw(Exporter); >+ >+ # FIXME subs that should probably be elsewhere >+ push @EXPORT_OK, qw( >+ &barcodedecode >+ &LostItem >+ &ReturnLostItem >+ &GetPendingOnSiteCheckouts >+ >+ &CanBookBeIssued >+ &CanBookBeRenewed >+ &AddIssue >+ &AddRenewal >+ &GetRenewCount >+ &GetSoonestRenewDate >+ &GetLatestAutoRenewDate >+ &GetItemIssue >+ &GetIssuingCharges >+ &GetBranchBorrowerCircRule >+ &GetBranchItemRule >+ &GetBiblioIssues >+ &GetOpenIssue >+ &CheckIfIssuedToPatron >+ &IsItemIssued >+ GetTopIssues >+ >+ &AddReturn >+ &MarkIssueReturned >+ >+ &transferbook >+ &GetTransfers >+ &GetTransfersFromTo >+ &updateWrongTransfer >+ &DeleteTransfer >+ &IsBranchTransferAllowed >+ &CreateBranchTransferLimit >+ &DeleteBranchTransferLimits >+ &TransferSlip >+ > &GetOfflineOperations > &GetOfflineOperation > &AddOfflineOperation >diff --git a/C4/ClassSortRoutine.pm b/C4/ClassSortRoutine.pm >index d5fd8a092e..40a63da044 100644 >--- a/C4/ClassSortRoutine.pm >+++ b/C4/ClassSortRoutine.pm >@@ -20,12 +20,18 @@ package C4::ClassSortRoutine; > use strict; > use warnings; > >-require Exporter; > use Class::Factory::Util; > use C4::Context; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw( >+ &GetSortRoutineNames >+ &GetClassSortKey >+ ); >+} > > =head1 NAME > >@@ -40,12 +46,6 @@ use C4::ClassSortRoutine; > > =cut > >-@ISA = qw(Exporter); >-@EXPORT = qw( >- &GetSortRoutineNames >- &GetClassSortKey >-); >- > # initialization code > my %loaded_routines = (); > my @sort_routines = GetSortRoutineNames(); >diff --git a/C4/ClassSource.pm b/C4/ClassSource.pm >index 245f9589c6..03b6017a89 100644 >--- a/C4/ClassSource.pm >+++ b/C4/ClassSource.pm >@@ -20,12 +20,29 @@ package C4::ClassSource; > use strict; > use warnings; > >-require Exporter; > use C4::Context; >-use C4::ClassSortRoutine; >- >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+use C4::ClassSortRoutine qw( GetClassSortKey ); >+ >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw( >+ &GetClassSources >+ &AddClassSource >+ &GetClassSource >+ &ModClassSource >+ &DelClassSource >+ &GetClassSortRules >+ &AddClassSortRule >+ &GetClassSortRule >+ &ModClassSortRule >+ &DelClassSortRule >+ >+ &GetSourcesForSortRule >+ &GetClassSort >+ ); >+} > > =head1 NAME > >@@ -44,25 +61,6 @@ sources and sorting rules. > > =cut > >- >-@ISA = qw(Exporter); >-@EXPORT = qw( >- &GetClassSources >- &AddClassSource >- &GetClassSource >- &ModClassSource >- &DelClassSource >- &GetClassSortRules >- &AddClassSortRule >- &GetClassSortRule >- &ModClassSortRule >- &DelClassSortRule >- >- &GetSourcesForSortRule >- &GetClassSort >- >-); >- > =head2 GetClassSources > > my $sources = GetClassSources(); >diff --git a/C4/CourseReserves.pm b/C4/CourseReserves.pm >index 42154225b7..25e210ece4 100644 >--- a/C4/CourseReserves.pm >+++ b/C4/CourseReserves.pm >@@ -24,8 +24,8 @@ use C4::Items qw(GetItem ModItem); > use C4::Biblio qw(GetBiblioFromItemNumber); > use C4::Circulation qw(GetOpenIssue); > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG @FIELDS); >- >+use vars qw($DEBUG @FIELDS); >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >@@ -50,7 +50,7 @@ BEGIN { > > &GetItemCourseReservesInfo > ); >- %EXPORT_TAGS = ( 'all' => \@EXPORT_OK ); >+ #%EXPORT_TAGS = ( 'all' => \@EXPORT_OK ); > > $DEBUG = 0; > @FIELDS = ( 'itype', 'ccode', 'holdingbranch', 'location' ); >diff --git a/C4/External/BakerTaylor.pm b/C4/External/BakerTaylor.pm >index 99d4dd5b70..54bdd0687c 100644 >--- a/C4/External/BakerTaylor.pm >+++ b/C4/External/BakerTaylor.pm >@@ -27,14 +27,15 @@ use C4::Debug; > > use Modern::Perl; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); >+use vars qw(%EXPORT_TAGS $VERSION); >+our (@ISA, @EXPORT_OK); > > BEGIN { >- require Exporter; >- @ISA = qw(Exporter); >+ require Exporter; >+ @ISA = qw(Exporter); > $VERSION = 3.07.00.049; >- @EXPORT_OK = qw(&availability &content_cafe &image_url &link_url &http_jacket_link); >- %EXPORT_TAGS = (all=>\@EXPORT_OK); >+ @EXPORT_OK = qw(&availability &content_cafe &image_url &link_url &http_jacket_link); >+# %EXPORT_TAGS = (all=>\@EXPORT_OK); > } > > # These variables are plack safe: they are initialized each time >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 0f2ad221a2..3519205fe3 100755 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -34,7 +34,7 @@ use List::Util qw(shuffle); > use List::MoreUtils qw(any); > use Data::Dumper; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm >index 1b598c7e9d..324db68f02 100644 >--- a/C4/ImportBatch.pm >+++ b/C4/ImportBatch.pm >@@ -30,12 +30,11 @@ use C4::MarcModificationTemplates; > use Koha::Plugins::Handler; > use Koha::Logger; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > GetZ3950BatchId > GetWebserviceBatchId > GetImportRecordMarc >diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm >index bc02cca203..a5e4ebf334 100644 >--- a/C4/ImportExportFramework.pm >+++ b/C4/ImportExportFramework.pm >@@ -28,12 +28,11 @@ use C4::Context; > use C4::Debug; > > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > &ExportFramework > &ImportFramework > &createODS >diff --git a/C4/InstallAuth.pm b/C4/InstallAuth.pm >index 9c6795f829..3e009a4df6 100644 >--- a/C4/InstallAuth.pm >+++ b/C4/InstallAuth.pm >@@ -22,15 +22,20 @@ use strict; > use Digest::MD5 qw(md5_base64); > use File::Spec; > >-require Exporter; > use C4::Context; > use C4::Output; > use C4::Templates; > use C4::Koha; > use CGI::Session; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw( >+ &checkauth >+ &get_template_and_user >+ ); >+} > > =head1 NAME > >@@ -72,12 +77,6 @@ InstallAuth - Authenticates Koha users for Install process > > =cut > >-@ISA = qw(Exporter); >-@EXPORT = qw( >- &checkauth >- &get_template_and_user >-); >- > =item get_template_and_user > > my ( $template, $borrowernumber, $cookie ) = get_template_and_user( >diff --git a/C4/Items.pm b/C4/Items.pm >index 26c14a13c7..edf781a26a 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -24,7 +24,7 @@ use strict; > use Carp; > use C4::Context; > use C4::Koha; >-use C4::Biblio; >+use C4::Biblio qw( GetFrameworkCode ); > use Koha::DateUtils; > use MARC::Record; > use C4::ClassSource; >@@ -46,7 +46,7 @@ use Koha::SearchEngine; > use Koha::SearchEngine::Search; > use Koha::Libraries; > >-use vars qw(@ISA @EXPORT); >+our (@ISA, @EXPORT_OK); > > BEGIN { > >@@ -54,7 +54,7 @@ BEGIN { > @ISA = qw( Exporter ); > > # function exports >- @EXPORT = qw( >+ @EXPORT_OK = qw( > GetItem > AddItemFromMarc > AddItem >diff --git a/C4/Koha.pm b/C4/Koha.pm >index 6932293887..eee035fef1 100644 >--- a/C4/Koha.pm >+++ b/C4/Koha.pm >@@ -34,12 +34,11 @@ use Business::ISBN; > use Business::ISSN; > use autouse 'Data::cselectall_arrayref' => qw(Dumper); > use DBI qw(:sql_types); >-use vars qw(@ISA @EXPORT @EXPORT_OK $DEBUG); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > &GetPrinters &GetPrinter > &getitemtypeinfo > &GetItemTypesCategorized >@@ -63,10 +62,9 @@ BEGIN { > &GetVariationsOfISSNs > &NormalizeISSN > >- $DEBUG >+ GetDailyQuote >+ > ); >- $DEBUG = 0; >-@EXPORT_OK = qw( GetDailyQuote ); > } > > =head1 NAME >@@ -295,7 +293,6 @@ sub getImageSets { > my @imagesets = (); # list of hasrefs of image set data to pass to template > my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} ); > foreach my $imagesubdir ( @subdirectories ) { >- warn $imagesubdir if $DEBUG; > my @imagelist = (); # hashrefs of image info > my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) ); > my $imagesetactive = 0; >diff --git a/C4/Languages.pm b/C4/Languages.pm >index 5e4dabd14d..be145dd9cc 100644 >--- a/C4/Languages.pm >+++ b/C4/Languages.pm >@@ -27,18 +27,18 @@ use CGI; > use List::MoreUtils qw( any ); > use C4::Context; > use Koha::Cache::Memory::Lite; >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); >- >+use vars qw($DEBUG); >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > &getFrameworkLanguages > &getTranslatedLanguages > &getLanguages > &getAllLanguages > ); >- @EXPORT_OK = qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage); >+ push @EXPORT_OK, qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage); > $DEBUG = 0; > } > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index ada27943b0..4413e2ea91 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -38,12 +38,11 @@ use Koha::SMS::Providers; > use Koha::Email; > use Koha::DateUtils qw( format_sqldatetime dt_from_string ); > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages &GetMessageTransportTypes > ); > } >diff --git a/C4/Members.pm b/C4/Members.pm >index 6527c79a64..ead8d2525e 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -46,20 +46,19 @@ use Koha::Patrons; > use Koha::Patron::Categories; > use Koha::Schema; > >-our (@ISA,@EXPORT,@EXPORT_OK,$debug); >+our ($debug); > > use Module::Load::Conditional qw( can_load ); > if ( ! can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) { > $debug && warn "Unable to load Koha::NorwegianPatronDB"; > } > >- >+our (@ISA, @EXPORT_OK); > BEGIN { > $debug = $ENV{DEBUG} || 0; > require Exporter; > @ISA = qw(Exporter); >- #Get data >- push @EXPORT, qw( >+ @EXPORT_OK = qw( > &GetMember > > &GetPendingIssues >@@ -77,23 +76,14 @@ BEGIN { > GetBorrowersWithEmail > > GetOverduesForPatron >- ); > >- #Modify data >- push @EXPORT, qw( > &ModMember > &changepassword >- ); > >- #Insert data >- push @EXPORT, qw( > &AddMember > &AddMember_Auto > &AddMember_Opac >- ); > >- #Check data >- push @EXPORT, qw( > &checkuniquemember > &checkuserpassword > &Check_Userid >diff --git a/C4/Members/Attributes.pm b/C4/Members/Attributes.pm >index ab43a7cb32..ca11abb1da 100644 >--- a/C4/Members/Attributes.pm >+++ b/C4/Members/Attributes.pm >@@ -24,16 +24,15 @@ use Text::CSV; # Don't be tempted to use Text::CSV::Unicode -- even in bina > use C4::Context; > use C4::Members::AttributeTypes; > >-use vars qw(@ISA @EXPORT_OK @EXPORT %EXPORT_TAGS); > our ($csv, $AttributeTypes); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > @ISA = qw(Exporter); > @EXPORT_OK = qw(GetBorrowerAttributes GetBorrowerAttributeValue CheckUniqueness SetBorrowerAttributes > DeleteBorrowerAttribute UpdateBorrowerAttribute > extended_attributes_code_value_arrayref extended_attributes_merge > SearchIdMatchingAttribute); >- %EXPORT_TAGS = ( all => \@EXPORT_OK ); >+# %EXPORT_TAGS = ( all => \@EXPORT_OK ); > } > > =head1 NAME >diff --git a/C4/Members/Statistics.pm b/C4/Members/Statistics.pm >index 23771c16d4..161063a2df 100644 >--- a/C4/Members/Statistics.pm >+++ b/C4/Members/Statistics.pm >@@ -26,14 +26,14 @@ use Modern::Perl; > > use C4::Context; > >-our ( @ISA, @EXPORT, @EXPORT_OK, $debug ); >+our ( @ISA, @EXPORT_OK, $debug ); > > BEGIN { > $debug = $ENV{DEBUG} || 0; > require Exporter; > @ISA = qw(Exporter); > >- push @EXPORT, qw( >+ @EXPORT_OK = qw( > &GetTotalIssuesTodayByBorrower > &GetTotalIssuesReturnedTodayByBorrower > &GetPrecedentStateByBorrower >diff --git a/C4/Output.pm b/C4/Output.pm >index af7dd5a22b..01f7a79d03 100644 >--- a/C4/Output.pm >+++ b/C4/Output.pm >@@ -33,25 +33,23 @@ use URI::Escape; > use C4::Context; > use C4::Templates; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >+our (@ISA, @EXPORT_OK); > > BEGIN { > require Exporter; > >- @ISA = qw(Exporter); >- @EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead >- %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url >- &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)], >- ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)], >- html =>[qw(&output_with_http_headers &output_html_with_http_headers)] >- ); >- push @EXPORT, qw( >+ @ISA = qw(Exporter); >+ push @EXPORT_OK, qw( >+ is_ajax >+ ajax_fail > setlanguagecookie getlanguagecookie pagination_bar parametrized_url >+ output_html_with_http_headers output_ajax_with_http_headers output_with_http_headers > ); >- push @EXPORT, qw( >- &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers >- ); >- >+# %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url >+# &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)], >+# ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)], >+# html =>[qw(&output_with_http_headers &output_html_with_http_headers)] >+# ); > } > > =head1 NAME >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index d22914fc84..b0435914a9 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -39,14 +39,13 @@ use Koha::Account::Lines; > use Koha::IssuingRules; > use Koha::Libraries; > >-use vars qw(@ISA @EXPORT); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); > > # subs to rename (and maybe merge some...) >- push @EXPORT, qw( >+ @EXPORT_OK = qw( > &CalcFine > &Getoverdues > &checkoverdues >@@ -61,22 +60,10 @@ BEGIN { > &AddNotifyLine > &GetOverdueMessageTransportTypes > &parse_overdues_letter >- ); > >- # subs to remove >- push @EXPORT, qw( > &BorType >- ); > >- # check that an equivalent don't exist already before moving >- >- # subs to move to Circulation.pm >- push @EXPORT, qw( > &GetIssuesIteminfo >- ); >- >- # subs to move to Biblio.pm >- push @EXPORT, qw( > &GetItems > ); > } >diff --git a/C4/Reports.pm b/C4/Reports.pm >index b89be52e87..ddc1202d6f 100644 >--- a/C4/Reports.pm >+++ b/C4/Reports.pm >@@ -21,14 +21,14 @@ use strict; > #use warnings; FIXME - Bug 2505 > use CGI qw ( -utf8 ); > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > use C4::Context; > use C4::Debug; > >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > GetDelimiterChoices > ); > } >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index 717d44f1fd..6aa354f90d 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -22,7 +22,6 @@ use CGI qw ( -utf8 ); > use Carp; > use JSON qw( from_json ); > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > use C4::Context; > use C4::Templates qw/themelanguage/; > use C4::Koha; >@@ -34,10 +33,11 @@ use C4::Log; > use Koha::AuthorisedValues; > use Koha::Patron::Categories; > >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > get_report_types get_report_areas get_report_groups get_columns build_query get_criteria > save_report get_saved_reports execute_query get_saved_report create_compound run_compound > get_column_type get_distinct_values save_dictionary get_from_dictionary >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 6f245c3b20..3b31e58776 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -52,8 +52,6 @@ use List::MoreUtils qw( firstidx any ); > use Carp; > use Data::Dumper; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- > =head1 NAME > > C4::Reserves - Koha functions for dealing with reservation. >@@ -97,10 +95,11 @@ This modules provides somes functions to deal with reservations. > > =cut > >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > &AddReserve > > &GetReserve >@@ -146,8 +145,9 @@ BEGIN { > IsItemOnHoldAndFound > > GetMaxPatronHoldsForRecord >+ >+ MergeHolds > ); >- @EXPORT_OK = qw( MergeHolds ); > } > > =head2 AddReserve >diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm >index 3f41226352..699f4cdefa 100644 >--- a/C4/SIP/Sip.pm >+++ b/C4/SIP/Sip.pm >@@ -18,7 +18,7 @@ use C4::SIP::Sip::Checksum qw(checksum); > > use base qw(Exporter); > >-our @EXPORT_OK = qw(y_or_n timestamp add_field maybe_add add_count >+push @EXPORT_OK, qw(y_or_n timestamp add_field maybe_add add_count > denied sipbool boolspace write_msg > $error_detection $protocol_version $field_delimiter > $last_response); >diff --git a/C4/SIP/Sip/Checksum.pm b/C4/SIP/Sip/Checksum.pm >index c2b1e6b0df..d3949612a1 100644 >--- a/C4/SIP/Sip/Checksum.pm >+++ b/C4/SIP/Sip/Checksum.pm >@@ -1,12 +1,15 @@ > package C4::SIP::Sip::Checksum; > >-use Exporter; > use strict; > use warnings; > >-our @ISA = qw(Exporter); >-our @EXPORT_OK = qw(checksum verify_cksum); >-our $debug = 0; >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw(checksum verify_cksum); >+ our $debug = 0; >+} > > sub checksum { > my $pkt = shift; >diff --git a/C4/Scheduler.pm b/C4/Scheduler.pm >index 304a05015d..a049b87122 100644 >--- a/C4/Scheduler.pm >+++ b/C4/Scheduler.pm >@@ -20,14 +20,14 @@ package C4::Scheduler; > use strict; > #use warnings; FIXME - Bug 2505 > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > use C4::Context; > use Schedule::At; > >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = >+ @EXPORT_OK = > qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job); > } > >diff --git a/C4/Search.pm b/C4/Search.pm >index 37dfb2cd6c..423b6865a6 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -17,7 +17,7 @@ package C4::Search; > > use strict; > #use warnings; FIXME - Bug 2505 >-require Exporter; >+ > use C4::Context; > use C4::Biblio; # GetMarcFromKohaField, GetBiblioData > use C4::Koha; # getFacets >@@ -39,10 +39,22 @@ use URI::Escape; > use Business::ISBN; > use MARC::Record; > use MARC::Field; >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG); >+use vars qw($DEBUG); > > BEGIN { > $DEBUG = ($ENV{DEBUG}) ? 1 : 0; >+ >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw( >+ &FindDuplicate >+ &SimpleSearch >+ &searchResults >+ &getRecords >+ &buildQuery >+ &GetDistinctValues >+ &enabled_staff_search_views >+ ); > } > > =head1 NAME >@@ -61,17 +73,6 @@ This module provides searching functions for Koha's bibliographic databases > > =cut > >-@ISA = qw(Exporter); >-@EXPORT = qw( >- &FindDuplicate >- &SimpleSearch >- &searchResults >- &getRecords >- &buildQuery >- &GetDistinctValues >- &enabled_staff_search_views >-); >- > # make all your functions, whether exported or not; > > =head2 FindDuplicate >diff --git a/C4/Serials.pm b/C4/Serials.pm >index 177bc76502..3dadf2eaa1 100644 >--- a/C4/Serials.pm >+++ b/C4/Serials.pm >@@ -36,8 +36,6 @@ use Koha::Serial; > use Koha::Subscriptions; > use Koha::Subscription::Histories; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- > # Define statuses > use constant { > EXPECTED => 1, >@@ -60,10 +58,11 @@ use constant MISSING_STATUSES => ( > MISSING_LOST > ); > >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > &NewSubscription &ModSubscription &DelSubscription > &GetSubscription &CountSubscriptionFromBiblionumber &GetSubscriptionsFromBiblionumber > &SearchSubscriptions >diff --git a/C4/ShelfBrowser.pm b/C4/ShelfBrowser.pm >index 8ae813a30f..e05f5f6a04 100644 >--- a/C4/ShelfBrowser.pm >+++ b/C4/ShelfBrowser.pm >@@ -27,15 +27,12 @@ use C4::Context; > use C4::Koha; > use Koha::Libraries; > >-use vars qw(@ISA @EXPORT @EXPORT_OK); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >- &GetNearbyItems >- ); > @EXPORT_OK = qw( >+ &GetNearbyItems > ); > } > >diff --git a/C4/Tags.pm b/C4/Tags.pm >index 1db7accc06..af8e0eeb45 100644 >--- a/C4/Tags.pm >+++ b/C4/Tags.pm >@@ -30,8 +30,7 @@ use Module::Load::Conditional qw/check_install/; > use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created); > use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM tags_all\n"; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > @ISA = qw(Exporter); > @EXPORT_OK = qw( >@@ -49,7 +48,6 @@ BEGIN { > &get_filters > stratify_tags > ); >- # %EXPORT_TAGS = (); > my $ext_dict = C4::Context->preference('TagsExternalDictionary'); > if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) { > warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed."; >diff --git a/C4/TmplTokenType.pm b/C4/TmplTokenType.pm >index b2ebac8529..df651d1dd8 100644 >--- a/C4/TmplTokenType.pm >+++ b/C4/TmplTokenType.pm >@@ -19,9 +19,6 @@ package C4::TmplTokenType; > > use strict; > #use warnings; FIXME - Bug 2505 >-require Exporter; >- >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > > ############################################################################### > >@@ -39,25 +36,28 @@ The predefined constants are > ############################################################################### > > >-@ISA = qw(Exporter); >-@EXPORT_OK = qw( >- &TEXT >- &TEXT_PARAMETRIZED >- &CDATA >- &TAG >- &DECL >- &PI >- &DIRECTIVE >- &COMMENT >- &UNKNOWN >-); >- > ############################################################################### > > use vars qw( $_text $_text_parametrized $_cdata > $_tag $_decl $_pi $_directive $_comment $_null $_unknown ); > >+our (@ISA, @EXPORT_OK); > BEGIN { >+ >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw( >+ &TEXT >+ &TEXT_PARAMETRIZED >+ &CDATA >+ &TAG >+ &DECL >+ &PI >+ &DIRECTIVE >+ &COMMENT >+ &UNKNOWN >+ ); >+ > my $new = sub { > my $this = 'C4::TmplTokenType';#shift; > my $class = ref($this) || $this; >diff --git a/C4/XISBN.pm b/C4/XISBN.pm >index 55126334b3..f824b1fb9e 100644 >--- a/C4/XISBN.pm >+++ b/C4/XISBN.pm >@@ -31,12 +31,12 @@ use Koha::SearchEngine::Search; > > use strict; > #use warnings; FIXME - Bug 2505 >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- @EXPORT_OK = qw( >+ @EXPORT_OK = qw( > &get_xisbns > &get_biblionumber_from_isbn > ); >diff --git a/Koha/AuthUtils.pm b/Koha/AuthUtils.pm >index a8b391d0d5..af2a7c560e 100644 >--- a/Koha/AuthUtils.pm >+++ b/Koha/AuthUtils.pm >@@ -23,10 +23,13 @@ use Encode qw( encode is_utf8 ); > use Fcntl qw/O_RDONLY/; # O_RDONLY is used in generate_salt > use List::MoreUtils qw/ any /; > >-use base 'Exporter'; >- >-our @EXPORT_OK = qw(hash_password get_script_name); > >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw(hash_password get_script_name); >+}; > =head1 NAME > > Koha::AuthUtils - utility routines for authentication >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 1a15507171..8f40471c60 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -39,7 +39,7 @@ use Koha::Plugins::Handler; > use Koha::Acquisition::Booksellers; > > our $VERSION = 1.1; >-our @EXPORT_OK = >+push @EXPORT_OK, > qw( process_quote process_invoice process_ordrsp create_edi_order get_edifact_ean ); > > sub create_edi_order { >diff --git a/Koha/Item/Search/Field.pm b/Koha/Item/Search/Field.pm >index 74c1cf211e..22d9e9d774 100644 >--- a/Koha/Item/Search/Field.pm >+++ b/Koha/Item/Search/Field.pm >@@ -1,15 +1,19 @@ > package Koha::Item::Search::Field; > > use Modern::Perl; >-use base qw( Exporter ); >- >-our @EXPORT_OK = qw( >- AddItemSearchField >- ModItemSearchField >- DelItemSearchField >- GetItemSearchField >- GetItemSearchFields >-); >+ >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter >+ @ISA = qw(Exporter); >+ @EXPORT_OK, qw( >+ AddItemSearchField >+ ModItemSearchField >+ DelItemSearchField >+ GetItemSearchField >+ GetItemSearchFields >+ ); >+}; > > use C4::Context; > >diff --git a/Koha/Patron/Password/Recovery.pm b/Koha/Patron/Password/Recovery.pm >index a23a609b90..703711a105 100644 >--- a/Koha/Patron/Password/Recovery.pm >+++ b/Koha/Patron/Password/Recovery.pm >@@ -22,12 +22,11 @@ use C4::Context; > use C4::Letters; > use Crypt::Eksblowfish::Bcrypt qw(en_base64); > >-use vars qw(@ISA @EXPORT); >- >+our (@ISA, @EXPORT_OK); > BEGIN { > require Exporter; > @ISA = qw(Exporter); >- push @EXPORT, qw( >+ @EXPORT_OK = qw( > &ValidateBorrowernumber > &SendPasswordRecoveryEmail > &GetValidLinkInfo >diff --git a/Koha/SimpleMARC.pm b/Koha/SimpleMARC.pm >index aaab6b647e..db5a3386f2 100644 >--- a/Koha/SimpleMARC.pm >+++ b/Koha/SimpleMARC.pm >@@ -6,26 +6,22 @@ use Modern::Perl; > > #use MARC::Record; > >-require Exporter; >- >-our @ISA = qw(Exporter); >-our %EXPORT_TAGS = ( 'all' => [ qw( >- >-) ] ); >- >-our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); >- >-our @EXPORT = qw( >- read_field >- update_field >- copy_field >- copy_and_replace_field >- move_field >- delete_field >- field_exists >- field_equals >-); >- >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ our @ISA = qw(Exporter); >+ >+ @EXPORT_OK = qw( >+ read_field >+ update_field >+ copy_field >+ copy_and_replace_field >+ move_field >+ delete_field >+ field_exists >+ field_equals >+ ); >+} > > our $debug = 0; > >diff --git a/Koha/Util/FrameworkPlugin.pm b/Koha/Util/FrameworkPlugin.pm >index e226295a13..6d5043e481 100644 >--- a/Koha/Util/FrameworkPlugin.pm >+++ b/Koha/Util/FrameworkPlugin.pm >@@ -22,14 +22,6 @@ package Koha::Util::FrameworkPlugin; > > use Modern::Perl; > >-our ( @ISA, @EXPORT, @EXPORT_OK ); >-BEGIN { >- require Exporter; >- @ISA = qw( Exporter ); >- @EXPORT = qw( ); >- @EXPORT_OK = qw( wrapper date_entered ); >-} >- > =head1 NAME > > Koha::Util::FrameworkPlugin - utility class with routines for framework plugins >diff --git a/acqui/pdfformat/layout2pagesde.pm b/acqui/pdfformat/layout2pagesde.pm >index 08924d33e1..69c7082829 100644 >--- a/acqui/pdfformat/layout2pagesde.pm >+++ b/acqui/pdfformat/layout2pagesde.pm >@@ -22,7 +22,6 @@ > > #you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub. > package pdfformat::layout2pagesde; >-use vars qw(@ISA @EXPORT); > use MIME::Base64; > use strict; > use warnings; >diff --git a/misc/translator/TmplTokenizer.pm b/misc/translator/TmplTokenizer.pm >index 98ec61a866..0bde8874e0 100644 >--- a/misc/translator/TmplTokenizer.pm >+++ b/misc/translator/TmplTokenizer.pm >@@ -8,8 +8,6 @@ use C4::TTParser; > use VerboseWarnings qw( pedantic_p error_normal warn_normal warn_pedantic ); > require Exporter; > >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); >- > ############################################################################### > > =head1 NAME >@@ -25,9 +23,6 @@ A wrapper for the functionality found in TTParser to allow an easier transition > ############################################################################### > > >-@ISA = qw(Exporter); >-@EXPORT_OK = qw(); >- > use vars qw( $pedantic_attribute_error_in_nonpedantic_mode_p ); > use vars qw( $pedantic_tmpl_var_use_in_nonpedantic_mode_p ); > use vars qw( $pedantic_error_markup_in_pcdata_p ); >diff --git a/misc/translator/VerboseWarnings.pm b/misc/translator/VerboseWarnings.pm >index 8fac8ba680..e231dd5e1e 100644 >--- a/misc/translator/VerboseWarnings.pm >+++ b/misc/translator/VerboseWarnings.pm >@@ -2,9 +2,6 @@ package VerboseWarnings; > > use strict; > #use warnings; FIXME - Bug 2505 >-require Exporter; >- >-use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > > ############################################################################### > >@@ -21,20 +18,23 @@ verbose warnings. > > ############################################################################### > >- >-@ISA = qw(Exporter); >-@EXPORT_OK = qw( >- &pedantic_p >- &warn_additional >- &warn_normal >- &warn_pedantic >- &error_additional >- &error_normal >-); >-%EXPORT_TAGS = ( >- 'warn' => [ 'warn_additional', 'warn_normal', 'warn_pedantic' ], >- 'die' => [ 'error_additional', 'error_normal' ], >-); >+our (@ISA, @EXPORT_OK); >+BEGIN { >+ require Exporter; >+ @ISA = qw(Exporter); >+ @EXPORT_OK = qw( >+ &pedantic_p >+ &warn_additional >+ &warn_normal >+ &warn_pedantic >+ &error_additional >+ &error_normal >+ ); >+ %EXPORT_TAGS = ( >+ 'warn' => [ 'warn_additional', 'warn_normal', 'warn_pedantic' ], >+ 'die' => [ 'error_additional', 'error_normal' ], >+ ); >+} > > ############################################################################### > >diff --git a/t/db_dependent/Members/IssueSlip.t b/t/db_dependent/Members/IssueSlip.t >index d161602d22..36a8c6f831 100644 >--- a/t/db_dependent/Members/IssueSlip.t >+++ b/t/db_dependent/Members/IssueSlip.t >@@ -22,8 +22,8 @@ use Test::More tests => 3; > use Test::MockModule; > use t::lib::TestBuilder; > >-use C4::Biblio; >-use C4::Items; >+use C4::Biblio qw( AddBiblio ); >+use C4::Items qw( AddItem ); > use C4::Members; > use C4::Circulation; > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17600
:
57394
|
57950
|
57951
|
57952
|
57953
|
57954
|
61994
|
61995
|
61996
|
61997
|
61998
|
62209
|
62210
|
62211
|
62212
|
62213
|
62940
|
62941
|
62942
|
62943
|
62958
|
62959
|
64387
|
64388
|
64389
|
64390
|
64391
|
64392
|
64466
|
64467
|
64468
|
64469
|
64470
|
64471
|
64472
|
64473
|
64474
|
64475
|
64476
|
121309
|
121310
|
121311
|
121312
|
121313
|
121314
|
122360
|
122361
|
122362
|
122363
|
122364
|
122365
|
122869
|
122884
|
122945
|
123194
|
123195
|
123196
|
123200
|
123210
|
123281
|
123283
|
123284
|
123325
|
123417
|
123418
|
123419
|
123420
|
123565
|
124866
|
125059
|
125063
|
125064
|
125066
|
126640
|
127056
|
127918