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.

This patch is a squashed version of:
Bug 17600: After export.pl
Bug 17600: After perlimport
Bug 17600: Manual changes
Bug 17600: Other manual changes after second perlimports run
Bug 17600: Fix tests

And a lot of other manual changes.

export.pl is a dirty script that can be found on bug 17600.

"perlimport" is:
git clone https://github.com/oalders/App-perlimports.git
cd App-perlimports/
cpanm --installdeps .
export PERL5LIB="$PERL5LIB:/kohadevbox/koha/App-perlimports/lib"
find . \( -name "*.pl" -o -name "*.pm" \) -exec perl App-perlimports/script/perlimports --inplace-edit --no-preserve-unused --filename {} \;

The ideas of this patch are to:
* use EXPORT_OK instead of EXPORT
* perltidy the EXPORT_OK list
* remove '&' before the subroutine names
* remove some uneeded use statements
* explicitely import the subroutines we need within the controllers or
modules

Note that the private subroutines (starting with _) should not be
exported (and not used from outside of the module except from tests).

EXPORT vs EXPORT_OK (from
https://www.thegeekstuff.com/2010/06/perl-exporter-examples/)
"""
Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members.

@EXPORT and @EXPORT_OK are the two main variables used during export operation.

@EXPORT contains list of symbols (subroutines and variables) of the module to be exported into the caller namespace.

@EXPORT_OK does export of symbols on demand basis.
"""

If this patch caused a conflict with a patch you wrote prior to its
push:
* Make sure you are not reintroducing a "use" statement that has been
removed
* "$subroutine" is not exported by the C4::$MODULE module
means that you need to add the subroutine to the @EXPORT_OK list
* Bareword "$subroutine" not allowed while "strict subs"
means that you didn't imported the subroutine from the module:
  - use $MODULE qw( $subroutine list );
You can also use the fully qualified namespace: C4::$MODULE::$subroutine

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2016-11-09 12:06:44 +00:00
parent af7e41d114
commit 9d6d641d1f
1311 changed files with 4037 additions and 4322 deletions

View file

@ -22,14 +22,11 @@ use Modern::Perl;
use C4::Context; use C4::Context;
use C4::Stats; use C4::Stats;
use C4::Members; use C4::Members;
use C4::Log qw(logaction);
use Koha::Account; use Koha::Account;
use Koha::Account::Lines; use Koha::Account::Lines;
use Koha::Account::Offsets; use Koha::Account::Offsets;
use Koha::Items; use Koha::Items;
use Mojo::Util qw(deprecated);
use Data::Dumper qw(Dumper);
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
@ -37,8 +34,8 @@ BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&chargelostitem chargelostitem
&purge_zero_balance_fees purge_zero_balance_fees
); );
} }

View file

@ -19,13 +19,13 @@ package C4::Acquisition;
use Modern::Perl; use Modern::Perl;
use Carp; use Carp qw( carp croak );
use Text::CSV_XS; use Text::CSV_XS;
use C4::Context; use C4::Context;
use C4::Suggestions; use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion );
use C4::Biblio; use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal );
use C4::Contract; use C4::Contract qw( GetContract );
use C4::Log qw(logaction); use C4::Log qw( logaction );
use C4::Templates qw(gettemplate); use C4::Templates qw(gettemplate);
use Koha::DateUtils qw( dt_from_string output_pref ); use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Acquisition::Baskets; use Koha::Acquisition::Baskets;
@ -42,60 +42,58 @@ use Koha::Patrons;
use C4::Koha; use C4::Koha;
use MARC::Field; use MARC::Field;
use MARC::Record; use JSON qw( to_json );
use JSON qw(to_json);
use Time::localtime;
use vars qw(@ISA @EXPORT);
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&GetBasket &NewBasket &ReopenBasket &ModBasket GetBasket NewBasket ReopenBasket ModBasket
&GetBasketAsCSV &GetBasketGroupAsCSV GetBasketAsCSV GetBasketGroupAsCSV
&GetBasketsByBookseller &GetBasketsByBasketgroup GetBasketsByBookseller GetBasketsByBasketgroup
&GetBasketsInfosByBookseller GetBasketsInfosByBookseller
&GetBasketUsers &ModBasketUsers GetBasketUsers ModBasketUsers
&CanUserManageBasket CanUserManageBasket
&ModBasketHeader ModBasketHeader
&ModBasketgroup &NewBasketgroup &DelBasketgroup &GetBasketgroup &CloseBasketgroup ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroup CloseBasketgroup
&GetBasketgroups &ReOpenBasketgroup GetBasketgroups ReOpenBasketgroup
&ModOrder &GetOrder &GetOrders &GetOrdersByBiblionumber ModOrder GetOrder GetOrders GetOrdersByBiblionumber
&GetOrderFromItemnumber GetOrderFromItemnumber
&SearchOrders &GetHistory &GetRecentAcqui SearchOrders GetHistory GetRecentAcqui
&ModReceiveOrder &CancelReceipt ModReceiveOrder CancelReceipt
&TransferOrder populate_order_with_prices
&ModItemOrder TransferOrder
ModItemOrder
&GetParcels GetParcels
&GetInvoices GetInvoices
&GetInvoice GetInvoice
&GetInvoiceDetails GetInvoiceDetails
&AddInvoice AddInvoice
&ModInvoice ModInvoice
&CloseInvoice CloseInvoice
&ReopenInvoice ReopenInvoice
&DelInvoice DelInvoice
&MergeInvoices MergeInvoices
&AddClaim AddClaim
&GetBiblioCountByBasketno GetBiblioCountByBasketno
&GetOrderUsers GetOrderUsers
&ModOrderUsers ModOrderUsers
&NotifyOrderUsers NotifyOrderUsers
&FillWithDefaultValues FillWithDefaultValues
&get_rounded_price get_rounded_price
&get_rounding_sql get_rounding_sql
); );
} }

View file

@ -19,14 +19,11 @@ package C4::Auth;
use strict; use strict;
use warnings; use warnings;
use Carp qw/croak/; use Carp qw( croak );
use Digest::MD5 qw(md5_base64); use Digest::MD5 qw( md5_base64 );
use JSON qw/encode_json/;
use URI::Escape;
use CGI::Session; use CGI::Session;
require Exporter;
use C4::Context; use C4::Context;
use C4::Templates; # to get the template use C4::Templates; # to get the template
use C4::Languages; use C4::Languages;
@ -34,25 +31,25 @@ use C4::Search::History;
use Koha; use Koha;
use Koha::Logger; use Koha::Logger;
use Koha::Caches; use Koha::Caches;
use Koha::AuthUtils qw(get_script_name hash_password); use Koha::AuthUtils qw( get_script_name hash_password );
use Koha::Checkouts; use Koha::Checkouts;
use Koha::DateUtils qw(dt_from_string); use Koha::DateUtils qw( dt_from_string );
use Koha::Library::Groups; use Koha::Library::Groups;
use Koha::Libraries; use Koha::Libraries;
use Koha::Cash::Registers; use Koha::Cash::Registers;
use Koha::Desks; use Koha::Desks;
use Koha::Patrons; use Koha::Patrons;
use Koha::Patron::Consents; use Koha::Patron::Consents;
use POSIX qw/strftime/; use List::MoreUtils qw( any );
use List::MoreUtils qw/ any /; use Encode;
use Encode qw( encode is_utf8); use C4::Auth_with_shibboleth qw( shib_ok get_login_shib login_shib_url logout_shib checkpw_shib );
use C4::Auth_with_shibboleth;
use Net::CIDR; use Net::CIDR;
use C4::Log qw/logaction/; use C4::Log qw( logaction );
# use utf8; # use utf8;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $ldap $cas $caslogout);
use vars qw($ldap $cas $caslogout);
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
sub psgi_env { any { /^psgi\./ } keys %ENV } sub psgi_env { any { /^psgi\./ } keys %ENV }
@ -63,12 +60,15 @@ BEGIN {
C4::Context->set_remote_address; C4::Context->set_remote_address;
@ISA = qw(Exporter); require Exporter;
@EXPORT = qw(&checkauth &get_template_and_user &haspermission &get_user_subpermissions); @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 track_login_daily &in_iprange @EXPORT_OK = qw(
checkauth check_api_auth get_session check_cookie_auth checkpw checkpw_internal checkpw_hash
get_all_subpermissions get_user_subpermissions track_login_daily in_iprange
get_template_and_user haspermission
); );
%EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] );
$ldap = C4::Context->config('useldapserver') || 0; $ldap = C4::Context->config('useldapserver') || 0;
$cas = C4::Context->preference('casAuthentication'); $cas = C4::Context->preference('casAuthentication');
$caslogout = C4::Context->preference('casLogout'); $caslogout = C4::Context->preference('casLogout');

View file

@ -21,20 +21,19 @@ use strict;
use warnings; use warnings;
use C4::Context; use C4::Context;
use Koha::AuthUtils qw(get_script_name); use Koha::AuthUtils qw( get_script_name );
use Authen::CAS::Client; use Authen::CAS::Client;
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
use FindBin;
use YAML::XS; use YAML::XS;
use Koha::Logger; use Koha::Logger;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required); @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required);
} }
my $defaultcasserver; my $defaultcasserver;
my $casservers; my $casservers;

View file

@ -18,23 +18,21 @@ package C4::Auth_with_ldap;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl; use Modern::Perl;
use Carp; use Carp qw( croak );
use C4::Context; use C4::Context;
use C4::Members::Messaging; use C4::Members::Messaging;
use C4::Auth qw(checkpw_internal); use C4::Auth qw( checkpw_internal );
use Koha::Patrons; use Koha::Patrons;
use Koha::AuthUtils qw(hash_password); use Koha::AuthUtils qw( hash_password );
use List::MoreUtils qw( any );
use Net::LDAP; use Net::LDAP;
use Net::LDAP::Filter; use Net::LDAP::Filter;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( checkpw_ldap ); @EXPORT_OK = qw( checkpw_ldap );
} }
# Redefine checkpw_ldap: # Redefine checkpw_ldap:

View file

@ -20,22 +20,20 @@ package C4::Auth_with_shibboleth;
use Modern::Perl; use Modern::Perl;
use C4::Context; use C4::Context;
use Koha::AuthUtils qw(get_script_name); use Koha::AuthUtils qw( get_script_name );
use Koha::Database; use Koha::Database;
use Koha::Patrons; use Koha::Patrons;
use C4::Members::Messaging; use C4::Members::Messaging;
use Carp; use Carp qw( carp );
use CGI; use List::MoreUtils qw( any );
use List::MoreUtils qw(any);
use Koha::Logger; use Koha::Logger;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = @EXPORT_OK =
qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib); qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
} }

View file

