Bug 40680: Move EXPORT_OK right after Modern::Perl

So it is done before the other use statements.

Also uniformize the pattern, must now be:
```
use Modern::Perl;
use base 'Exporter';
BEGIN {
    our @EXPORT_OK = qw(subroutine list);
}
```

Rebased-by: Victor Grousset/tuxayo <victor@tuxayo.net>
  Bug38936 exported redirect_if_opac_suppressed
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2025-09-02 11:22:06 +02:00 committed by Lucas Gass
parent 95e704450c
commit beac9eae8f
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
64 changed files with 712 additions and 866 deletions

View File

@ -18,6 +18,15 @@ package C4::Accounts;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT = qw(
chargelostitem
purge_zero_balance_fees
);
}
use C4::Context;
use C4::Stats;
use C4::Members;
@ -26,17 +35,6 @@ use Koha::Account::Lines;
use Koha::Account::Offsets;
use Koha::Items;
use vars qw(@ISA @EXPORT);
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
chargelostitem
purge_zero_balance_fees
);
}
=head1 NAME
C4::Accounts - Functions for dealing with Koha accounts

View File

@ -18,39 +18,10 @@ package C4::Acquisition;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use Carp qw( carp croak );
use Text::CSV_XS;
use C4::Context;
use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion );
use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal );
use C4::Contract qw( GetContract );
use C4::Log qw( logaction );
use C4::Templates qw(gettemplate);
use Koha::DateUtils qw( dt_from_string );
use Koha::Acquisition::Baskets;
use Koha::Acquisition::Booksellers;
use Koha::Acquisition::Invoices;
use Koha::Acquisition::Orders;
use Koha::AdditionalFieldValue;
use Koha::Biblios;
use Koha::Exceptions;
use Koha::Items;
use Koha::Number::Price;
use Koha::Libraries;
use Koha::CsvProfiles;
use Koha::Patrons;
use C4::Koha;
use MARC::Field;
use JSON qw( to_json );
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetBasket NewBasket ReopenBasket ModBasket
GetBasketAsCSV GetBasketGroupAsCSV
GetBasketsByBookseller GetBasketsByBasketgroup
@ -95,6 +66,33 @@ BEGIN {
);
}
use Carp qw( carp croak );
use Text::CSV_XS;
use C4::Context;
use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion );
use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal );
use C4::Contract qw( GetContract );
use C4::Log qw( logaction );
use C4::Templates qw(gettemplate);
use Koha::DateUtils qw( dt_from_string );
use Koha::Acquisition::Baskets;
use Koha::Acquisition::Booksellers;
use Koha::Acquisition::Invoices;
use Koha::Acquisition::Orders;
use Koha::AdditionalFieldValue;
use Koha::Biblios;
use Koha::Exceptions;
use Koha::Items;
use Koha::Number::Price;
use Koha::Libraries;
use Koha::CsvProfiles;
use Koha::Patrons;
use C4::Koha;
use MARC::Field;
use JSON qw( to_json );
=head1 NAME
C4::Acquisition - Koha functions for dealing with orders and acquisitions

View File

@ -17,8 +17,17 @@ package C4::Auth;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
checkauth check_api_auth get_session check_cookie_auth checkpw checkpw_internal checkpw_hash
get_all_subpermissions get_cataloguing_page_permissions get_user_subpermissions in_iprange
get_template_and_user haspermission create_basic_session
);
}
use Carp qw( croak );
use Digest::MD5 qw( md5_base64 );
@ -60,20 +69,10 @@ use Koha::Session;
# use utf8;
use vars qw($ldap $cas $caslogout);
our ( @ISA, @EXPORT_OK );
BEGIN {
C4::Context->set_remote_address;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
checkauth check_api_auth get_session check_cookie_auth checkpw checkpw_internal checkpw_hash
get_all_subpermissions get_cataloguing_page_permissions get_user_subpermissions in_iprange
get_template_and_user haspermission create_basic_session
);
$cas = C4::Context->preference('casAuthentication');
$caslogout = C4::Context->preference('casLogout');
@ -1446,7 +1445,7 @@ sub checkauth {
# get the inputs from the incoming query
my @inputs = ();
my @inputs_to_clean = qw( login_userid login_password ticket logout.x otp_token );
foreach my $name ( param $query) {
foreach my $name ( param $query ) {
next if grep { $name eq $_ } @inputs_to_clean;
my @value = $query->multi_param($name);
push @inputs, { name => $name, value => $_ } for @value;

View File

@ -17,8 +17,13 @@ package C4::Auth_with_cas;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK =
qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth);
}
use C4::Context;
use Koha::AuthUtils qw( get_script_name );
@ -29,14 +34,6 @@ use URI::Escape;
use Koha::Logger;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK =
qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth);
}
my $defaultcasserver;
my $casservers;
my $yamlauthfile = C4::Context->config('intranetdir') . "/C4/Auth_cas_servers.yaml";

View File

@ -18,6 +18,12 @@ package C4::Auth_with_ldap;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw( checkpw_ldap );
}
use Carp qw( croak );
use C4::Context;
@ -29,14 +35,6 @@ use Koha::AuthUtils qw( hash_password );
use Net::LDAP;
use Net::LDAP::Filter;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw( checkpw_ldap );
}
# Redefine checkpw_ldap:
# connect to LDAP (named or anonymous)
# ~ retrieves $userid from KOHA_CONF mapping

View File

