@@ -, +, @@ --- 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 | 22 ++++----- 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, 272 insertions(+), 368 deletions(-) --- a/C4/Auth.pm +++ a/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; --- a/C4/Auth_with_cas.pm +++ a/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; --- a/C4/Auth_with_ldap.pm +++ a/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: --- a/C4/Auth_with_shibboleth.pm +++ a/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); } --- a/C4/Barcodes.pm +++ a/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')) { --- a/C4/Biblio.pm +++ a/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); --- a/C4/Bookseller.pm +++ a/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. --- a/C4/Boolean.pm +++ a/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 --- a/C4/Breeding.pm +++ a/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 --- a/C4/Charset.pm +++ a/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 --- a/C4/Circulation.pm +++ a/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 --- a/C4/ClassSortRoutine.pm +++ a/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(); --- a/C4/ClassSource.pm +++ a/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(); --- a/C4/CourseReserves.pm +++ a/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' ); --- a/C4/External/BakerTaylor.pm +++ a/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 --- a/C4/HoldsQueue.pm +++ a/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); --- a/C4/ImportBatch.pm +++ a/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 --- a/C4/ImportExportFramework.pm +++ a/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 --- a/C4/InstallAuth.pm +++ a/C4/InstallAuth.pm @@ -21,15 +21,20 @@ use strict; #use warnings; FIXME - Bug 2505 use Digest::MD5 qw(md5_base64); -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 @@ -71,12 +76,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( --- a/C4/Items.pm +++ a/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 --- a/C4/Koha.pm +++ a/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; --- a/C4/Languages.pm +++ a/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; } --- a/C4/Letters.pm +++ a/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 ); } --- a/C4/Members.pm +++ a/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 --- a/C4/Members/Attributes.pm +++ a/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 --- a/C4/Members/Statistics.pm +++ a/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 --- a/C4/Output.pm +++ a/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); + @EXPORT_OK, qw( + is_ajax + ajax_fail setlanguagecookie getlanguagecookie pagination_bar parametrized_url - ); - 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 --- a/C4/Overdues.pm +++ a/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 ); } --- a/C4/Reports.pm +++ a/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 ); } --- a/C4/Reports/Guided.pm +++ a/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 --- a/C4/Reserves.pm +++ a/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 --- a/C4/SIP/Sip.pm +++ a/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); --- a/C4/SIP/Sip/Checksum.pm +++ a/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; --- a/C4/Scheduler.pm +++ a/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); } --- a/C4/Search.pm +++ a/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 --- a/C4/Serials.pm +++ a/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 --- a/C4/ShelfBrowser.pm +++ a/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 ); } --- a/C4/Tags.pm +++ a/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."; --- a/C4/TmplTokenType.pm +++ a/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; --- a/C4/XISBN.pm +++ a/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 ); --- a/Koha/AuthUtils.pm +++ a/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 --- a/Koha/EDI.pm +++ a/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 { --- a/Koha/Item/Search/Field.pm +++ a/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; --- a/Koha/Patron/Password/Recovery.pm +++ a/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 --- a/Koha/SimpleMARC.pm +++ a/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; --- a/Koha/Util/FrameworkPlugin.pm +++ a/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 --- a/acqui/pdfformat/layout2pagesde.pm +++ a/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; --- a/misc/translator/TmplTokenizer.pm +++ a/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 ); --- a/misc/translator/VerboseWarnings.pm +++ a/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' ], + ); +} ############################################################################### --- a/t/db_dependent/Members/IssueSlip.t +++ a/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; --