@ -21,13 +21,12 @@ package C4::AuthoritiesMarc;
use strict; use strict;
use warnings; use warnings;
use C4::Context; use C4::Context;
use MARC::Record; use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblio );
use C4::Biblio; use C4::Search qw( FindDuplicate new_record_from_zebra );
use C4::Search;
use C4::AuthoritiesMarc::MARC21; use C4::AuthoritiesMarc::MARC21;
use C4::AuthoritiesMarc::UNIMARC; use C4::AuthoritiesMarc::UNIMARC;
use C4::Charset; use C4::Charset qw( SetUTF8Flag );
use C4::Log; use C4::Log qw( logaction );
use Koha::MetadataRecord::Authority; use Koha::MetadataRecord::Authority;
use Koha::Authorities; use Koha::Authorities;
use Koha::Authority::MergeRequests; use Koha::Authority::MergeRequests;
@ -38,35 +37,38 @@ use Koha::SearchEngine;
use Koha::SearchEngine::Indexer; use Koha::SearchEngine::Indexer;
use Koha::SearchEngine::Search; use Koha::SearchEngine::Search;
use vars qw(@ISA @EXPORT); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&GetTagsLabels GetTagsLabels
&GetAuthMARCFromKohaField GetAuthMARCFromKohaField
&AddAuthority AddAuthority
&ModAuthority ModAuthority
&DelAuthority DelAuthority
&GetAuthority GetAuthority
&GetAuthorityXML GetAuthorityXML
&SearchAuthorities SearchAuthorities
&BuildSummary BuildSummary
&BuildAuthHierarchies BuildAuthHierarchies
&BuildAuthHierarchy BuildAuthHierarchy
&GenerateHierarchy GenerateHierarchy
GetHeaderAuthority
AddAuthorityTrees
CompareFieldWithAuthority
&merge merge
&FindDuplicateAuthority FindDuplicateAuthority
&GuessAuthTypeCode GuessAuthTypeCode
&GuessAuthId GuessAuthId
); compare_fields
);
} }

View file

@ -18,7 +18,6 @@ package C4::AuthoritiesMarc::MARC21;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl; use Modern::Perl;
use MARC::Record;
=head1 NAME =head1 NAME

View file

@ -20,7 +20,7 @@ package C4::BackgroundJob;
use Modern::Perl; use Modern::Perl;
use C4::Context; use C4::Context;
use C4::Auth qw/get_session/; use C4::Auth qw( get_session );
use Digest::MD5; use Digest::MD5;

View file

@ -20,7 +20,7 @@ package C4::Barcodes;
use strict; use strict;
use warnings; use warnings;
use Carp; use Carp qw( carp );
use C4::Context; use C4::Context;
use C4::Barcodes::hbyymmincr; use C4::Barcodes::hbyymmincr;
@ -28,15 +28,8 @@ use C4::Barcodes::annual;
use C4::Barcodes::incremental; use C4::Barcodes::incremental;
use C4::Barcodes::EAN13; use C4::Barcodes::EAN13;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use vars qw($max $prefformat); use vars qw($max $prefformat);
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw();
}
sub _prefformat { sub _prefformat {
unless (defined $prefformat) { unless (defined $prefformat) {
unless ($prefformat = C4::Context->preference('autoBarcode')) { unless ($prefformat = C4::Context->preference('autoBarcode')) {

View file

@ -22,8 +22,8 @@ use warnings;
use C4::Context; use C4::Context;
use Algorithm::CheckDigits; use Algorithm::CheckDigits qw( CheckDigits );
use Carp; use Carp qw( carp );
use vars qw(@ISA); use vars qw(@ISA);

View file

@ -20,11 +20,11 @@ package C4::Barcodes::annual;
use strict; use strict;
use warnings; use warnings;
use Carp; use Carp qw( carp );
use C4::Context; use C4::Context;
use Koha::DateUtils qw( output_pref dt_from_string ); use Koha::DateUtils qw( dt_from_string output_pref );
use vars qw(@ISA); use vars qw(@ISA);
use vars qw($width); use vars qw($width);

View file

@ -19,7 +19,7 @@ package C4::Barcodes::hbyymmincr;
use Modern::Perl; use Modern::Perl;
use Carp; use Carp qw( carp );
use C4::Context; use C4::Context;

View file

@ -21,12 +21,12 @@ package C4::Biblio;
use Modern::Perl; use Modern::Perl;
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
AddBiblio AddBiblio
GetBiblioData GetBiblioData
GetMarcBiblio GetMarcBiblio
@ -45,6 +45,7 @@ BEGIN {
GetMarcQuantity GetMarcQuantity
GetAuthorisedValueDesc GetAuthorisedValueDesc
GetMarcStructure GetMarcStructure
GetMarcSubfieldStructure
IsMarcStructureInternal IsMarcStructureInternal
GetMarcFromKohaField GetMarcFromKohaField
GetMarcSubfieldStructureFromKohaField GetMarcSubfieldStructureFromKohaField
@ -54,6 +55,7 @@ BEGIN {
CountItemsIssued CountItemsIssued
ModBiblio ModBiblio
ModZebra ModZebra
EmbedItemsInMarcBiblio
UpdateTotalIssues UpdateTotalIssues
RemoveAllNsb RemoveAllNsb
DelBiblio DelBiblio
@ -63,35 +65,42 @@ BEGIN {
TransformHtmlToMarc TransformHtmlToMarc
TransformHtmlToXml TransformHtmlToXml
prepare_host_field prepare_host_field
TransformMarcToKohaOneField
); );
# Internal functions # Internal functions
# those functions are exported but should not be used # those functions are exported but should not be used
# they are useful in a few circumstances, so they are exported, # they are useful in a few circumstances, so they are exported,
# but don't use them unless you are a core developer ;-) # but don't use them unless you are a core developer ;-)
push @EXPORT, qw( push @EXPORT_OK, qw(
ModBiblioMarc ModBiblioMarc
); );
} }
use Carp; use Carp qw( carp );
use Try::Tiny; use Try::Tiny qw( catch try );
use Encode qw( decode is_utf8 ); use Encode;
use List::MoreUtils qw( uniq ); use List::MoreUtils qw( uniq );
use MARC::Record; use MARC::Record;
use MARC::File::USMARC; use MARC::File::USMARC;
use MARC::File::XML; use MARC::File::XML;
use POSIX qw(strftime); use POSIX qw( strftime );
use Module::Load::Conditional qw(can_load); use Module::Load::Conditional qw( can_load );
use C4::Koha; use C4::Koha;
use C4::Log; # logaction use C4::Log qw( logaction ); # logaction
use C4::Budgets; use C4::Budgets;
use C4::ClassSource; use C4::ClassSource qw( GetClassSort );
use C4::Charset; use C4::Charset qw(
nsb_clean
SetMarcUnicodeFlag
SetUTF8Flag
StripNonXmlChars
);
use C4::Linker; use C4::Linker;
use C4::OAI::Sets; use C4::OAI::Sets;
use C4::Items qw( GetHiddenItemnumbers GetMarcItem );
use Koha::Logger; use Koha::Logger;
use Koha::Caches; use Koha::Caches;
@ -2572,7 +2581,6 @@ sub EmbedItemsInMarcBiblio {
my $opachiddenitems = $opac my $opachiddenitems = $opac
&& ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ ); && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
require C4::Items;
while ( my ($itemnumber) = $sth->fetchrow_array ) { while ( my ($itemnumber) = $sth->fetchrow_array ) {
next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers; next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
my $item; my $item;

View file

@ -22,22 +22,21 @@ use strict;
use warnings; use warnings;
use C4::Biblio; use C4::Biblio;
use C4::Koha; use C4::Koha qw( GetNormalizedISBN );
use C4::Charset; use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
use MARC::File::USMARC; use MARC::File::USMARC;
use MARC::Field; use MARC::Field;
use C4::ImportBatch; use C4::ImportBatch qw( GetZ3950BatchId AddBiblioToBatch AddAuthToBatch );
use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority
use C4::Languages; use C4::Languages;
use Koha::Database; use Koha::Database;
use Koha::XSLT::Base; use Koha::XSLT::Base;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth); @EXPORT_OK = qw(BreedingSearch Z3950Search Z3950SearchAuth);
} }
=head1 NAME =head1 NAME

View file

@ -23,54 +23,61 @@ use Koha::Database;
use Koha::Patrons; use Koha::Patrons;
use Koha::Acquisition::Invoice::Adjustments; use Koha::Acquisition::Invoice::Adjustments;
use C4::Acquisition; use C4::Acquisition;
use vars qw(@ISA @EXPORT);
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&GetBudget GetBudget
&GetBudgetByOrderNumber GetBudgetByOrderNumber
&GetBudgetByCode GetBudgetByCode
&GetBudgets GetBudgets
&BudgetsByActivity BudgetsByActivity
&GetBudgetsReport GetBudgetsReport
&GetBudgetReport GetBudgetReport
&GetBudgetHierarchy GetBudgetsByActivity
&AddBudget GetBudgetHierarchy
&ModBudget AddBudget
&DelBudget ModBudget
&GetBudgetSpent DelBudget
&GetBudgetOrdered GetBudgetSpent
&GetBudgetName GetBudgetOrdered
&GetPeriodsCount GetBudgetName
GetBudgetHierarchySpent GetPeriodsCount
GetBudgetHierarchyOrdered GetBudgetHierarchySpent
GetBudgetHierarchyOrdered
&GetBudgetUsers GetBudgetUsers
&ModBudgetUsers ModBudgetUsers
&CanUserUseBudget CanUserUseBudget
&CanUserModifyBudget CanUserModifyBudget
&GetBudgetPeriod GetBudgetPeriod
&GetBudgetPeriods GetBudgetPeriods
&ModBudgetPeriod ModBudgetPeriod
&AddBudgetPeriod AddBudgetPeriod
&DelBudgetPeriod DelBudgetPeriod
&ModBudgetPlan ModBudgetPlan
&GetBudgetsPlanCell GetBudgetsPlanCell
&AddBudgetPlanValue AddBudgetPlanValue
&GetBudgetAuthCats GetBudgetAuthCats
&BudgetHasChildren BudgetHasChildren
&CheckBudgetParent GetBudgetChildren
&CheckBudgetParentPerm SetOwnerToFundHierarchy
CheckBudgetParent
CheckBudgetParentPerm
&HideCols HideCols
&GetCols GetCols
);
CloneBudgetPeriod
CloneBudgetHierarchy
MoveOrders
);
} }
# ----------------------------BUDGETS.PM-----------------------------"; # ----------------------------BUDGETS.PM-----------------------------";

View file

@ -19,8 +19,8 @@ use strict;
use warnings; use warnings;
use vars qw(@EXPORT); use vars qw(@EXPORT);
use Carp; use Carp qw( croak );
use Date::Calc qw( Date_to_Days Today); use Date::Calc qw( Today );
use C4::Context; use C4::Context;
use Koha::Caches; use Koha::Caches;

View file

@ -19,19 +19,18 @@ package C4::Charset;
use Modern::Perl; use Modern::Perl;
use MARC::Charset qw/marc8_to_utf8/; use MARC::Charset;
use Text::Iconv; use Text::Iconv;
use Unicode::Normalize; use Unicode::Normalize qw( NFC NFD );
use Encode qw( decode encode is_utf8 ); use Encode;
use Koha::Logger; use Koha::Logger;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
NormalizeString NormalizeString
IsStringUTF8ish IsStringUTF8ish
MarcToUTF8Record MarcToUTF8Record