@ -18,6 +18,11 @@ package C4::Auth_with_shibboleth;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
}
use C4::Context;
use Koha::AuthUtils qw( get_script_name );
@ -30,14 +35,6 @@ use List::MoreUtils qw( any );
use Koha::Logger;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
}
# Check that shib config is not malformed
sub shib_ok {
@ -158,7 +155,7 @@ sub _autocreate {
module => 'members',
letter_code => 'WELCOME',
branchcode => $patron->branchcode,
,
lang => $patron->lang || 'default',
tables => {
'branches' => $patron->branchcode,

View File

@ -18,38 +18,11 @@ package C4::AuthoritiesMarc;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use MARC::Field;
use Scalar::Util qw(blessed);
use Try::Tiny qw( try catch );
use C4::Context;
use C4::Biblio qw( ModBiblio );
use C4::Search qw( FindDuplicate new_record_from_zebra );
use C4::AuthoritiesMarc::MARC21;
use C4::AuthoritiesMarc::UNIMARC;
use C4::Charset qw( SetUTF8Flag );
use C4::Log qw( logaction );
use Koha::MetadataRecord::Authority;
use Koha::Authorities;
use Koha::Authority::MergeRequests;
use Koha::Authority::Types;
use Koha::Authority;
use Koha::Database;
use Koha::Libraries;
use Koha::RecordProcessor;
use Koha::SearchEngine;
use Koha::SearchEngine::Indexer;
use Koha::SearchEngine::Search;
our ( @ISA, @EXPORT_OK );
use Modern::Perl;
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetTagsLabels
GetAuthMARCFromKohaField
@ -79,6 +52,29 @@ BEGIN {
);
}
use MARC::Field;
use Scalar::Util qw(blessed);
use Try::Tiny qw( try catch );
use C4::Context;
use C4::Biblio qw( ModBiblio );
use C4::Search qw( FindDuplicate new_record_from_zebra );
use C4::AuthoritiesMarc::MARC21;
use C4::AuthoritiesMarc::UNIMARC;
use C4::Charset qw( SetUTF8Flag );
use C4::Log qw( logaction );
use Koha::MetadataRecord::Authority;
use Koha::Authorities;
use Koha::Authority::MergeRequests;
use Koha::Authority::Types;
use Koha::Authority;
use Koha::Database;
use Koha::Libraries;
use Koha::RecordProcessor;
use Koha::SearchEngine;
use Koha::SearchEngine::Indexer;
use Koha::SearchEngine::Search;
=head1 NAME
C4::AuthoritiesMarc
@ -532,7 +528,7 @@ ORDER BY tagfield, display_order, tagsubfield"
while (
(
$tag, $subfield, $liblibrarian,, $libopac, $tab,
$tag, $subfield, $liblibrarian, $libopac, $tab,
$mandatory, $repeatable, $authorised_value, $authtypecode,
$value_builder, $kohafield, $seealso, $hidden,
$isurl, $defaultvalue, $display_order

View File

@ -20,14 +20,10 @@ package C4::Biblio;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use vars qw(@ISA @EXPORT_OK);
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
AddBiblio
GetBiblioData
GetISBDView

View File

@ -18,8 +18,12 @@ package C4::Breeding;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(BreedingSearch ImportBreedingAuth Z3950Search Z3950SearchAuth);
}
use C4::Biblio qw(TransformMarcToKoha);
use C4::Koha qw( GetVariationsOfISBN );
@ -32,14 +36,6 @@ use C4::Languages;
use Koha::Database;
use Koha::XSLT::Base;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(BreedingSearch ImportBreedingAuth Z3950Search Z3950SearchAuth);
}
=head1 NAME
C4::Breeding : module to add biblios to import_records via

View File

@ -18,20 +18,10 @@ package C4::Budgets;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use JSON;
use C4::Context;
use Koha::Database;
use Koha::Patrons;
use Koha::Acquisition::Invoice::Adjustments;
use C4::Acquisition;
use C4::Log qw(logaction);
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetBudget
GetBudgetByOrderNumber
@ -84,6 +74,14 @@ BEGIN {
);
}
use JSON;
use C4::Context;
use Koha::Database;
use Koha::Patrons;
use Koha::Acquisition::Invoice::Adjustments;
use C4::Acquisition;
use C4::Log qw(logaction);
# ----------------------------BUDGETS.PM-----------------------------";
=head1 FUNCTIONS ABOUT BUDGETS

View File

@ -18,20 +18,10 @@ package C4::Charset;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use MARC::Charset;
use Text::Iconv;
use Unicode::Normalize qw( NFC NFD );
use Encode;
use Koha::Logger;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
NormalizeString
IsStringUTF8ish
MarcToUTF8Record
@ -43,6 +33,13 @@ BEGIN {
);
}
use MARC::Charset;
use Text::Iconv;
use Unicode::Normalize qw( NFC NFD );
use Encode;
use Koha::Logger;
=encoding UTF-8
=head1 NAME

View File