View file

@ -24,32 +24,31 @@ use POSIX qw( floor );
use YAML::XS; use YAML::XS;
use Encode; use Encode;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use C4::Context; use C4::Context;
use C4::Stats; use C4::Stats qw( UpdateStats );
use C4::Reserves; use C4::Reserves qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority RevertWaitingStatus IsItemOnHoldAndFound IsAvailableForItemLevelRequest );
use C4::Biblio; use C4::Biblio qw( UpdateTotalIssues );
use C4::Items; use C4::Items qw( ModItemTransfer ModDateLastSeen CartToShelf );
use C4::Members;
use C4::Accounts; use C4::Accounts;
use C4::ItemCirculationAlertPreference; use C4::ItemCirculationAlertPreference;
use C4::Message; use C4::Message;
use C4::Log; # logaction use C4::Log qw( logaction ); # logaction
use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units); use C4::Overdues;
use C4::RotatingCollections qw(GetCollectionItemBranches); use C4::RotatingCollections qw(GetCollectionItemBranches);
use Algorithm::CheckDigits; use Algorithm::CheckDigits qw( CheckDigits );
use Data::Dumper; use Data::Dumper qw( Dumper );
use Koha::Account; use Koha::Account;
use Koha::AuthorisedValues; use Koha::AuthorisedValues;
use Koha::Biblioitems; use Koha::Biblioitems;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Calendar; use Koha::Calendar;
use Koha::Checkouts; use Koha::Checkouts;
use Koha::Illrequests; use Koha::Illrequests;
use Koha::Items; use Koha::Items;
use Koha::Patrons; use Koha::Patrons;
use Koha::Patron::Debarments; use Koha::Patron::Debarments qw( DelUniqueDebarment GetDebarments );
use Koha::Database; use Koha::Database;
use Koha::Libraries; use Koha::Libraries;
use Koha::Account::Lines; use Koha::Account::Lines;
@ -62,77 +61,68 @@ use Koha::Config::SysPref;
use Koha::Checkouts::ReturnClaims; use Koha::Checkouts::ReturnClaims;
use Koha::SearchEngine::Indexer; use Koha::SearchEngine::Indexer;
use Koha::Exceptions::Checkout; use Koha::Exceptions::Checkout;
use Carp; use Carp qw( carp );
use List::MoreUtils qw( uniq any ); use List::MoreUtils qw( any );
use Scalar::Util qw( looks_like_number ); use Scalar::Util qw( looks_like_number );
use Try::Tiny; use Date::Calc qw( Date_to_Days );
use Date::Calc qw( our (@ISA, @EXPORT_OK);
Today
Today_and_Now
Add_Delta_YM
Add_Delta_DHMS
Date_to_Days
Day_of_Week
Add_Delta_Days
);
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
BEGIN { BEGIN {
require Exporter;
@ISA = qw(Exporter);
# FIXME subs that should probably be elsewhere require Exporter;
push @EXPORT, qw( @ISA = qw(Exporter);
&barcodedecode
&LostItem
&ReturnLostItem
&GetPendingOnSiteCheckouts
);
# subs to deal with issuing a book # FIXME subs that should probably be elsewhere
push @EXPORT, qw( push @EXPORT_OK, qw(
&CanBookBeIssued barcodedecode
&CanBookBeRenewed LostItem
&AddIssue ReturnLostItem
&AddRenewal GetPendingOnSiteCheckouts
&GetRenewCount
&GetSoonestRenewDate
&GetLatestAutoRenewDate
&GetIssuingCharges
&GetBranchBorrowerCircRule
&GetBranchItemRule
&GetOpenIssue
&CheckIfIssuedToPatron
&IsItemIssued
GetTopIssues
);
# subs to deal with returns CanBookBeIssued
push @EXPORT, qw( checkHighHolds
&AddReturn CanBookBeRenewed
&MarkIssueReturned AddIssue
); GetLoanLength
GetHardDueDate
AddRenewal
GetRenewCount
GetSoonestRenewDate
GetLatestAutoRenewDate
GetIssuingCharges
AddIssuingCharge
GetBranchBorrowerCircRule
GetBranchItemRule
GetBiblioIssues
GetOpenIssue
GetUpcomingDueIssues
CheckIfIssuedToPatron
IsItemIssued
GetAgeRestriction
GetTopIssues
# subs to deal with transfers AddReturn
push @EXPORT, qw( MarkIssueReturned
&transferbook
&GetTransfers
&GetTransfersFromTo
&updateWrongTransfer
&IsBranchTransferAllowed
&CreateBranchTransferLimit
&DeleteBranchTransferLimits
&TransferSlip
);
# subs to deal with offline circulation transferbook
push @EXPORT, qw( TooMany
&GetOfflineOperations GetTransfers
&GetOfflineOperation GetTransfersFromTo
&AddOfflineOperation updateWrongTransfer
&DeleteOfflineOperation CalcDateDue
&ProcessOfflineOperation CheckValidBarcode
IsBranchTransferAllowed
CreateBranchTransferLimit
DeleteBranchTransferLimits
TransferSlip
GetOfflineOperations
GetOfflineOperation
AddOfflineOperation
DeleteOfflineOperation
ProcessOfflineOperation
ProcessOfflinePayment
); );
push @EXPORT_OK, '_GetCircControlBranch'; # This is wrong!
} }
=head1 NAME =head1 NAME

View file

@ -20,12 +20,18 @@ package C4::ClassSortRoutine;
use strict; use strict;
use warnings; use warnings;
require Exporter;
use Class::Factory::Util; use Class::Factory::Util;
use C4::Context; 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 =head1 NAME
@ -40,12 +46,6 @@ use C4::ClassSortRoutine;
=cut =cut
@ISA = qw(Exporter);
@EXPORT = qw(
&GetSortRoutineNames
&GetClassSortKey
);
# initialization code # initialization code
my %loaded_routines = (); my %loaded_routines = ();
my @sort_routines = GetSortRoutineNames(); my @sort_routines = GetSortRoutineNames();

View file

@ -28,7 +28,7 @@ C4::ClassSortRoutine::Dewey - generic call number sorting key routine
=head1 SYNOPSIS =head1 SYNOPSIS
use C4::ClassSortRoutine; use C4::ClassSortRoutine qw( GetClassSortKey );
my $cn_sort = GetClassSortKey('Dewey', $cn_class, $cn_item); my $cn_sort = GetClassSortKey('Dewey', $cn_class, $cn_item);

View file

@ -28,7 +28,7 @@ C4::ClassSortRoutine::Generic - generic call number sorting key routine
=head1 SYNOPSIS =head1 SYNOPSIS
use C4::ClassSortRoutine; use C4::ClassSortRoutine qw( GetClassSortKey );
my $cn_sort = GetClassSortKey('Generic', $cn_class, $cn_item); my $cn_sort = GetClassSortKey('Generic', $cn_class, $cn_item);

View file

@ -30,7 +30,7 @@ C4::ClassSortRoutine::LCC - generic call number sorting key routine
=head1 SYNOPSIS =head1 SYNOPSIS
use C4::ClassSortRoutine; use C4::ClassSortRoutine qw( GetClassSortKey );
my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item); my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item);

View file

@ -20,12 +20,20 @@ package C4::ClassSource;
use strict; use strict;
use warnings; use warnings;
require Exporter;
use C4::Context; use C4::Context;
use C4::ClassSortRoutine; use C4::ClassSortRoutine qw( GetClassSortKey );
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
our (@ISA, @EXPORT_OK);
BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
GetClassSources
GetClassSource
GetClassSortRule
GetClassSort
);
}
=head1 NAME =head1 NAME
@ -44,17 +52,6 @@ sources and sorting rules.
=cut =cut
@ISA = qw(Exporter);
@EXPORT = qw(
&GetClassSources
&GetClassSource
&GetClassSortRule
&GetClassSort
);
=head2 GetClassSources =head2 GetClassSources
my $sources = GetClassSources(); my $sources = GetClassSources();

View file

@ -20,7 +20,6 @@ package C4::ClassSplitRoutine;
use Modern::Perl; use Modern::Perl;
require Exporter; require Exporter;
use Class::Factory::Util;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
@ -39,7 +38,7 @@ use C4::ClassSplitRoutine;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&GetSplitRoutineNames GetSplitRoutineNames
); );
=head2 GetSplitRoutineNames =head2 GetSplitRoutineNames

View file

@ -35,12 +35,11 @@ BEGIN {
} }
}; };
use Carp; use Carp qw( carp );
use DateTime::TimeZone; use DateTime::TimeZone;
use Encode; use Encode;
use File::Spec; use File::Spec;
use Module::Load::Conditional qw(can_load); use POSIX;
use POSIX ();
use YAML::XS; use YAML::XS;
use ZOOM; use ZOOM;

View file

@ -25,14 +25,14 @@ use vars qw(@ISA @EXPORT);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&GetContracts GetContracts
&GetContract GetContract
&AddContract AddContract
&ModContract ModContract
&DelContract DelContract
); );
} }
=head1 NAME =head1 NAME

View file

@ -17,43 +17,42 @@ package C4::CourseReserves;
use Modern::Perl; use Modern::Perl;
use List::MoreUtils qw(any); use List::MoreUtils qw( any );
use C4::Context; use C4::Context;
use C4::Circulation qw(GetOpenIssue); use C4::Circulation qw( GetOpenIssue );
use Koha::Courses; use Koha::Courses;
use Koha::Course::Instructors; use Koha::Course::Instructors;
use Koha::Course::Items; use Koha::Course::Items;
use Koha::Course::Reserves; use Koha::Course::Reserves;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS @FIELDS); use vars qw(@FIELDS);
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT_OK = qw( @EXPORT_OK = qw(
&GetCourse GetCourse
&ModCourse ModCourse
&GetCourses GetCourses
&DelCourse DelCourse
&GetCourseInstructors GetCourseInstructors
&ModCourseInstructors ModCourseInstructors
&GetCourseItem GetCourseItem
&ModCourseItem ModCourseItem
&GetCourseReserve GetCourseReserve
&ModCourseReserve ModCourseReserve
&GetCourseReserves GetCourseReserves
&DelCourseReserve DelCourseReserve
&SearchCourses SearchCourses
&GetItemCourseReservesInfo GetItemCourseReservesInfo
); );
%EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
@FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' ); @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
} }

View file

@ -38,7 +38,23 @@ BEGIN {
get_unit_values get_unit_values
html_table html_table
); );
use C4::Creators::Lib; use C4::Creators::Lib qw(
get_all_image_names
get_all_layouts
get_all_profiles
get_all_templates
get_barcode_types
get_batch_summary
get_card_summary
get_font_types
get_label_summary
get_label_types
get_output_formats
get_table_names
get_text_justification_types
get_unit_values
html_table
);
use C4::Creators::PDF; use C4::Creators::PDF;
} }

View file

@ -18,7 +18,7 @@ package C4::Creators::Lib;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl; use Modern::Perl;
use Storable qw(dclone); use Storable qw( dclone );
use autouse 'Data::Dumper' => qw(Dumper); use autouse 'Data::Dumper' => qw(Dumper);

View file