@ -19,6 +19,63 @@ package C4::Circulation;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
# FIXME subs that should probably be elsewhere
our @EXPORT_OK = qw(
barcodedecode
LostItem
ReturnLostItem
GetPendingOnSiteCheckouts
CanBookBeIssued
checkHighHolds
CanBookBeRenewed
AddIssue
GetLoanLength
GetHardDueDate
AddRenewal
GetRenewCount
GetSoonestRenewDate
GetLatestAutoRenewDate
GetIssuingCharges
AddIssuingCharge
GetBranchBorrowerCircRule
GetBranchItemRule
GetBiblioIssues
GetUpcomingDueIssues
CheckIfIssuedToPatron
IsItemIssued
GetAgeRestriction
GetTopIssues
AddReturn
MarkIssueReturned
transferbook
TooMany
GetTransfersFromTo
CalcDateDue
CheckValidBarcode
IsBranchTransferAllowed
CreateBranchTransferLimit
DeleteBranchTransferLimits
TransferSlip
GetOfflineOperations
GetOfflineOperation
AddOfflineOperation
DeleteOfflineOperation
ProcessOfflineOperation
ProcessOfflinePayment
ProcessOfflineIssue
);
push @EXPORT_OK, '_GetCircControlBranch'; # This is wrong!
}
use DateTime;
use POSIX qw( floor );
use Encode;
@ -70,64 +127,6 @@ use Carp qw( carp );
use List::MoreUtils qw( any );
use Scalar::Util qw( looks_like_number blessed );
use Date::Calc qw( Date_to_Days );
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
# FIXME subs that should probably be elsewhere
push @EXPORT_OK, qw(
barcodedecode
LostItem
ReturnLostItem
GetPendingOnSiteCheckouts
CanBookBeIssued
checkHighHolds
CanBookBeRenewed
AddIssue
GetLoanLength
GetHardDueDate
AddRenewal
GetRenewCount
GetSoonestRenewDate
GetLatestAutoRenewDate
GetIssuingCharges
AddIssuingCharge
GetBranchBorrowerCircRule
GetBranchItemRule
GetBiblioIssues
GetUpcomingDueIssues
CheckIfIssuedToPatron
IsItemIssued
GetAgeRestriction
GetTopIssues
AddReturn
MarkIssueReturned
transferbook
TooMany
GetTransfersFromTo
CalcDateDue
CheckValidBarcode
IsBranchTransferAllowed
CreateBranchTransferLimit
DeleteBranchTransferLimits
TransferSlip
GetOfflineOperations
GetOfflineOperation
AddOfflineOperation
DeleteOfflineOperation
ProcessOfflineOperation
ProcessOfflinePayment
ProcessOfflineIssue
);
push @EXPORT_OK, '_GetCircControlBranch'; # This is wrong!
}
=head1 NAME

View File

@ -18,20 +18,17 @@ package C4::ClassSortRoutine;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use Class::Factory::Util;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetSortRoutineNames
GetClassSortKey
);
}
use Class::Factory::Util;
=head1 NAME
C4::ClassSortRoutine - base object for creation of classification sorting

View File

@ -17,18 +17,10 @@ package C4::ClassSource;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use C4::Context;
use C4::ClassSortRoutine qw( GetClassSortKey );
use Koha::Cache::Memory::Lite;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetClassSources
GetClassSource
GetClassSortRule
@ -36,6 +28,11 @@ BEGIN {
);
}
use C4::Context;
use C4::ClassSortRoutine qw( GetClassSortKey );
use Koha::Cache::Memory::Lite;
=head1 NAME
C4::ClassSources - handle classification sources in Koha

View File

@ -18,19 +18,16 @@ package C4::ClassSplitRoutine;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use Class::Factory::Util;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetSplitRoutineNames
);
}
use Class::Factory::Util;
=head1 NAME
C4::ClassSplitRoutine - base object for creation of classification splitting routines

View File

@ -16,24 +16,11 @@ package C4::CourseReserves;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use List::MoreUtils qw( any );
use C4::Context;
use Koha::Courses;
use Koha::Course::Instructors;
use Koha::Course::Items;
use Koha::Course::Reserves;
use Koha::Checkouts;
use base 'Exporter';
use vars qw(@FIELDS);
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetCourse
ModCourse
GetCourses
@ -58,6 +45,16 @@ BEGIN {
@FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
}
use List::MoreUtils qw( any );
use C4::Context;
use Koha::Courses;
use Koha::Course::Instructors;
use Koha::Course::Items;
use Koha::Course::Reserves;
use Koha::Checkouts;
=head1 NAME
C4::CourseReserves - Koha course reserves module

View File

@ -18,21 +18,22 @@ package C4::External::BakerTaylor;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
}
use XML::Simple;
use LWP::Simple qw( get );
use C4::Context;
use Modern::Perl;
use vars qw(%EXPORT_TAGS $VERSION);
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
$VERSION = 3.07.00.049;
@EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
}
# These variables are plack safe: they are initialized each time

View File

@ -18,6 +18,13 @@ package C4::Heading;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
new_from_field
);
}
use MARC::Field;
use C4::Context;

View File

@ -19,8 +19,21 @@ package C4::HoldsQueue;
# FIXME: expand perldoc, explain intended logic
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
CreateQueue
GetHoldsQueueItems
TransportCostMatrix
UpdateTransportCostMatrix
GetPendingHoldRequestsForBib
load_branches_to_pull_from
update_queue_for_biblio
);
}
use C4::Context;
use C4::Circulation qw( GetBranchItemRule );
@ -36,23 +49,6 @@ use List::Util qw( shuffle );
use List::MoreUtils qw( any );
use Algorithm::Munkres qw();
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
CreateQueue
GetHoldsQueueItems
TransportCostMatrix
UpdateTransportCostMatrix
GetPendingHoldRequestsForBib
load_branches_to_pull_from
update_queue_for_biblio
);
}
=head1 FUNCTIONS
=head2 TransportCostMatrix

View File

@ -17,37 +17,11 @@ package C4::ImportBatch;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use C4::Context;
use C4::Koha qw( GetNormalizedISBN );
use C4::Biblio qw(
AddBiblio
DelBiblio
GetMarcFromKohaField
GetXmlBiblio
ModBiblio
TransformMarcToKoha
);
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
use C4::AuthoritiesMarc
qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
use Koha::Items;
use Koha::SearchEngine;
use Koha::SearchEngine::Indexer;
use Koha::Plugins::Handler;
use Koha::Logger;
our ( @ISA, @EXPORT_OK );
use Modern::Perl;
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetZ3950BatchId
GetWebserviceBatchId
GetImportRecordMarc
@ -97,6 +71,28 @@ BEGIN {
);
}
use C4::Context;
use C4::Koha qw( GetNormalizedISBN );
use C4::Biblio qw(
AddBiblio
DelBiblio
GetMarcFromKohaField
GetXmlBiblio
ModBiblio
TransformMarcToKoha
);
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
use C4::AuthoritiesMarc
qw( AddAuthority GuessAuthTypeCode GetAuthorityXML ModAuthority DelAuthority GetAuthorizedHeading );
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
use Koha::Items;
use Koha::SearchEngine;
use Koha::SearchEngine::Indexer;
use Koha::Plugins::Handler;
use Koha::Logger;
=head1 NAME
C4::ImportBatch - manage batches of imported MARC records

View File

@ -17,8 +17,17 @@ package C4::ImportExportFramework;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
ExportFramework
ImportFramework
createODS
);
}
use XML::LibXML;
use XML::LibXML::XPathContext;
use Digest::MD5;
@ -29,18 +38,6 @@ use List::MoreUtils qw( indexes );
use C4::Context;
use Koha::Logger;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
ExportFramework
ImportFramework
createODS
);
}
use constant XMLSTR => '<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook

View File

@ -18,27 +18,24 @@ package C4::InstallAuth;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
checkauth
get_template_and_user
);
}
use CGI::Session;
use File::Spec;
require Exporter;
use C4::Context;
use C4::Output qw( output_html_with_http_headers );
use C4::Templates;
use Koha::Session;
our ( @ISA, @EXPORT_OK );
BEGIN {
@ISA = qw(Exporter);
@EXPORT_OK = qw(
checkauth
get_template_and_user
);
}
=head1 NAME
InstallAuth - Authenticates Koha users for Install process

View File

@ -19,14 +19,10 @@ package C4::Items;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
AddItemFromMarc
AddItemBatchFromMarc
ModItemFromMarc

View File

@ -20,21 +20,10 @@ package C4::Koha;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use C4::Context;
use Koha::Caches;
use Koha::AuthorisedValues;
use Koha::Libraries;
use Koha::MarcSubfieldStructures;
use Business::ISBN;
use Business::ISSN;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetItemTypesCategorized
getallthemes
getFacets
@ -60,6 +49,14 @@ BEGIN {
);
}
use C4::Context;
use Koha::Caches;
use Koha::AuthorisedValues;
use Koha::Libraries;
use Koha::MarcSubfieldStructures;
use Business::ISBN;
use Business::ISSN;
=head1 NAME
C4::Koha - Perl Module containing convenience functions for Koha scripts

View File

@ -18,23 +18,11 @@ package C4::Languages;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Carp qw( carp );
use CGI;
use List::MoreUtils qw( any );
use C4::Context;
use Koha::Caches;
use Koha::Cache::Memory::Lite;
use Koha::Language;
our ( @ISA, @EXPORT_OK );
use Modern::Perl;
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
getFrameworkLanguages
getTranslatedLanguages
getLanguages
@ -44,6 +32,14 @@ BEGIN {
qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage get_rfc4646_from_iso639);
}
use Carp qw( carp );
use CGI;
use List::MoreUtils qw( any );
use C4::Context;
use Koha::Caches;
use Koha::Cache::Memory::Lite;
use Koha::Language;
=head1 NAME
C4::Languages - Perl Module containing language list functions for Koha

View File

@ -18,6 +18,27 @@ package C4::Letters;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
GetLetters
GetLettersAvailableForALibrary
GetLetterTemplates
DelLetter
GetPreparedLetter
GetWrappedLetter
SendAlerts
GetPrintMessages
GetQueuedMessages
GetMessage
GetMessageTransportTypes
EnqueueLetter
SendQueuedMessages
ResendMessage
);
}
use Carp qw( carp croak );
use Template;
@ -44,30 +65,6 @@ use Koha::Template::Plugin::KohaDates;
use constant SERIALIZED_EMAIL_CONTENT_TYPE => 'message/rfc822';
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
GetLetters
GetLettersAvailableForALibrary
GetLetterTemplates
DelLetter
GetPreparedLetter
GetWrappedLetter
SendAlerts
GetPrintMessages
GetQueuedMessages
GetMessage
GetMessageTransportTypes
EnqueueLetter
SendQueuedMessages
ResendMessage
);
}
our $domain_limits = {};
=head1 NAME

View File

@ -20,6 +20,16 @@ package C4::Members;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
GetBorrowersToExpunge
IssueSlip
);
}
use C4::Context;
use Scalar::Util qw( looks_like_number );
use Date::Calc qw( check_date Date_to_Days );
@ -36,18 +46,6 @@ use Koha::AdditionalContents;
use Koha::Patrons;
use Koha::Patron::Categories;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
GetBorrowersToExpunge
IssueSlip
);
}
=head1 NAME
C4::Members - Perl Module containing convenience functions for member handling

View File

@ -17,8 +17,19 @@ package C4::Members::Messaging;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
GetMessagingPreferences
SetMessagingPreference
GetMessagingOptions
SetMessagingPreferencesFromDefaults
);
}
use C4::Context;
=head1 NAME

View File

@ -23,16 +23,10 @@ C4::Members::Statistics - Get statistics for patron checkouts
=cut
use Modern::Perl;
use C4::Context;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
get_fields
GetTotalIssuesTodayByBorrower
GetTotalIssuesReturnedTodayByBorrower
@ -40,6 +34,8 @@ BEGIN {
);
}
use C4::Context;
=head2 get_fields
Get fields form syspref 'StatisticsFields'
Returns list of valid fields, defaults to 'location|itype|ccode'

View File