@ -19,10 +19,41 @@ package C4::Creators::PDF;
use strict; use strict;
use warnings; use warnings;
use PDF::Reuse; use PDF::Reuse qw(
prAdd
prAltJpeg
prBookmark
prCompress
prDoc
prDocDir
prDocForm
prEnd
prExtract
prField
prFile
prFont
prFontSize
prForm
prGetLogBuffer
prGraphState
prImage
prInit
prInitVars
prJpeg
prJs
prLink
prLog
prLogDir
prMbox
prPage
prSinglePage
prStrWidth
prText
prTTFont
);
use PDF::Reuse::Barcode; use PDF::Reuse::Barcode;
use File::Temp; use File::Temp;
use List::Util qw/first/; use List::Util qw( first );
sub _InitVars { sub _InitVars {

View file

@ -6,7 +6,7 @@ use warnings;
use autouse 'Data::Dumper' => qw(Dumper); use autouse 'Data::Dumper' => qw(Dumper);
use C4::Context; use C4::Context;
use C4::Creators::Lib qw(get_unit_values); use C4::Creators::Lib qw( get_unit_values );
sub _check_params { sub _check_params {

View file

@ -2,12 +2,12 @@ package C4::Creators::Template;
use strict; use strict;
use warnings; use warnings;
use POSIX qw(ceil); use POSIX qw( ceil );
use autouse 'Data::Dumper' => qw(Dumper); use autouse 'Data::Dumper' => qw(Dumper);
use C4::Context; use C4::Context;
use C4::Creators::Profile; use C4::Creators::Profile;
use C4::Creators::Lib qw(get_unit_values); use C4::Creators::Lib qw( get_unit_values );
sub _check_params { sub _check_params {

View file

@ -19,21 +19,20 @@ package C4::External::BakerTaylor;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use XML::Simple; use XML::Simple;
use LWP::Simple; use LWP::Simple qw( get );
use HTTP::Request::Common;
use C4::Context; use C4::Context;
use Modern::Perl; use Modern::Perl;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); use vars qw(%EXPORT_TAGS $VERSION);
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
$VERSION = 3.07.00.049; $VERSION = 3.07.00.049;
@EXPORT_OK = qw(&availability &content_cafe &image_url &link_url &http_jacket_link); @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
%EXPORT_TAGS = (all=>\@EXPORT_OK);
} }
# These variables are plack safe: they are initialized each time # These variables are plack safe: they are initialized each time

View file

@ -21,7 +21,7 @@ use strict;
use warnings; use warnings;
use Koha; use Koha;
use JSON; use JSON qw( from_json );
use Koha::Caches; use Koha::Caches;
use HTTP::Request; use HTTP::Request;
use HTTP::Request::Common; use HTTP::Request::Common;

View file

@ -17,11 +17,10 @@ package C4::External::Syndetics;
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use XML::Simple; use XML::Simple qw( XMLout );
use XML::LibXML; use XML::LibXML;
use LWP::Simple; use LWP::Simple qw( $ua );
use LWP::UserAgent; use LWP::UserAgent;
use HTTP::Request::Common;
use strict; use strict;
use warnings; use warnings;
@ -32,13 +31,13 @@ BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&get_syndetics_index get_syndetics_index
&get_syndetics_summary get_syndetics_summary
&get_syndetics_toc get_syndetics_toc
&get_syndetics_editions get_syndetics_editions
&get_syndetics_excerpt get_syndetics_excerpt
&get_syndetics_reviews get_syndetics_reviews
&get_syndetics_anotes get_syndetics_anotes
); );
} }

View file

@ -19,11 +19,9 @@ package C4::Heading;
use Modern::Perl; use Modern::Perl;
use MARC::Record;
use MARC::Field; use MARC::Field;
use C4::Context; use C4::Context;
use Module::Load; use Module::Load qw( load );
use Carp;
=head1 NAME =head1 NAME

View file

@ -19,7 +19,6 @@ package C4::Heading::MARC21;
use strict; use strict;
use warnings; use warnings;
use MARC::Record;
use MARC::Field; use MARC::Field;

View file

@ -20,7 +20,6 @@ package C4::Heading::UNIMARC;
use 5.010; use 5.010;
use strict; use strict;
use warnings; use warnings;
use MARC::Record;
use MARC::Field; use MARC::Field;
use C4::Context; use C4::Context;

View file

@ -24,29 +24,26 @@ use warnings;
use C4::Context; use C4::Context;
use C4::Search; use C4::Search;
use C4::Items; use C4::Circulation qw( GetTransfers GetBranchItemRule );
use C4::Circulation; use Koha::DateUtils qw( dt_from_string );
use C4::Members;
use C4::Biblio;
use Koha::DateUtils;
use Koha::Items; use Koha::Items;
use Koha::Patrons; use Koha::Patrons;
use Koha::Libraries; use Koha::Libraries;
use List::Util qw(shuffle); use List::Util qw( shuffle );
use List::MoreUtils qw(any); use List::MoreUtils qw( any );
use Data::Dumper;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT_OK = qw( @EXPORT_OK = qw(
&CreateQueue CreateQueue
&GetHoldsQueueItems GetHoldsQueueItems
&TransportCostMatrix TransportCostMatrix
&UpdateTransportCostMatrix UpdateTransportCostMatrix
GetPendingHoldRequestsForBib
); );
} }

View file

@ -21,19 +21,17 @@ use strict;
use warnings; use warnings;
use C4::Members; use C4::Members;
use C4::Items; use C4::Items qw( get_hostitemnumbers_of );
use C4::Circulation; use C4::Circulation qw( CanBookBeRenewed barcodedecode CanBookBeIssued AddRenewal );
use C4::Accounts; use C4::Accounts;
use C4::Biblio; use C4::Biblio qw( GetMarcBiblio );
use C4::Reserves qw(AddReserve CanBookBeReserved CanItemBeReserved IsAvailableForItemLevelRequest); use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved );
use C4::Context; use C4::Context;
use C4::AuthoritiesMarc; use C4::Auth;
use XML::Simple;
use HTML::Entities;
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
use DateTime; use DateTime;
use C4::Auth; use C4::Auth;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string );
use Koha::Biblios; use Koha::Biblios;
use Koha::Checkouts; use Koha::Checkouts;

View file

@ -21,67 +21,78 @@ use strict;
use warnings; use warnings;
use C4::Context; use C4::Context;
use C4::Koha; use C4::Koha qw( GetNormalizedISBN );
use C4::Biblio; use C4::Biblio qw(
use C4::Items; AddBiblio
use C4::Charset; DelBiblio
GetMarcFromKohaField
GetXmlBiblio
ModBiblio
TransformMarcToKoha
);
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
use C4::AuthoritiesMarc; use C4::AuthoritiesMarc;
use C4::MarcModificationTemplates; use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
use Koha::Items; use Koha::Items;
use Koha::Plugins::Handler; use Koha::Plugins::Handler;
use Koha::Logger; use Koha::Logger;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
GetZ3950BatchId GetZ3950BatchId
GetWebserviceBatchId GetWebserviceBatchId
GetImportRecordMarc GetImportRecordMarc
GetImportRecordMarcXML GetImportRecordMarcXML
AddImportBatch GetRecordFromImportBiblio
GetImportBatch AddImportBatch
AddAuthToBatch GetImportBatch
AddBiblioToBatch AddAuthToBatch
AddItemsToImportBiblio AddBiblioToBatch
ModAuthorityInBatch AddItemsToImportBiblio
ModBiblioInBatch ModAuthorityInBatch
ModBiblioInBatch
BatchStageMarcRecords BatchStageMarcRecords
BatchFindDuplicates BatchFindDuplicates
BatchCommitRecords BatchCommitRecords
BatchRevertRecords BatchRevertRecords
CleanBatch CleanBatch
DeleteBatch DeleteBatch
GetAllImportBatches GetAllImportBatches
GetStagedWebserviceBatches GetStagedWebserviceBatches
GetImportBatchRangeDesc GetImportBatchRangeDesc
GetNumberOfNonZ3950ImportBatches GetNumberOfNonZ3950ImportBatches
GetImportBiblios GetImportBiblios
GetImportRecordsRange GetImportRecordsRange
GetItemNumbersFromImportBatch GetItemNumbersFromImportBatch
GetImportBatchStatus GetImportBatchStatus
SetImportBatchStatus SetImportBatchStatus
GetImportBatchOverlayAction GetImportBatchOverlayAction
SetImportBatchOverlayAction SetImportBatchOverlayAction
GetImportBatchNoMatchAction GetImportBatchNoMatchAction
SetImportBatchNoMatchAction SetImportBatchNoMatchAction
GetImportBatchItemAction GetImportBatchItemAction
SetImportBatchItemAction SetImportBatchItemAction
GetImportBatchMatcher GetImportBatchMatcher
SetImportBatchMatcher SetImportBatchMatcher
GetImportRecordOverlayStatus GetImportRecordOverlayStatus
SetImportRecordOverlayStatus SetImportRecordOverlayStatus
GetImportRecordStatus GetImportRecordStatus
SetImportRecordStatus SetImportRecordStatus
SetMatchedBiblionumber SetMatchedBiblionumber
GetImportRecordMatches GetImportRecordMatches
SetImportRecordMatches SetImportRecordMatches
);
RecordsFromMARCXMLFile
RecordsFromISO2709File
RecordsFromMarcPlugin
);
} }
=head1 NAME =head1 NAME

View file

@ -21,23 +21,22 @@ use strict;
use warnings; use warnings;
use XML::LibXML; use XML::LibXML;
use XML::LibXML::XPathContext; use XML::LibXML::XPathContext;
use Digest::MD5 qw(); use Digest::MD5;
use POSIX qw(strftime); use POSIX qw( strftime );
use Text::CSV_XS; use Text::CSV_XS;
use List::MoreUtils qw(indexes); use List::MoreUtils qw( indexes );
use C4::Context; use C4::Context;
use Koha::Logger; use Koha::Logger;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&ExportFramework ExportFramework
&ImportFramework ImportFramework
&createODS createODS
); );
} }

View file

@ -18,24 +18,23 @@ package C4::InstallAuth;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl; use Modern::Perl;
use Digest::MD5 qw(md5_base64);
use CGI::Session; use CGI::Session;
use File::Spec; use File::Spec;
require Exporter; require Exporter;
use C4::Context; use C4::Context;
use C4::Output; use C4::Output qw( output_html_with_http_headers );
use C4::Templates; use C4::Templates;
use C4::Koha;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN {
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&checkauth checkauth
&get_template_and_user get_template_and_user
); );
}
=head1 NAME =head1 NAME

View file

@ -19,7 +19,7 @@ package C4::Installer;
use Modern::Perl; use Modern::Perl;
use Encode qw( encode is_utf8 ); use Encode;
use DBIx::RunSQL; use DBIx::RunSQL;
use YAML::XS; use YAML::XS;
use C4::Context; use C4::Context;
@ -30,7 +30,7 @@ use vars qw(@ISA @EXPORT);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw( Exporter ); @ISA = qw( Exporter );
push @EXPORT, qw( primary_key_exists foreign_key_exists index_exists column_exists TableExists); push @EXPORT, qw( primary_key_exists foreign_key_exists index_exists column_exists TableExists marc_framework_sql_list);
}; };
=head1 NAME =head1 NAME