@ -25,22 +25,10 @@ package C4::Output;
# templates.
use Modern::Perl;
use HTML::Entities;
use Scalar::Util qw( looks_like_number );
use URI::Escape;
use C4::Auth qw( get_template_and_user );
use C4::Context;
use C4::Templates;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
is_ajax
ajax_fail
setlanguagecookie getlanguagecookie pagination_bar parametrized_url
@ -50,6 +38,14 @@ BEGIN {
);
}
use HTML::Entities;
use Scalar::Util qw( looks_like_number );
use URI::Escape;
use C4::Auth qw( get_template_and_user );
use C4::Context;
use C4::Templates;
=head1 NAME
C4::Output - Functions for managing output, is slowly being deprecated

View File

@ -19,6 +19,25 @@ package C4::Overdues;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
# subs to rename (and maybe merge some...)
our @EXPORT_OK = qw(
CalcFine
Getoverdues
checkoverdues
UpdateFine
GetFine
GetBranchcodesWithOverdueRules
get_chargeable_units
GetOverduesForBranch
GetOverdueMessageTransportTypes
parse_overdues_letter
GetIssuesIteminfo
);
}
use Date::Calc qw( Today );
use Date::Manip qw( UnixDate );
use List::MoreUtils qw( uniq );
@ -36,28 +55,6 @@ use Koha::Recalls;
use Koha::Logger;
use Koha::Patrons;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
# subs to rename (and maybe merge some...)
@EXPORT_OK = qw(
CalcFine
Getoverdues
checkoverdues
UpdateFine
GetFine
GetBranchcodesWithOverdueRules
get_chargeable_units
GetOverduesForBranch
GetOverdueMessageTransportTypes
parse_overdues_letter
GetIssuesIteminfo
);
}
=head1 NAME
C4::Circulation::Fines - Koha module dealing with fines

View File

@ -18,20 +18,18 @@ package C4::Reports;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use CGI qw ( -utf8 );
use C4::Context;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetDelimiterChoices
);
}
use CGI qw ( -utf8 );
use C4::Context;
=head1 NAME
C4::Reports - Module for generating reports

View File

@ -18,6 +18,25 @@ package C4::Reports::Guided;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @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_column_type get_distinct_values save_dictionary get_from_dictionary
delete_definition delete_report store_results format_results get_sql get_results
nb_rows update_sql
strip_limit
convert_sql
GetReservedAuthorisedValues
GetParametersFromSQL
IsAuthorisedValueValid
ValidateSQLParameters
nb_rows update_sql
EmailReport
);
}
use CGI qw ( -utf8 );
use Carp qw( carp croak );
@ -39,28 +58,6 @@ use Koha::Reports;
use Koha::SharedContent;
use Koha::TemplateUtils qw( process_tt );
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@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_column_type get_distinct_values save_dictionary get_from_dictionary
delete_definition delete_report store_results format_results get_sql get_results
nb_rows update_sql
strip_limit
convert_sql
GetReservedAuthorisedValues
GetParametersFromSQL
IsAuthorisedValueValid
ValidateSQLParameters
nb_rows update_sql
EmailReport
);
}
=head1 NAME
C4::Reports::Guided - Module for generating guided reports

View File

@ -21,6 +21,47 @@ package C4::Reserves;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
AddReserve
GetReserveStatus
ChargeReserveFee
GetReserveFee
ModReserveAffect
ModReserve
ModReserveStatus
ModReserveCancelAll
ModReserveMinusPriority
MoveReserve
CheckReserves
CanBookBeReserved
CanItemBeReserved
CancelExpiredReserves
AutoUnsuspendReserves
IsAvailableForItemLevelRequest
ItemsAnyAvailableAndNotRestricted
AlterPriority
ToggleLowestPriority
ReserveSlip
SuspendAll
CalculatePriority
GetMaxPatronHoldsForRecord
MergeHolds
);
}
use JSON qw( to_json );
@ -99,50 +140,6 @@ This modules provides some functions to deal with reservations.
=cut
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
AddReserve
GetReserveStatus
ChargeReserveFee
GetReserveFee
ModReserveAffect
ModReserve
ModReserveStatus
ModReserveCancelAll
ModReserveMinusPriority
MoveReserve
CheckReserves
CanBookBeReserved
CanItemBeReserved
CancelExpiredReserves
AutoUnsuspendReserves
IsAvailableForItemLevelRequest
ItemsAnyAvailableAndNotRestricted
AlterPriority
ToggleLowestPriority
ReserveSlip
SuspendAll
CalculatePriority
GetMaxPatronHoldsForRecord
MergeHolds
);
}
=head2 AddReserve
AddReserve(

View File

@ -3,7 +3,7 @@ package C4::SIP::Logger;
use Modern::Perl;
use base 'Exporter';
our @EXPORT_OK = qw ( get_logger set_logger );
BEGIN { our @EXPORT_OK = qw ( get_logger set_logger ); }
our $activeSIPServer;
our $activeLogger;

View File

@ -1,11 +1,11 @@
package C4::SIP::Sip::Checksum;
use Exporter;
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(checksum verify_cksum);
BEGIN {
our @EXPORT_OK = qw(checksum verify_cksum);
}
sub checksum {
my $pkt = shift;

View File

@ -18,18 +18,15 @@ package C4::Scheduler;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
}
use C4::Context;
use Schedule::At;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
}
=head1 NAME
C4::Scheduler - Module for running jobs with the unix at command

View File

@ -16,6 +16,23 @@ package C4::Search;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
FindDuplicate
SimpleSearch
searchResults
getRecords
buildQuery
GetDistinctValues
enabled_staff_search_views
new_record_from_zebra
z3950_search_args
getIndexes
);
}
use C4::Context;
use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
use C4::Koha
@ -43,25 +60,6 @@ use MARC::Field;
use POSIX qw(setlocale LC_COLLATE);
use Unicode::Collate::Locale;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
FindDuplicate
SimpleSearch
searchResults
getRecords
buildQuery
GetDistinctValues
enabled_staff_search_views
new_record_from_zebra
z3950_search_args
getIndexes
);
}
=head1 NAME
C4::Search - Functions for searching the Koha catalog.