View file

@ -3,8 +3,7 @@ package C4::Installer::PerlModules;
use warnings; use warnings;
use strict; use strict;
use File::Spec; use File::Basename qw( dirname );
use File::Basename;
use Module::CPANfile; use Module::CPANfile;
sub new { sub new {

View file

@ -18,10 +18,10 @@ package C4::Installer::UpgradeBackup;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl; use Modern::Perl;
use File::Compare qw(compare); use File::Compare qw( compare );
use Cwd qw(cwd); use Cwd qw( cwd );
use File::Copy; use File::Copy;
use File::Find; use File::Find qw( find );
use File::Spec; use File::Spec;
use Exporter; use Exporter;

View file

@ -20,7 +20,7 @@ package C4::ItemCirculationAlertPreference;
use strict; use strict;
use warnings; use warnings;
use C4::Context; use C4::Context;
use Carp qw(carp croak); use Carp qw( carp croak );
use Koha::ItemTypes; use Koha::ItemTypes;
use Koha::Patron::Categories; use Koha::Patron::Categories;

View file

@ -20,12 +20,12 @@ package C4::Items;
use Modern::Perl; use Modern::Perl;
use vars qw(@ISA @EXPORT); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
AddItemFromMarc AddItemFromMarc
AddItemBatchFromMarc AddItemBatchFromMarc
ModItemFromMarc ModItemFromMarc
@ -39,30 +39,30 @@ BEGIN {
GetHostItemsInfo GetHostItemsInfo
get_hostitemnumbers_of get_hostitemnumbers_of
GetHiddenItemnumbers GetHiddenItemnumbers
GetMarcItem
MoveItemFromBiblio MoveItemFromBiblio
CartToShelf CartToShelf
GetAnalyticsCount GetAnalyticsCount
SearchItems SearchItems
PrepareItemrecordDisplay PrepareItemrecordDisplay
ToggleNewStatus
); );
} }
use Carp; use Carp qw( croak );
use Try::Tiny;
use C4::Context; use C4::Context;
use C4::Koha; use C4::Koha;
use C4::Biblio; use C4::Biblio qw( GetMarcStructure TransformMarcToKoha );
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use MARC::Record; use MARC::Record;
use C4::ClassSource; use C4::ClassSource qw( GetClassSort GetClassSources GetClassSource );
use C4::Log; use C4::Log qw( logaction );
use List::MoreUtils qw(any); use List::MoreUtils qw( any );
use DateTime::Format::MySQL; use DateTime::Format::MySQL;
use Data::Dumper; # used as part of logging item record changes, not just for
# debugging; so please don't remove this # debugging; so please don't remove this
use Koha::AuthorisedValues; use Koha::AuthorisedValues;
use Koha::DateUtils qw(dt_from_string); use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Database; use Koha::Database;
use Koha::Biblioitems; use Koha::Biblioitems;

View file

@ -30,34 +30,35 @@ use Koha::MarcSubfieldStructures;
use Business::ISBN; use Business::ISBN;
use Business::ISSN; use Business::ISSN;
use autouse 'Data::cselectall_arrayref' => qw(Dumper); use autouse 'Data::cselectall_arrayref' => qw(Dumper);
use vars qw(@ISA @EXPORT @EXPORT_OK);
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&GetItemTypesCategorized GetItemTypesCategorized
&getallthemes getallthemes
&getFacets getFacets
&getnbpages getImageSets
&getitemtypeimagedir getnbpages
&getitemtypeimagesrc getitemtypeimagedir
&getitemtypeimagelocation getitemtypeimagesrc
&GetAuthorisedValues getitemtypeimagelocation
&GetNormalizedUPC GetAuthorisedValues
&GetNormalizedISBN GetNormalizedUPC
&GetNormalizedEAN GetNormalizedISBN
&GetNormalizedOCLCNumber GetNormalizedEAN
&xml_escape GetNormalizedOCLCNumber
xml_escape
&GetVariationsOfISBN GetVariationsOfISBN
&GetVariationsOfISBNs GetVariationsOfISBNs
&NormalizeISBN NormalizeISBN
&GetVariationsOfISSN GetVariationsOfISSN
&GetVariationsOfISSNs GetVariationsOfISSNs
&NormalizeISSN NormalizeISSN
); );
} }
=head1 NAME =head1 NAME

View file

@ -3,14 +3,13 @@ package C4::Labels::Label;
use strict; use strict;
use warnings; use warnings;
use Text::Wrap; use Text::Wrap qw( wrap );
use Algorithm::CheckDigits; use Algorithm::CheckDigits qw( CheckDigits );
use Text::CSV_XS; use Text::CSV_XS;
use Data::Dumper;
use Text::Bidi qw( log2vis ); use Text::Bidi qw( log2vis );
use C4::Context; use C4::Context;
use C4::Biblio; use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField );
use Koha::ClassSources; use Koha::ClassSources;
use Koha::ClassSortRules; use Koha::ClassSortRules;
use Koha::ClassSplitRules; use Koha::ClassSplitRules;

View file

@ -22,24 +22,24 @@ package C4::Languages;
use strict; use strict;
use warnings; use warnings;
use Carp; use Carp qw( carp );
use CGI; use CGI;
use List::MoreUtils qw( any ); use List::MoreUtils qw( any );
use C4::Context; use C4::Context;
use Koha::Caches; use Koha::Caches;
use Koha::Cache::Memory::Lite; use Koha::Cache::Memory::Lite;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&getFrameworkLanguages getFrameworkLanguages
&getTranslatedLanguages getTranslatedLanguages
&getLanguages getLanguages
&getAllLanguages 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 get_rfc4646_from_iso639);
} }
=head1 NAME =head1 NAME

View file

@ -20,36 +20,47 @@ package C4::Letters;
use Modern::Perl; use Modern::Perl;
use MIME::Lite; use MIME::Lite;
use Date::Calc qw( Add_Delta_Days ); use Carp qw( carp croak );
use Encode;
use Carp;
use Template; use Template;
use Module::Load::Conditional qw(can_load); use Module::Load::Conditional qw( can_load );
use Try::Tiny; use Try::Tiny qw( catch try );
use C4::Members; use C4::Members;
use C4::Log; use C4::Log qw( logaction );
use C4::SMS; use C4::SMS;
use C4::Templates; use C4::Templates;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::SMS::Providers; use Koha::SMS::Providers;
use Koha::Email; use Koha::Email;
use Koha::Notice::Messages; use Koha::Notice::Messages;
use Koha::Notice::Templates; use Koha::Notice::Templates;
use Koha::DateUtils qw( format_sqldatetime dt_from_string ); use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Patrons; use Koha::Patrons;
use Koha::SMTP::Servers; use Koha::SMTP::Servers;
use Koha::Subscriptions; use Koha::Subscriptions;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&EnqueueLetter &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &SendAlerts &GetPrintMessages &GetMessageTransportTypes GetLetters
GetLettersAvailableForALibrary
GetLetterTemplates
DelLetter
GetPreparedLetter
GetWrappedLetter
SendAlerts
GetPrintMessages
GetQueuedMessages
GetMessage
GetMessageTransportTypes
EnqueueLetter
SendQueuedMessages
ResendMessage
); );
} }

View file

@ -47,7 +47,6 @@ to the preferred form.
use strict; use strict;
use warnings; use warnings;
use Carp;
use C4::Context; use C4::Context;
use base qw(Class::Accessor); use base qw(Class::Accessor);

View file

@ -19,7 +19,6 @@ package C4::Linker::Default;
use strict; use strict;
use warnings; use warnings;
use Carp;
use MARC::Field; use MARC::Field;
use C4::Heading; use C4::Heading;

View file

@ -19,7 +19,6 @@ package C4::Linker::FirstMatch;
use strict; use strict;
use warnings; use warnings;
use Carp;
use C4::Heading; use C4::Heading;
use C4::Linker::Default; # Use Default for flipping use C4::Linker::Default; # Use Default for flipping

View file

@ -19,7 +19,6 @@ package C4::Linker::LastMatch;
use strict; use strict;
use warnings; use warnings;
use Carp;
use C4::Heading; use C4::Heading;
use C4::Linker::Default; # Use Default for flipping use C4::Linker::Default; # Use Default for flipping

View file

@ -27,7 +27,6 @@ use warnings;
use JSON qw( to_json ); use JSON qw( to_json );
use C4::Context; use C4::Context;
use Koha::DateUtils;
use Koha::Logger; use Koha::Logger;
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
@ -35,7 +34,7 @@ use vars qw(@ISA @EXPORT);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(&logaction &cronlogaction); @EXPORT = qw(logaction cronlogaction);
} }
=head1 NAME =head1 NAME

View file

@ -22,29 +22,38 @@ use Modern::Perl;
use DateTime; use DateTime;
use C4::Context; use C4::Context;
use Koha::SimpleMARC; use Koha::SimpleMARC qw(
add_field
copy_and_replace_field
copy_field
delete_field
field_equals
field_exists
move_field
update_field
);
use Koha::MoreUtils; use Koha::MoreUtils;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string );
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
BEGIN { BEGIN {
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&GetModificationTemplates GetModificationTemplates
&AddModificationTemplate AddModificationTemplate
&DelModificationTemplate DelModificationTemplate
&GetModificationTemplateAction GetModificationTemplateAction
&GetModificationTemplateActions GetModificationTemplateActions
&AddModificationTemplateAction AddModificationTemplateAction
&ModModificationTemplateAction ModModificationTemplateAction
&DelModificationTemplateAction DelModificationTemplateAction
&MoveModificationTemplateAction MoveModificationTemplateAction
&ModifyRecordsWithTemplate ModifyRecordsWithTemplate
&ModifyRecordWithTemplate ModifyRecordWithTemplate
); );
} }

View file

@ -19,12 +19,17 @@ package C4::Matcher;
use Modern::Perl; use Modern::Perl;
use MARC::Record;
use Koha::SearchEngine; use Koha::SearchEngine;
use Koha::SearchEngine::Search; use Koha::SearchEngine::Search;
use Koha::SearchEngine::QueryBuilder; use Koha::SearchEngine::QueryBuilder;
use Koha::Util::Normalize qw/legacy_default remove_spaces upper_case lower_case ISBN/; use Koha::Util::Normalize qw(
ISBN
legacy_default
lower_case
remove_spaces
upper_case
);
=head1 NAME =head1 NAME

View file

@ -22,47 +22,41 @@ package C4::Members;
use Modern::Perl; use Modern::Perl;
use C4::Context; use C4::Context;
use String::Random qw( random_string );
use Scalar::Util qw( looks_like_number ); use Scalar::Util qw( looks_like_number );
use Date::Calc qw/Today check_date Date_to_Days/; use Date::Calc qw( check_date Date_to_Days );
use List::MoreUtils qw( uniq ); use C4::Overdues qw( checkoverdues );
use JSON qw(to_json);
use C4::Log; # logaction
use C4::Overdues;
use C4::Reserves; use C4::Reserves;
use C4::Accounts; use C4::Accounts;
use C4::Biblio; use C4::Letters qw( GetPreparedLetter );
use C4::Letters;
use DateTime; use DateTime;
use Koha::Database; use Koha::Database;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::AuthUtils qw(hash_password);
use Koha::Database; use Koha::Database;
use Koha::Holds; use Koha::Holds;
use Koha::List::Patron;
use Koha::News; use Koha::News;
use Koha::Patrons; use Koha::Patrons;
use Koha::Patron::Categories; use Koha::Patron::Categories;
our (@ISA,@EXPORT,@EXPORT_OK); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
#Get data @EXPORT_OK = qw(
push @EXPORT, qw( GetMemberDetails
GetMember
&GetAllIssues GetAllIssues
&GetBorrowersToExpunge GetBorrowersToExpunge
&IssueSlip IssueSlip
);
#Check data checkuserpassword
push @EXPORT, qw( get_cardnumber_length
&checkuserpassword checkcardnumber
&checkcardnumber
DeleteUnverifiedOpacRegistrations
DeleteExpiredOpacRegistrations
); );
} }

View file

@ -26,16 +26,17 @@ use Modern::Perl;
use C4::Context; use C4::Context;
our ( @ISA, @EXPORT, @EXPORT_OK ); our ( @ISA, @EXPORT_OK );
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
push @EXPORT, qw( @EXPORT_OK = qw(
&GetTotalIssuesTodayByBorrower get_fields
&GetTotalIssuesReturnedTodayByBorrower GetTotalIssuesTodayByBorrower
&GetPrecedentStateByBorrower GetTotalIssuesReturnedTodayByBorrower
GetPrecedentStateByBorrower
); );
} }

View file

@ -22,10 +22,10 @@ package C4::Message;
use strict; use strict;
use warnings; use warnings;
use C4::Context; use C4::Context;
use C4::Letters; use C4::Letters qw( GetPreparedLetter EnqueueLetter );
use YAML::XS; use YAML::XS qw( Dump );
use Encode; use Encode;
use Carp; use Carp qw( carp );
=head1 NAME =head1 NAME

View file

@ -38,10 +38,10 @@ BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&GetOAISets &GetOAISet &GetOAISetBySpec &ModOAISet &DelOAISet &AddOAISet GetOAISets GetOAISet GetOAISetBySpec ModOAISet DelOAISet AddOAISet
&GetOAISetsMappings &GetOAISetMappings &ModOAISetMappings GetOAISetsMappings GetOAISetMappings ModOAISetMappings
&GetOAISetsBiblio &ModOAISetsBiblios &AddOAISetsBiblios GetOAISetsBiblio ModOAISetsBiblios AddOAISetsBiblios
&CalcOAISetsBiblio &UpdateOAISetsBiblio &DelOAISetsBiblio CalcOAISetsBiblio UpdateOAISetsBiblio DelOAISetsBiblio
); );
} }

View file

@ -30,30 +30,23 @@ use Modern::Perl;
use URI::Escape; use URI::Escape;
use Scalar::Util qw( looks_like_number ); use Scalar::Util qw( looks_like_number );
use C4::Auth qw(get_template_and_user); use C4::Auth qw( get_template_and_user );
use C4::Context; use C4::Context;
use C4::Templates; use C4::Templates;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead @EXPORT_OK = qw(
%EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url is_ajax
&output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)], ajax_fail
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(
setlanguagecookie getlanguagecookie pagination_bar parametrized_url setlanguagecookie getlanguagecookie pagination_bar parametrized_url
output_html_with_http_headers output_ajax_with_http_headers output_with_http_headers
output_and_exit_if_error output_and_exit output_error
); );
push @EXPORT, qw(
&output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers
&output_and_exit_if_error &output_and_exit &output_error
);
} }
=head1 NAME =head1 NAME

View file

@ -39,7 +39,7 @@ This module allows you to build JSON incrementally.
use strict; use strict;
use warnings; use warnings;
use JSON; use JSON qw( to_json );
sub new { sub new {
my $class = shift; my $class = shift;

View file

@ -20,45 +20,38 @@ package C4::Overdues;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl; use Modern::Perl;
use Date::Calc qw/Today Date_to_Days/; use Date::Calc qw( Today );
use Date::Manip qw/UnixDate/; use Date::Manip qw( UnixDate );
use List::MoreUtils qw( uniq ); use List::MoreUtils qw( uniq );
use POSIX qw( floor ceil ); use POSIX qw( ceil floor );
use Locale::Currency::Format 1.28; use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL );
use Carp; use Carp qw( carp );
use C4::Circulation;
use C4::Context; use C4::Context;
use C4::Accounts; use C4::Accounts;
use C4::Log; # logaction
use Koha::Logger; use Koha::Logger;
use Koha::DateUtils;
use Koha::Account::Lines; use Koha::Account::Lines;
use Koha::Account::Offsets; use Koha::Account::Offsets;
use Koha::Libraries; use Koha::Libraries;
use vars qw(@ISA @EXPORT); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
# subs to rename (and maybe merge some...) # subs to rename (and maybe merge some...)
push @EXPORT, qw( @EXPORT_OK = qw(
&CalcFine CalcFine
&Getoverdues Getoverdues
&checkoverdues checkoverdues
&UpdateFine UpdateFine
&GetFine GetFine
&get_chargeable_units GetBranchcodesWithOverdueRules
&GetOverduesForBranch get_chargeable_units
&GetOverdueMessageTransportTypes GetOverduesForBranch
&parse_overdues_letter GetOverdueMessageTransportTypes
); parse_overdues_letter
GetIssuesIteminfo
# subs to move to Circulation.pm
push @EXPORT, qw(
&GetIssuesIteminfo
); );
} }

View file

@ -16,7 +16,16 @@ BEGIN {
); );
use C4::Patroncards::Batch; use C4::Patroncards::Batch;
use C4::Patroncards::Layout; use C4::Patroncards::Layout;
use C4::Patroncards::Lib; use C4::Patroncards::Lib qw(
box
get_borrower_attributes
get_image
leading
put_image
rm_image
text_alignment
unpack_UTF8
);
use C4::Patroncards::Patroncard; use C4::Patroncards::Patroncard;
use C4::Patroncards::Profile; use C4::Patroncards::Profile;
use C4::Patroncards::Template; use C4::Patroncards::Template;

View file

@ -21,12 +21,16 @@ use strict;
use warnings; use warnings;
use autouse 'Data::Dumper' => qw(Dumper); use autouse 'Data::Dumper' => qw(Dumper);
use Text::Wrap qw(wrap);
#use Font::TTFMetrics; #use Font::TTFMetrics;
use C4::Creators::Lib qw(get_font_types get_unit_values); use C4::Creators::Lib qw( get_unit_values );
use C4::Creators::PDF qw(StrWidth); use C4::Creators::PDF qw(StrWidth);
use C4::Patroncards::Lib qw(unpack_UTF8 text_alignment leading box get_borrower_attributes); use C4::Patroncards::Lib qw(
box
get_borrower_attributes
leading
text_alignment
);
=head1 NAME =head1 NAME

View file

@ -25,20 +25,20 @@ use Modern::Perl;
use MARC::Record; # marc2marcxml, marcxml2marc, changeEncoding use MARC::Record; # marc2marcxml, marcxml2marc, changeEncoding
use MARC::File::XML; # marc2marcxml, marcxml2marc, changeEncoding use MARC::File::XML; # marc2marcxml, marcxml2marc, changeEncoding
use Biblio::EndnoteStyle; use Biblio::EndnoteStyle;
use Unicode::Normalize; # _entity_encode use Unicode::Normalize qw( NFC ); # _entity_encode
use C4::Biblio; #marc2bibtex use C4::Biblio qw( GetFrameworkCode GetMarcBiblio );
use C4::Koha; #marc2csv use C4::Koha; #marc2csv
use C4::XSLT (); use C4::XSLT;
use YAML::XS; #marcrecords2csv use YAML::XS; #marcrecords2csv
use Encode; use Encode;
use Template; use Template;
use Text::CSV::Encoded; #marc2csv use Text::CSV::Encoded; #marc2csv
use Koha::Items; use Koha::Items;
use Koha::SimpleMARC qw(read_field); use Koha::SimpleMARC qw( read_field );
use Koha::XSLT::Base; use Koha::XSLT::Base;
use Koha::CsvProfiles; use Koha::CsvProfiles;
use Koha::AuthorisedValues; use Koha::AuthorisedValues;
use Carp; use Carp qw( carp croak );
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
@ -48,16 +48,17 @@ use vars qw(@ISA @EXPORT);
# only export API methods # only export API methods
@EXPORT = qw( @EXPORT = qw(
&marc2endnote marc2endnote
&marc2marc marc2marc
&marc2marcxml marc2marcxml
&marcxml2marc marcxml2marc
&marc2dcxml marc2dcxml
&marc2modsxml marc2modsxml
&marc2madsxml marc2madsxml
&marc2bibtex marc2bibtex
&marc2csv marc2csv
&changeEncoding marcrecord2csv
changeEncoding
); );
=head1 NAME =head1 NAME

View file

@ -20,13 +20,13 @@ package C4::Reports;
use Modern::Perl; use Modern::Perl;
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use C4::Context; use C4::Context;
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
GetDelimiterChoices GetDelimiterChoices
); );
} }

View file

@ -19,40 +19,42 @@ package C4::Reports::Guided;
use Modern::Perl; use Modern::Perl;
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
use Carp; use Carp qw( carp croak );
use JSON qw( from_json ); use JSON qw( from_json );
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use C4::Context; use C4::Context;
use C4::Templates qw/themelanguage/; use C4::Templates qw/themelanguage/;
use C4::Koha; use C4::Koha qw( GetAuthorisedValues );
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Patrons; use Koha::Patrons;
use Koha::Reports; use Koha::Reports;
use C4::Output; use C4::Output;
use C4::Log; use C4::Log qw( logaction );
use Koha::Notice::Templates; use Koha::Notice::Templates;
use C4::Letters;
use Koha::Logger; use Koha::Logger;
use Koha::AuthorisedValues; use Koha::AuthorisedValues;
use Koha::Patron::Categories; use Koha::Patron::Categories;
use Koha::SharedContent; use Koha::SharedContent;
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
get_report_types get_report_areas get_report_groups get_columns build_query get_criteria get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
save_report get_saved_reports execute_query save_report get_saved_reports execute_query
get_column_type get_distinct_values save_dictionary get_from_dictionary get_column_type get_distinct_values save_dictionary get_from_dictionary
delete_definition delete_report format_results get_sql delete_definition delete_report store_results format_results get_sql get_results
nb_rows update_sql nb_rows update_sql
strip_limit
convert_sql
GetReservedAuthorisedValues GetReservedAuthorisedValues
GetParametersFromSQL GetParametersFromSQL
IsAuthorisedValueValid IsAuthorisedValueValid
ValidateSQLParameters ValidateSQLParameters
nb_rows update_sql nb_rows update_sql
EmailReport
); );
} }

View file