View File

@ -19,6 +19,41 @@ package C4::Serials;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
NewSubscription ModSubscription DelSubscription
GetSubscription CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber
SearchSubscriptions
GetFullSubscriptionsFromBiblionumber GetFullSubscription ModSubscriptionHistory
HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
GetFictiveIssueNumber
GetSubscriptionHistoryFromSubscriptionId
GetNextSeq GetSeq NewIssue GetSerials
GetLatestSerials ModSerialStatus GetNextDate
CloseSubscription ReopenSubscription
subscriptionCurrentlyOnOrder
can_claim_subscription can_edit_subscription can_show_subscription
GetSerials2
GetSubscriptionLength ReNewSubscription GetLateOrMissingIssues
GetSerialInformation AddItem2Serial
PrepareSerialsData GetNextExpected ModNextExpected
GetSubscriptionIrregularities
GetPreviousSerialid
GetSuppliersWithLateIssues
getroutinglist delroutingmember addroutingmember
reorder_members
check_routing updateClaim
CountIssues
HasItems
findSerialsByStatus
);
}
use Carp qw( croak );
use Date::Calc qw(
@ -73,44 +108,6 @@ use constant MISSING_STATUSES => (
MISSING_LOST
);
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
NewSubscription ModSubscription DelSubscription
GetSubscription CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber
SearchSubscriptions
GetFullSubscriptionsFromBiblionumber GetFullSubscription ModSubscriptionHistory
HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
GetFictiveIssueNumber
GetSubscriptionHistoryFromSubscriptionId
GetNextSeq GetSeq NewIssue GetSerials
GetLatestSerials ModSerialStatus GetNextDate
CloseSubscription ReopenSubscription
subscriptionCurrentlyOnOrder
can_claim_subscription can_edit_subscription can_show_subscription
GetSerials2
GetSubscriptionLength ReNewSubscription GetLateOrMissingIssues
GetSerialInformation AddItem2Serial
PrepareSerialsData GetNextExpected ModNextExpected
GetSubscriptionIrregularities
GetPreviousSerialid
GetSuppliersWithLateIssues
getroutinglist delroutingmember addroutingmember
reorder_members
check_routing updateClaim
CountIssues
HasItems
findSerialsByStatus
);
}
=head1 NAME
C4::Serials - Serials Module Functions

View File

@ -17,8 +17,14 @@ package C4::ShelfBrowser;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
GetNearbyItems
);
}
use C4::Biblio qw( GetAuthorisedValueDesc );
use C4::Context;
@ -26,16 +32,6 @@ use C4::Koha qw( GetNormalizedUPC GetNormalizedOCLCNumber GetNormalizedISBN GetN
use Koha::Biblios;
use Koha::Libraries;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
GetNearbyItems
);
}
=head1 NAME
C4::ShelfBrowser - functions that deal with the shelf browser feature found in

View File

@ -18,19 +18,16 @@ package C4::Stats;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use Koha::Statistics;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
UpdateStats
);
}
use Koha::Statistics;
=head1 NAME
C4::Stats - Update Koha statistics (log)

View File

@ -19,19 +19,10 @@ package C4::Suggestions;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use CGI qw ( -utf8 );
use base 'Exporter';
use C4::Context;
use C4::Output;
use C4::Letters;
use C4::Biblio qw( GetMarcFromKohaField );
use Koha::DateUtils qw( dt_from_string );
use Koha::Suggestions;
use C4::Log qw(logaction);
use base qw(Exporter);
our @EXPORT = qw(
BEGIN {
our @EXPORT = qw(
ConnectSuggestionAndBiblio
DelSuggestion
GetSuggestion
@ -44,7 +35,18 @@ our @EXPORT = qw(
DelSuggestionsOlderThan
GetUnprocessedSuggestions
MarcRecordFromNewSuggestion
);
);
}
use CGI qw ( -utf8 );
use C4::Context;
use C4::Output;
use C4::Letters;
use C4::Biblio qw( GetMarcFromKohaField );
use Koha::DateUtils qw( dt_from_string );
use Koha::Suggestions;
use C4::Log qw(logaction);
=head1 NAME

View File

@ -18,24 +18,12 @@ package C4::Tags;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Carp qw( carp );
use Exporter;
use Modern::Perl;
use base 'Exporter';
use C4::Context;
use Module::Load::Conditional qw( check_install );
use Koha::Tags;
use Koha::Tags::Approvals;
use Koha::Tags::Indexes;
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";
our ( @ISA, @EXPORT_OK );
BEGIN {
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
get_tags get_tag_rows
add_tags
add_tag
@ -64,6 +52,15 @@ BEGIN {
}
}
use Carp qw( carp );
use Module::Load::Conditional qw( check_install );
use Koha::Tags;
use Koha::Tags::Approvals;
use Koha::Tags::Indexes;
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";
=head1 C4::Tags.pm - Support for user tagging of biblios.
=cut

View File

@ -18,7 +18,7 @@ package C4::TmplTokenType;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
require Exporter;
use base 'Exporter';
###############################################################################
@ -40,13 +40,8 @@ The predefined constants are
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(
our @EXPORT_OK = qw(
TEXT
TEXT_PARAMETRIZED
CDATA

View File

@ -19,6 +19,14 @@ package C4::XISBN;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
get_xisbns
);
}
use XML::Simple;
use C4::Biblio qw(TransformMarcToKoha);
@ -31,16 +39,6 @@ use Koha::Biblios;
use Koha::SearchEngine;
use Koha::SearchEngine::Search;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
get_xisbns
);
}
=head1 NAME
C4::XISBN - Functions for retrieving XISBN content in Koha

View File