@ -24,12 +24,11 @@ package C4::Reserves;
use Modern::Perl; use Modern::Perl;
use C4::Accounts; use C4::Accounts;
use C4::Biblio; use C4::Circulation qw( CheckIfIssuedToPatron GetAgeRestriction GetBranchItemRule );
use C4::Circulation;
use C4::Context; use C4::Context;
use C4::Items; use C4::Items qw( CartToShelf get_hostitemnumbers_of );
use C4::Letters; use C4::Letters;
use C4::Log; use C4::Log qw( logaction );
use C4::Members::Messaging; use C4::Members::Messaging;
use C4::Members; use C4::Members;
use Koha::Account::Lines; use Koha::Account::Lines;
@ -37,7 +36,7 @@ use Koha::Biblios;
use Koha::Calendar; use Koha::Calendar;
use Koha::CirculationRules; use Koha::CirculationRules;
use Koha::Database; use Koha::Database;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Hold; use Koha::Hold;
use Koha::Holds; use Koha::Holds;
use Koha::ItemTypes; use Koha::ItemTypes;
@ -47,11 +46,8 @@ use Koha::Old::Hold;
use Koha::Patrons; use Koha::Patrons;
use Koha::Plugins; use Koha::Plugins;
use Carp; use Data::Dumper qw( Dumper );
use Data::Dumper; use List::MoreUtils qw( any );
use List::MoreUtils qw( firstidx any );
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
=head1 NAME =head1 NAME
@ -99,49 +95,57 @@ This modules provides somes functions to deal with reservations.
=cut =cut
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&AddReserve AddReserve
&GetReserveStatus GetReserveStatus
&GetOtherReserves GetOtherReserves
ChargeReserveFee
GetReserveFee
&ModReserveFill ModReserveFill
&ModReserveAffect ModReserveAffect
&ModReserve ModReserve
&ModReserveStatus ModReserveStatus
&ModReserveCancelAll ModReserveCancelAll
&ModReserveMinusPriority ModReserveMinusPriority
&MoveReserve MoveReserve
&CheckReserves CheckReserves
&CanBookBeReserved CanBookBeReserved
&CanItemBeReserved CanItemBeReserved
&CanReserveBeCanceledFromOpac CanReserveBeCanceledFromOpac
&CancelExpiredReserves CancelExpiredReserves
&AutoUnsuspendReserves AutoUnsuspendReserves
&IsAvailableForItemLevelRequest IsAvailableForItemLevelRequest
ItemsAnyAvailableAndNotRestricted ItemsAnyAvailableAndNotRestricted
&AlterPriority AlterPriority
&ToggleLowestPriority ToggleLowestPriority
&ReserveSlip ReserveSlip
&ToggleSuspend ToggleSuspend
&SuspendAll SuspendAll
&GetReservesControlBranch GetReservesControlBranch
IsItemOnHoldAndFound CalculatePriority
GetMaxPatronHoldsForRecord IsItemOnHoldAndFound
GetMaxPatronHoldsForRecord
MergeHolds
RevertWaitingStatus
); );
@EXPORT_OK = qw( MergeHolds );
} }
=head2 AddReserve =head2 AddReserve

View file

@ -62,12 +62,12 @@ package C4::Ris;
use Modern::Perl; use Modern::Perl;
use List::MoreUtils qw/uniq/; use List::MoreUtils qw( uniq );
use YAML::XS; use YAML::XS;
use Encode; use Encode;
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
use Koha::SimpleMARC qw(read_field); use Koha::SimpleMARC qw( read_field );
@ISA = qw(Exporter); @ISA = qw(Exporter);
@ -75,7 +75,7 @@ use Koha::SimpleMARC qw(read_field);
# only export API methods # only export API methods
@EXPORT = qw( @EXPORT = qw(
&marc2ris marc2ris
); );
our $marcprint = 0; # Debug flag; our $marcprint = 0; # Debug flag;

View file

@ -25,12 +25,10 @@ package C4::RotatingCollections;
use Modern::Perl; use Modern::Perl;
use C4::Context; use C4::Context;
use C4::Circulation;
use C4::Reserves qw(CheckReserves); use C4::Reserves qw(CheckReserves);
use Koha::Database; use Koha::Database;
use DBI; use Try::Tiny qw( catch try );
use Try::Tiny;
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
@ -61,6 +59,8 @@ BEGIN {
TransferCollection TransferCollection
GetCollectionItemBranches GetCollectionItemBranches
isItemInAnyCollection
isItemInThisCollection
); );
} }

View file

@ -6,7 +6,7 @@ package C4::SIP::ILS;
use warnings; use warnings;
use strict; use strict;
use C4::SIP::Sip qw(siplog); use C4::SIP::Sip qw( siplog );
use Data::Dumper; use Data::Dumper;
use C4::SIP::ILS::Item; use C4::SIP::ILS::Item;

View file

@ -17,11 +17,11 @@ use C4::SIP::ILS::Transaction;
use C4::SIP::Sip qw(add_field); use C4::SIP::Sip qw(add_field);
use C4::Biblio; use C4::Biblio;
use C4::Circulation; use C4::Circulation qw( barcodedecode );
use C4::Context; use C4::Context;
use C4::Items; use C4::Items;
use C4::Members; use C4::Members;
use C4::Reserves; use C4::Reserves qw( ModReserveFill );
use Koha::Biblios; use Koha::Biblios;
use Koha::Checkouts::ReturnClaims; use Koha::Checkouts::ReturnClaims;
use Koha::Checkouts; use Koha::Checkouts;

View file

@ -11,9 +11,9 @@ use strict;
use C4::SIP::ILS::Transaction; use C4::SIP::ILS::Transaction;
use C4::Circulation; use C4::Circulation qw( AddReturn LostItem );
use C4::Items qw( ModItemTransfer ); use C4::Items qw( ModItemTransfer );
use C4::Reserves qw( ModReserveAffect ); use C4::Reserves qw( ModReserve ModReserveAffect );
use Koha::DateUtils qw( dt_from_string ); use Koha::DateUtils qw( dt_from_string );
use Koha::Items; use Koha::Items;

View file

@ -8,14 +8,14 @@ use warnings;
use strict; use strict;
use POSIX qw(strftime); use POSIX qw(strftime);
use C4::SIP::Sip qw(siplog); use C4::SIP::Sip qw( siplog );
use Data::Dumper; use Data::Dumper;
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
use C4::SIP::ILS::Transaction; use C4::SIP::ILS::Transaction;
use C4::Context; use C4::Context;
use C4::Circulation; use C4::Circulation qw( AddIssue GetIssuingCharges CanBookBeIssued );
use C4::Members; use C4::Members;
use C4::Reserves qw(ModReserveFill); use C4::Reserves qw(ModReserveFill);
use Koha::DateUtils; use Koha::DateUtils;

View file

@ -7,13 +7,13 @@ use Modern::Perl;
use C4::SIP::ILS::Transaction; use C4::SIP::ILS::Transaction;
use C4::Reserves; # AddReserve use C4::Reserves qw( CalculatePriority AddReserve ModReserve );
use Koha::Holds; use Koha::Holds;
use Koha::Patrons; use Koha::Patrons;
use parent qw(C4::SIP::ILS::Transaction);
use Koha::Items; use Koha::Items;
use parent qw(C4::SIP::ILS::Transaction);
my %fields = ( my %fields = (
expiration_date => 0, expiration_date => 0,
pickup_location => undef, pickup_location => undef,

View file

@ -7,7 +7,7 @@ package C4::SIP::ILS::Transaction::Renew;
use warnings; use warnings;
use strict; use strict;
use C4::Circulation; use C4::Circulation qw( CanBookBeRenewed GetIssuingCharges AddIssue );
use Koha::Patrons; use Koha::Patrons;
use Koha::DateUtils; use Koha::DateUtils;

View file

@ -6,7 +6,7 @@ package C4::SIP::ILS::Transaction::RenewAll;
use strict; use strict;
use warnings; use warnings;
use C4::SIP::Sip qw(siplog); use C4::SIP::Sip qw( siplog );
use C4::SIP::ILS::Item; use C4::SIP::ILS::Item;

View file

@ -21,8 +21,8 @@ use C4::SIP::Sip::MsgType qw( handle login_core );
use C4::SIP::Logger qw(set_logger); use C4::SIP::Logger qw(set_logger);
use Koha::Caches; use Koha::Caches;
use Koha::Logger; use Koha::Logger;
use C4::SIP::Trapper; use C4::SIP::Trapper;
tie *STDERR, "C4::SIP::Trapper"; tie *STDERR, "C4::SIP::Trapper";

View file

@ -15,7 +15,7 @@ use List::Util qw(first);
use C4::SIP::Sip::Constants qw(SIP_DATETIME FID_SCREEN_MSG); use C4::SIP::Sip::Constants qw(SIP_DATETIME FID_SCREEN_MSG);
use C4::SIP::Sip::Checksum qw(checksum); use C4::SIP::Sip::Checksum qw(checksum);
use C4::SIP::Logger qw(get_logger); use C4::SIP::Logger qw( get_logger );
use base qw(Exporter); use base qw(Exporter);

View file

@ -19,15 +19,14 @@ package C4::Scheduler;
use Modern::Perl; use Modern::Perl;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use C4::Context; use C4::Context;
use Schedule::At; use Schedule::At;
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
} }
=head1 NAME =head1 NAME

View file

@ -21,7 +21,7 @@ package C4::Scrubber;
use strict; use strict;
use warnings; use warnings;
use Carp; use Carp qw( croak );
use HTML::Scrubber; use HTML::Scrubber;
use C4::Context; use C4::Context;

View file

@ -16,28 +16,44 @@ package C4::Search;
# along with Koha; if not, see <http://www.gnu.org/licenses>. # along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl; use Modern::Perl;
require Exporter;
use C4::Context; use C4::Context;
use C4::Biblio; # GetMarcFromKohaField, GetBiblioData use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
use C4::Koha; # getFacets use C4::Koha qw( getFacets GetVariationsOfISBN GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN getitemtypeimagelocation );
use Koha::DateUtils; use Koha::DateUtils;
use Koha::Libraries; use Koha::Libraries;
use Lingua::Stem; use Lingua::Stem;
use XML::Simple; use XML::Simple;
use C4::XSLT; use C4::XSLT qw( XSLTParse4Display );
use C4::Reserves; # GetReserveStatus use C4::Reserves qw( GetReserveStatus );
use C4::Charset; use C4::Charset qw( SetUTF8Flag );
use Koha::Logger;
use Koha::AuthorisedValues; use Koha::AuthorisedValues;
use Koha::ItemTypes; use Koha::ItemTypes;
use Koha::Libraries; use Koha::Libraries;
use Koha::Logger;
use Koha::Patrons; use Koha::Patrons;
use Koha::RecordProcessor; use Koha::RecordProcessor;
use URI::Escape; use URI::Escape;
use Business::ISBN; use Business::ISBN;
use MARC::Record; use MARC::Record;
use MARC::Field; use MARC::Field;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
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 =head1 NAME
@ -55,17 +71,6 @@ This module provides searching functions for Koha's bibliographic databases
=cut =cut
@ISA = qw(Exporter);
@EXPORT = qw(
&FindDuplicate
&SimpleSearch
&searchResults
&getRecords
&buildQuery
&GetDistinctValues
&enabled_staff_search_views
);
# make all your functions, whether exported or not; # make all your functions, whether exported or not;
=head2 FindDuplicate =head2 FindDuplicate

View file

@ -4,11 +4,10 @@ use Modern::Perl;
use C4::Auth qw( get_session ); use C4::Auth qw( get_session );
use C4::Context; use C4::Context;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use JSON qw( encode_json decode_json ); use JSON qw( decode_json encode_json );
use URI::Escape; use URI::Escape qw( uri_escape uri_unescape );
use Encode;
sub add { sub add {
my ($params) = @_; my ($params) = @_;

View file

@ -22,7 +22,7 @@ use Modern::Perl;
use LWP::UserAgent; use LWP::UserAgent;
use URI; use URI;
use URI::QueryParam; use URI::QueryParam;
use XML::Simple; use XML::Simple qw( XMLin );
=head1 NAME =head1 NAME

View file

@ -20,25 +20,30 @@ package C4::Serials;
use Modern::Perl; use Modern::Perl;
use C4::Auth qw(haspermission); use C4::Auth qw( haspermission );
use C4::Context; use C4::Context;
use DateTime; use DateTime;
use Date::Calc qw(:all); use Date::Calc qw(
use POSIX qw(strftime); Add_Delta_Days
use C4::Biblio; Add_Delta_YM
use C4::Log; # logaction check_date
use C4::Serials::Frequency; Delta_Days
N_Delta_YMD
Today
);
use POSIX qw( strftime );
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblio );
use C4::Log qw( logaction ); # logaction
use C4::Serials::Frequency qw( GetSubscriptionFrequency );
use C4::Serials::Numberpattern; use C4::Serials::Numberpattern;
use Koha::AdditionalFieldValues; use Koha::AdditionalFieldValues;
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string output_pref );
use Koha::Serial; use Koha::Serial;
use Koha::Subscriptions; use Koha::Subscriptions;
use Koha::Subscription::Histories; use Koha::Subscription::Histories;
use Koha::SharedContent; use Koha::SharedContent;
use Scalar::Util qw( looks_like_number ); use Scalar::Util qw( looks_like_number );
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# Define statuses # Define statuses
use constant { use constant {
EXPECTED => 1, EXPECTED => 1,
@ -61,31 +66,39 @@ use constant MISSING_STATUSES => (
MISSING_LOST MISSING_LOST
); );
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT_OK = qw(
&NewSubscription &ModSubscription &DelSubscription NewSubscription ModSubscription DelSubscription
&GetSubscription &CountSubscriptionFromBiblionumber &GetSubscriptionsFromBiblionumber GetSubscription CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber
&SearchSubscriptions SearchSubscriptions
&GetFullSubscriptionsFromBiblionumber &GetFullSubscription &ModSubscriptionHistory GetFullSubscriptionsFromBiblionumber GetFullSubscription ModSubscriptionHistory
&HasSubscriptionStrictlyExpired &HasSubscriptionExpired &GetExpirationDate &abouttoexpire HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
&GetSubscriptionHistoryFromSubscriptionId GetFictiveIssueNumber
GetSubscriptionHistoryFromSubscriptionId
&GetNextSeq &GetSeq &NewIssue &GetSerials GetNextSeq GetSeq NewIssue GetSerials
&GetLatestSerials &ModSerialStatus &GetNextDate &GetSerials2 GetLatestSerials ModSerialStatus GetNextDate
&GetSubscriptionLength &ReNewSubscription &GetLateOrMissingIssues CloseSubscription ReopenSubscription
&GetSerialInformation &AddItem2Serial subscriptionCurrentlyOnOrder
&PrepareSerialsData &GetNextExpected &ModNextExpected can_claim_subscription can_edit_subscription can_show_subscription
&GetPreviousSerialid GetSerials2
GetSubscriptionLength ReNewSubscription GetLateOrMissingIssues
GetSerialInformation AddItem2Serial
PrepareSerialsData GetNextExpected ModNextExpected
GetSubscriptionIrregularities
GetPreviousSerialid
&GetSuppliersWithLateIssues GetSuppliersWithLateIssues
&getroutinglist &delroutingmember &addroutingmember getroutinglist delroutingmember addroutingmember
&reorder_members reorder_members
&check_routing &updateClaim check_routing updateClaim
&CountIssues CountIssues
HasItems HasItems
&subscriptionCurrentlyOnOrder
findSerialsByStatus
); );
} }

View file

@ -28,13 +28,13 @@ BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&GetSubscriptionFrequencies GetSubscriptionFrequencies
&GetSubscriptionFrequency GetSubscriptionFrequency
&AddSubscriptionFrequency AddSubscriptionFrequency
&ModSubscriptionFrequency ModSubscriptionFrequency
&DelSubscriptionFrequency DelSubscriptionFrequency
&GetSubscriptionsWithFrequency GetSubscriptionsWithFrequency
); );
} }

View file

@ -29,14 +29,14 @@ BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&GetSubscriptionNumberpatterns GetSubscriptionNumberpatterns
&GetSubscriptionNumberpattern GetSubscriptionNumberpattern
&GetSubscriptionNumberpatternByName GetSubscriptionNumberpatternByName
&AddSubscriptionNumberpattern AddSubscriptionNumberpattern
&ModSubscriptionNumberpattern ModSubscriptionNumberpattern
&DelSubscriptionNumberpattern DelSubscriptionNumberpattern
&GetSubscriptionsWithNumberpattern GetSubscriptionsWithNumberpattern
); );
} }

View file

@ -43,7 +43,7 @@ use warnings;
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
use C4::Auth qw( check_api_auth ); use C4::Auth qw( check_api_auth );
use C4::Output qw( :ajax ); use C4::Output qw( output_with_http_headers );
use C4::Output::JSONStream; use C4::Output::JSONStream;
use JSON; use JSON;

View file

@ -20,21 +20,18 @@ package C4::ShelfBrowser;
use strict; use strict;
use warnings; use warnings;
use C4::Biblio; use C4::Biblio qw( GetAuthorisedValueDesc GetMarcBiblio );
use C4::Context; use C4::Context;
use C4::Koha; use C4::Koha qw( GetNormalizedUPC GetNormalizedOCLCNumber GetNormalizedISBN GetNormalizedEAN );
use Koha::Biblios; use Koha::Biblios;
use Koha::Libraries; use Koha::Libraries;
use vars qw(@ISA @EXPORT @EXPORT_OK); our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter; require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(
&GetNearbyItems
);
@EXPORT_OK = qw( @EXPORT_OK = qw(
GetNearbyItems
); );
} }

View file

@ -19,7 +19,7 @@ use Modern::Perl;
use C4::Context; use C4::Context;
use Business::ISBN; use Business::ISBN;
use C4::Koha; use C4::Koha qw( GetNormalizedISBN );
=head1 NAME =head1 NAME

View file

@ -20,7 +20,7 @@ package C4::Stats;
use Modern::Perl; use Modern::Perl;
require Exporter; require Exporter;
use Carp; use Carp qw( croak );
use C4::Context; use C4::Context;
use Koha::DateUtils qw( dt_from_string ); use Koha::DateUtils qw( dt_from_string );
@ -30,10 +30,10 @@ use Koha::PseudonymizedTransactions;
use vars qw(@ISA @EXPORT); use vars qw(@ISA @EXPORT);
BEGIN { BEGIN {
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&UpdateStats UpdateStats
); );
} }

View file

@ -25,10 +25,9 @@ use C4::Context;
use C4::Output; use C4::Output;
use C4::Letters; use C4::Letters;
use C4::Biblio qw( GetMarcFromKohaField ); use C4::Biblio qw( GetMarcFromKohaField );
use Koha::DateUtils; use Koha::DateUtils qw( dt_from_string );
use Koha::Suggestions; use Koha::Suggestions;
use List::MoreUtils qw(any);
use base qw(Exporter); use base qw(Exporter);
our @EXPORT = qw( our @EXPORT = qw(

View file

@ -20,35 +20,36 @@ package C4::Tags;
use strict; use strict;
use warnings; use warnings;
use Carp; use Carp qw( carp );
use Exporter; use Exporter;
use C4::Context; use C4::Context;
use Module::Load::Conditional qw/check_install/; use Module::Load::Conditional qw( check_install );
#use Data::Dumper; #use Data::Dumper;
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created); 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 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 { BEGIN {
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT_OK = qw( @EXPORT_OK = qw(
&get_tag &get_tags &get_tag_rows get_tag get_tags get_tag_rows
&add_tags &add_tag add_tags
&delete_tag_row_by_id add_tag
&remove_tag add_tag_approval
&delete_tag_rows_by_ids add_tag_index
&get_approval_rows delete_tag_row_by_id
&blacklist remove_tag
&whitelist delete_tag_rows_by_ids
&is_approved get_approval_rows
&approval_counts blacklist
&get_count_by_tag_status whitelist
&get_filters is_approved
approval_counts
get_count_by_tag_status
get_filters
stratify_tags stratify_tags
); );
# %EXPORT_TAGS = ();
my $ext_dict = C4::Context->preference('TagsExternalDictionary'); my $ext_dict = C4::Context->preference('TagsExternalDictionary');
if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) { if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) {
warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed."; warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed.";

View file

@ -2,9 +2,9 @@ package C4::Templates;
use strict; use strict;
use warnings; use warnings;
use Carp; use Carp qw( carp );
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
use List::MoreUtils qw/ any uniq /; use List::MoreUtils qw( uniq );
# Copyright 2009 Chris Cormack and The Koha Dev Team # Copyright 2009 Chris Cormack and The Koha Dev Team
# #
@ -31,8 +31,7 @@ C4::Templates - Object for manipulating templates for use with Koha
use base qw(Class::Accessor); use base qw(Class::Accessor);
use Template; use Template;
use Template::Constants qw( :debug ); use C4::Languages qw( get_bidi getTranslatedLanguages regex_lang_subtags );
use C4::Languages qw(getTranslatedLanguages get_bidi regex_lang_subtags language_get_description accept_language );
use C4::Context; use C4::Context;

View file

@ -20,8 +20,6 @@ package C4::TmplTokenType;
use Modern::Perl; use Modern::Perl;
require Exporter; require Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
############################################################################### ###############################################################################
=head1 NAME =head1 NAME
@ -38,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 use vars qw( $_text $_text_parametrized $_cdata
$_tag $_decl $_pi $_directive $_comment $_null $_unknown ); $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
our (@ISA, @EXPORT_OK);
BEGIN { BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(
TEXT
TEXT_PARAMETRIZED
CDATA
TAG
DECL
PI
DIRECTIVE
COMMENT
UNKNOWN
);
my $new = sub { my $new = sub {
my $this = 'C4::TmplTokenType';#shift; my $this = 'C4::TmplTokenType';#shift;
my $class = ref($this) || $this; my $class = ref($this) || $this;

Some files were not shown because too many files have changed in this diff Show more