@ -22,6 +22,17 @@ package C4::XSLT;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
use Koha::XSLT::Base;
my $engine; #XSLT Handler object
BEGIN {
our @EXPORT_OK = qw(
buildKohaItemsNamespace
XSLTParse4Display
);
$engine = Koha::XSLT::Base->new( { do_not_return_source => 1 } );
}
use C4::Context;
use C4::Koha qw( xml_escape );
@ -29,7 +40,6 @@ use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure );
use Koha::AuthorisedValues;
use Koha::ItemTypes;
use Koha::RecordProcessor;
use Koha::XSLT::Base;
use Koha::Libraries;
use Koha::Recalls;
use Koha::TemplateUtils qw( process_tt );
@ -37,20 +47,6 @@ use Koha::AdditionalContents;
use C4::Scrubber;
use C4::Languages;
my $engine; #XSLT Handler object
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
buildKohaItemsNamespace
XSLTParse4Display
);
$engine = Koha::XSLT::Base->new( { do_not_return_source => 1 } );
}
=head1 NAME
C4::XSLT - Functions for displaying XSLT-generated content

View File

@ -18,6 +18,12 @@ package Koha::AuthUtils;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(hash_password get_script_name is_password_valid);
}
use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 );
use Encode;
use Fcntl qw( O_RDONLY ); # O_RDONLY is used in generate_salt
@ -27,14 +33,6 @@ use Koha::Exceptions::Password;
use C4::Context;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(hash_password get_script_name is_password_valid);
}
=head1 NAME
Koha::AuthUtils - utility routines for authentication

View File

@ -17,18 +17,10 @@ package Koha::DateUtils;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use DateTime;
use C4::Context;
use Koha::Exceptions;
use Koha::DateTime::Format::RFC3339;
use vars qw(@ISA @EXPORT_OK);
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
dt_from_string
output_pref
format_sqldatetime
@ -36,6 +28,11 @@ BEGIN {
);
}
use DateTime;
use C4::Context;
use Koha::Exceptions;
use Koha::DateTime::Format::RFC3339;
=head1 DateUtils
Koha::DateUtils - Transitional wrappers to ease use of DateTime

View File

@ -17,9 +17,19 @@ package Koha::EDI;
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use strict;
use warnings;
use Modern::Perl;
use base qw(Exporter);
BEGIN {
our @EXPORT_OK = qw(
process_quote
process_invoice
process_ordrsp
create_edi_order
get_edifact_ean
);
}
use utf8;
use English qw{ -no_match_vars };
use Business::ISBN;
@ -48,20 +58,6 @@ use Koha::Util::FrameworkPlugin qw( biblio_008 );
our $VERSION = 1.1;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
process_quote
process_invoice
process_ordrsp
create_edi_order
get_edifact_ean
);
}
sub create_edi_order {
my $parameters = shift;
my $basketno = $parameters->{basketno};

View File

@ -18,25 +18,7 @@ package Koha::I18N;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use C4::Languages;
use C4::Context;
use Encode;
use List::Util qw( first );
use Locale::Messages qw(
bindtextdomain
gettext
LC_MESSAGES
ngettext
npgettext
pgettext
textdomain
);
use POSIX qw();
use Koha::Cache::Memory::Lite;
use parent 'Exporter';
use base 'Exporter';
our @EXPORT = qw(
__
__x
@ -57,6 +39,23 @@ our @EXPORT_OK = qw(
available_locales
);
use C4::Languages;
use C4::Context;
use Encode;
use List::Util qw( first );
use Locale::Messages qw(
bindtextdomain
gettext
LC_MESSAGES
ngettext
npgettext
pgettext
textdomain
);
use POSIX qw();
use Koha::Cache::Memory::Lite;
our $textdomain = 'Koha';
=head1 NAME

View File

@ -1,13 +1,10 @@
package Koha::Item::Search::Field;
use Modern::Perl;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
AddItemSearchField
ModItemSearchField
DelItemSearchField

View File

@ -26,17 +26,10 @@ Koha::List::Patron - Management of lists of patrons
=cut
use Modern::Perl;
use Carp qw( carp croak );
use Koha::Database;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
GetPatronLists
DelPatronList
@ -48,6 +41,10 @@ BEGIN {
);
}
use Carp qw( carp croak );
use Koha::Database;
=head2 GetPatronLists
my @lists = GetPatronLists( $params );

View File

@ -18,21 +18,10 @@ package Koha::Patron::Debarments;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use C4::Context;
use C4::Log qw( logaction );
use Koha::Database;
use Koha::Patrons;
use Koha::Patron::Restriction::Types;
use Koha::Patron::Restrictions;
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
AddDebarment
DelDebarment
ModDebarment
@ -43,6 +32,14 @@ BEGIN {
);
}
use C4::Context;
use C4::Log qw( logaction );
use Koha::Database;
use Koha::Patrons;
use Koha::Patron::Restriction::Types;
use Koha::Patron::Restrictions;
=head1 Koha::Patron::Debarments
Koha::Patron::Debarments - Module for managing patron debarments

View File

@ -18,6 +18,18 @@ package Koha::Patron::Password::Recovery;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(
ValidateBorrowernumber
SendPasswordRecoveryEmail
GetValidLinkInfo
CompletePasswordRecovery
DeleteExpiredPasswordRecovery
);
}
use C4::Context;
use C4::Letters;
use Crypt::Eksblowfish::Bcrypt qw( en_base64 );
@ -26,20 +38,6 @@ use Koha::DateUtils qw( dt_from_string );
use constant PATRON => 2;
use constant STAFF => 5;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
&ValidateBorrowernumber
&SendPasswordRecoveryEmail
&GetValidLinkInfo
&CompletePasswordRecovery
&DeleteExpiredPasswordRecovery
);
}
=head1 NAME
Koha::Patron::Password::Recovery - Koha password recovery module

View File

@ -16,16 +16,10 @@ package Koha::SimpleMARC;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use constant LAST_TRANSACTION_FIELD => q/005/; # MARC21/UNIMARC
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
our @ISA = qw(Exporter);
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
read_field
add_field
update_field
@ -39,6 +33,8 @@ BEGIN {
);
}
use constant LAST_TRANSACTION_FIELD => q/005/; # MARC21/UNIMARC
=head1 NAME
SimpleMARC - Perl module for making simple MARC record alterations.

View File

@ -18,6 +18,11 @@ package Koha::TemplateUtils;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw( process_tt );
}
use Carp qw( croak );
use Try::Tiny;
@ -25,14 +30,6 @@ use Template;
use C4::Context;
use vars qw(@ISA @EXPORT_OK);
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw( process_tt );
}
=head1 NAME
Koha::TemplateUtils

View File

@ -21,17 +21,14 @@ package Koha::Util::FrameworkPlugin;
#
use Modern::Perl;
use constant DEFAULT_008_POS_6_39 => 'b |||||||| |||| 00| 0 eng d';
our ( @ISA, @EXPORT_OK );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw( Exporter );
@EXPORT_OK = qw( wrapper date_entered biblio_008 );
our @EXPORT_OK = qw( wrapper date_entered biblio_008 );
}
use constant DEFAULT_008_POS_6_39 => 'b |||||||| |||| 00| 0 eng d';
=head1 NAME
Koha::Util::FrameworkPlugin - utility class with routines for framework plugins

View File

@ -20,18 +20,10 @@ package Koha::Util::StockRotation;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use Koha::Items;
use Koha::StockRotationItems;
use Koha::Database;
our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
use base 'Exporter';
BEGIN {
require Exporter;
@ISA = qw( Exporter );
@EXPORT = qw( );
@EXPORT_OK = qw(
our @EXPORT_OK = qw(
get_branches
get_stages
toggle_indemand
@ -40,9 +32,13 @@ BEGIN {
add_items_to_rota
move_to_next_stage
);
%EXPORT_TAGS = ( ALL => [ @EXPORT_OK, @EXPORT ] );
our %EXPORT_TAGS = ( ALL => [@EXPORT_OK] );
}
use Koha::Items;
use Koha::StockRotationItems;
use Koha::Database;
=head1 NAME
Koha::Util::StockRotation - utility class with routines for Stock Rotation

View File

@ -18,21 +18,19 @@ package Koha::pdfformat::layout1page;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
use vars qw(@ISA @EXPORT);
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT = qw(printpdf);
}
use utf8;
use Koha::Number::Price;
use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Libraries;
BEGIN {
use Exporter ();
our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
@ISA = qw(Exporter);
@EXPORT = qw(printpdf);
}
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
use constant mm => 25.4 / 72;

View File

@ -21,21 +21,19 @@ package Koha::pdfformat::layout2pages;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
use vars qw(@ISA @EXPORT);
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT = qw(printpdf);
}
use utf8;
use Koha::Number::Price;
use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Libraries;
BEGIN {
use Exporter ();
our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
@ISA = qw(Exporter);
@EXPORT = qw(printpdf);
}
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
use constant mm => 25.4 / 72;

View File

@ -22,20 +22,18 @@ package Koha::pdfformat::layout2pagesde;
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT_OK = qw(printpdf);
}
use utf8;
use Koha::Number::Price;
use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Libraries;
our ( @ISA, @EXPORT_OK );
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(printpdf);
}
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
use constant mm => 25.4 / 72;

View File

@ -21,9 +21,14 @@ package Koha::pdfformat::layout3pages;
# along with Koha; if not, see <https://www.gnu.org/licenses>.
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
use vars qw(@ISA @EXPORT);
use List::MoreUtils qw( uniq );
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT = qw(printpdf);
}
use utf8;
use C4::Acquisition qw( get_rounded_price );
@ -31,12 +36,7 @@ use Koha::Number::Price;
use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Libraries;
BEGIN {
use Exporter ();
our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
@ISA = qw(Exporter);
@EXPORT = qw(printpdf);
}
use List::MoreUtils qw( uniq );
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.

View File

@ -21,10 +21,15 @@ package Koha::pdfformat::layout3pagesfr;
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
use vars qw(@ISA @EXPORT);
use Modern::Perl;
use base 'Exporter';
BEGIN {
our @EXPORT = qw(printpdf);
}
use MIME::Base64;
use List::MoreUtils qw( uniq );
use Modern::Perl;
use utf8;
use C4::Acquisition;
@ -32,13 +37,6 @@ use Koha::Number::Price;
use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Libraries;
BEGIN {
use Exporter ();
our ( @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS );
@ISA = qw(Exporter);
@EXPORT = qw(printpdf);
}
#be careful, all the sizes (height, width, etc...) are in mm, not PostScript points (the default measurement of PDF::API2).
#The constants exported transform that into PostScript points (/mm for millimeter, /in for inch, pt is postscript point, and as so is there only to show what is happening.
use constant mm => 25.4 / 72;

View File

@ -1,8 +1,18 @@
package VerboseWarnings;
use Modern::Perl;
use base 'Exporter';
###############################################################################
BEGIN {
our @EXPORT_OK = qw(
pedantic_p
warn_additional
warn_normal
warn_pedantic
error_additional
error_normal
);
}
=head1 NAME
@ -15,25 +25,6 @@ verbose warnings.
=cut
###############################################################################
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
);
}
###############################################################################
use vars qw( $appName $input $input_abbr $pedantic_p $pedantic_tag $quiet);
use vars qw( $warned $erred );
@ -123,5 +114,3 @@ sub warned {
}
1;
###############################################################################