View | Details | Raw Unified | Return to bug 17600
Collapse All | Expand All

(-)a/C4/Accounts.pm (-5 / +2 lines)
Lines 22-35 use Modern::Perl; Link Here
22
use C4::Context;
22
use C4::Context;
23
use C4::Stats;
23
use C4::Stats;
24
use C4::Members;
24
use C4::Members;
25
use C4::Log qw(logaction);
26
use Koha::Account;
25
use Koha::Account;
27
use Koha::Account::Lines;
26
use Koha::Account::Lines;
28
use Koha::Account::Offsets;
27
use Koha::Account::Offsets;
29
use Koha::Items;
28
use Koha::Items;
30
29
31
use Mojo::Util qw(deprecated);
32
use Data::Dumper qw(Dumper);
33
30
34
use vars qw(@ISA @EXPORT);
31
use vars qw(@ISA @EXPORT);
35
32
Lines 37-44 BEGIN { Link Here
37
    require Exporter;
34
    require Exporter;
38
    @ISA    = qw(Exporter);
35
    @ISA    = qw(Exporter);
39
    @EXPORT = qw(
36
    @EXPORT = qw(
40
      &chargelostitem
37
      chargelostitem
41
      &purge_zero_balance_fees
38
      purge_zero_balance_fees
42
    );
39
    );
43
}
40
}
44
41
(-)a/C4/Acquisition.pm (-55 / +53 lines)
Lines 19-31 package C4::Acquisition; Link Here
19
19
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use Carp;
22
use Carp qw( carp croak );
23
use Text::CSV_XS;
23
use Text::CSV_XS;
24
use C4::Context;
24
use C4::Context;
25
use C4::Suggestions;
25
use C4::Suggestions qw( GetSuggestion GetSuggestionFromBiblionumber ModSuggestion );
26
use C4::Biblio;
26
use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure IsMarcStructureInternal );
27
use C4::Contract;
27
use C4::Contract qw( GetContract );
28
use C4::Log qw(logaction);
28
use C4::Log qw( logaction );
29
use C4::Templates qw(gettemplate);
29
use C4::Templates qw(gettemplate);
30
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::Acquisition::Baskets;
31
use Koha::Acquisition::Baskets;
Lines 42-101 use Koha::Patrons; Link Here
42
use C4::Koha;
42
use C4::Koha;
43
43
44
use MARC::Field;
44
use MARC::Field;
45
use MARC::Record;
45
use JSON qw( to_json );
46
use JSON qw(to_json);
47
46
48
use Time::localtime;
49
50
use vars qw(@ISA @EXPORT);
51
47
48
our (@ISA, @EXPORT_OK);
52
BEGIN {
49
BEGIN {
53
    require Exporter;
50
    require Exporter;
54
    @ISA    = qw(Exporter);
51
    @ISA       = qw(Exporter);
55
    @EXPORT = qw(
52
    @EXPORT_OK = qw(
56
        &GetBasket &NewBasket &ReopenBasket &ModBasket
53
      GetBasket NewBasket ReopenBasket ModBasket
57
        &GetBasketAsCSV &GetBasketGroupAsCSV
54
      GetBasketAsCSV GetBasketGroupAsCSV
58
        &GetBasketsByBookseller &GetBasketsByBasketgroup
55
      GetBasketsByBookseller GetBasketsByBasketgroup
59
        &GetBasketsInfosByBookseller
56
      GetBasketsInfosByBookseller
60
57
61
        &GetBasketUsers &ModBasketUsers
58
      GetBasketUsers ModBasketUsers
62
        &CanUserManageBasket
59
      CanUserManageBasket
63
60
64
        &ModBasketHeader
61
      ModBasketHeader
65
62
66
        &ModBasketgroup &NewBasketgroup &DelBasketgroup &GetBasketgroup &CloseBasketgroup
63
      ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroup CloseBasketgroup
67
        &GetBasketgroups &ReOpenBasketgroup
64
      GetBasketgroups ReOpenBasketgroup
68
65
69
        &ModOrder &GetOrder &GetOrders &GetOrdersByBiblionumber
66
      ModOrder GetOrder GetOrders GetOrdersByBiblionumber
70
        &GetOrderFromItemnumber
67
      GetOrderFromItemnumber
71
        &SearchOrders &GetHistory &GetRecentAcqui
68
      SearchOrders GetHistory GetRecentAcqui
72
        &ModReceiveOrder &CancelReceipt
69
      ModReceiveOrder CancelReceipt
73
        &TransferOrder
70
      populate_order_with_prices
74
        &ModItemOrder
71
      TransferOrder
75
72
      ModItemOrder
76
        &GetParcels
73
77
74
      GetParcels
78
        &GetInvoices
75
79
        &GetInvoice
76
      GetInvoices
80
        &GetInvoiceDetails
77
      GetInvoice
81
        &AddInvoice
78
      GetInvoiceDetails
82
        &ModInvoice
79
      AddInvoice
83
        &CloseInvoice
80
      ModInvoice
84
        &ReopenInvoice
81
      CloseInvoice
85
        &DelInvoice
82
      ReopenInvoice
86
        &MergeInvoices
83
      DelInvoice
87
84
      MergeInvoices
88
        &AddClaim
85
89
        &GetBiblioCountByBasketno
86
      AddClaim
90
87
      GetBiblioCountByBasketno
91
        &GetOrderUsers
88
92
        &ModOrderUsers
89
      GetOrderUsers
93
        &NotifyOrderUsers
90
      ModOrderUsers
94
91
      NotifyOrderUsers
95
        &FillWithDefaultValues
92
96
93
      FillWithDefaultValues
97
        &get_rounded_price
94
98
        &get_rounding_sql
95
      get_rounded_price
96
      get_rounding_sql
99
    );
97
    );
100
}
98
}
101
99
(-)a/C4/Auth.pm (-18 / +18 lines)
Lines 19-32 package C4::Auth; Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use Carp qw/croak/;
22
use Carp qw( croak );
23
23
24
use Digest::MD5 qw(md5_base64);
24
use Digest::MD5 qw( md5_base64 );
25
use JSON qw/encode_json/;
26
use URI::Escape;
27
use CGI::Session;
25
use CGI::Session;
28
26
29
require Exporter;
30
use C4::Context;
27
use C4::Context;
31
use C4::Templates;    # to get the template
28
use C4::Templates;    # to get the template
32
use C4::Languages;
29
use C4::Languages;
Lines 34-58 use C4::Search::History; Link Here
34
use Koha;
31
use Koha;
35
use Koha::Logger;
32
use Koha::Logger;
36
use Koha::Caches;
33
use Koha::Caches;
37
use Koha::AuthUtils qw(get_script_name hash_password);
34
use Koha::AuthUtils qw( get_script_name hash_password );
38
use Koha::Checkouts;
35
use Koha::Checkouts;
39
use Koha::DateUtils qw(dt_from_string);
36
use Koha::DateUtils qw( dt_from_string );
40
use Koha::Library::Groups;
37
use Koha::Library::Groups;
41
use Koha::Libraries;
38
use Koha::Libraries;
42
use Koha::Cash::Registers;
39
use Koha::Cash::Registers;
43
use Koha::Desks;
40
use Koha::Desks;
44
use Koha::Patrons;
41
use Koha::Patrons;
45
use Koha::Patron::Consents;
42
use Koha::Patron::Consents;
46
use POSIX qw/strftime/;
43
use List::MoreUtils qw( any );
47
use List::MoreUtils qw/ any /;
44
use Encode;
48
use Encode qw( encode is_utf8);
45
use C4::Auth_with_shibboleth qw( shib_ok get_login_shib login_shib_url logout_shib checkpw_shib );
49
use C4::Auth_with_shibboleth;
50
use Net::CIDR;
46
use Net::CIDR;
51
use C4::Log qw/logaction/;
47
use C4::Log qw( logaction );
52
48
53
# use utf8;
49
# use utf8;
54
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $ldap $cas $caslogout);
55
50
51
use vars qw($ldap $cas $caslogout);
52
our (@ISA, @EXPORT_OK);
56
BEGIN {
53
BEGIN {
57
    sub psgi_env { any { /^psgi\./ } keys %ENV }
54
    sub psgi_env { any { /^psgi\./ } keys %ENV }
58
55
Lines 63-74 BEGIN { Link Here
63
60
64
    C4::Context->set_remote_address;
61
    C4::Context->set_remote_address;
65
62
66
    @ISA       = qw(Exporter);
63
    require Exporter;
67
    @EXPORT    = qw(&checkauth &get_template_and_user &haspermission &get_user_subpermissions);
64
    @ISA = qw(Exporter);
68
    @EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash
65
69
      &get_all_subpermissions &get_user_subpermissions track_login_daily &in_iprange
66
    @EXPORT_OK = qw(
67
      checkauth check_api_auth get_session check_cookie_auth checkpw checkpw_internal checkpw_hash
68
      get_all_subpermissions get_user_subpermissions track_login_daily in_iprange
69
      get_template_and_user haspermission
70
    );
70
    );
71
    %EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] );
71
72
    $ldap      = C4::Context->config('useldapserver') || 0;
72
    $ldap      = C4::Context->config('useldapserver') || 0;
73
    $cas       = C4::Context->preference('casAuthentication');
73
    $cas       = C4::Context->preference('casAuthentication');
74
    $caslogout = C4::Context->preference('casLogout');
74
    $caslogout = C4::Context->preference('casLogout');
(-)a/C4/Auth_with_cas.pm (-4 / +3 lines)
Lines 21-40 use strict; Link Here
21
use warnings;
21
use warnings;
22
22
23
use C4::Context;
23
use C4::Context;
24
use Koha::AuthUtils qw(get_script_name);
24
use Koha::AuthUtils qw( get_script_name );
25
use Authen::CAS::Client;
25
use Authen::CAS::Client;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use FindBin;
28
use YAML::XS;
27
use YAML::XS;
29
28
30
use Koha::Logger;
29
use Koha::Logger;
31
30
32
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
31
our (@ISA, @EXPORT_OK);
33
32
34
BEGIN {
33
BEGIN {
35
    require Exporter;
34
    require Exporter;
36
    @ISA   = qw(Exporter);
35
    @ISA   = qw(Exporter);
37
    @EXPORT = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required);
36
    @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required);
38
}
37
}
39
my $defaultcasserver;
38
my $defaultcasserver;
40
my $casservers;
39
my $casservers;
(-)a/C4/Auth_with_ldap.pm (-7 / +5 lines)
Lines 18-40 package C4::Auth_with_ldap; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp;
21
use Carp qw( croak );
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Members::Messaging;
24
use C4::Members::Messaging;
25
use C4::Auth qw(checkpw_internal);
25
use C4::Auth qw( checkpw_internal );
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::AuthUtils qw(hash_password);
27
use Koha::AuthUtils qw( hash_password );
28
use List::MoreUtils qw( any );
29
use Net::LDAP;
28
use Net::LDAP;
30
use Net::LDAP::Filter;
29
use Net::LDAP::Filter;
31
30
32
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
31
our (@ISA, @EXPORT_OK);
33
34
BEGIN {
32
BEGIN {
35
	require Exporter;
33
	require Exporter;
36
	@ISA    = qw(Exporter);
34
	@ISA    = qw(Exporter);
37
	@EXPORT = qw( checkpw_ldap );
35
	@EXPORT_OK = qw( checkpw_ldap );
38
}
36
}
39
37
40
# Redefine checkpw_ldap:
38
# Redefine checkpw_ldap:
(-)a/C4/Auth_with_shibboleth.pm (-7 / +5 lines)
Lines 20-41 package C4::Auth_with_shibboleth; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Context;
22
use C4::Context;
23
use Koha::AuthUtils qw(get_script_name);
23
use Koha::AuthUtils qw( get_script_name );
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::Patrons;
25
use Koha::Patrons;
26
use C4::Members::Messaging;
26
use C4::Members::Messaging;
27
use Carp;
27
use Carp qw( carp );
28
use CGI;
28
use List::MoreUtils qw( any );
29
use List::MoreUtils qw(any);
30
29
31
use Koha::Logger;
30
use Koha::Logger;
32
31
33
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
32
our (@ISA, @EXPORT_OK);
34
35
BEGIN {
33
BEGIN {
36
    require Exporter;
34
    require Exporter;
37
    @ISA     = qw(Exporter);
35
    @ISA     = qw(Exporter);
38
    @EXPORT =
36
    @EXPORT_OK =
39
      qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
37
      qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
40
}
38
}
41
39
(-)a/C4/AuthoritiesMarc.pm (-32 / +34 lines)
Lines 21-33 package C4::AuthoritiesMarc; Link Here
21
use strict;
21
use strict;
22
use warnings;
22
use warnings;
23
use C4::Context;
23
use C4::Context;
24
use MARC::Record;
24
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblio );
25
use C4::Biblio;
25
use C4::Search qw( FindDuplicate new_record_from_zebra );
26
use C4::Search;
27
use C4::AuthoritiesMarc::MARC21;
26
use C4::AuthoritiesMarc::MARC21;
28
use C4::AuthoritiesMarc::UNIMARC;
27
use C4::AuthoritiesMarc::UNIMARC;
29
use C4::Charset;
28
use C4::Charset qw( SetUTF8Flag );
30
use C4::Log;
29
use C4::Log qw( logaction );
31
use Koha::MetadataRecord::Authority;
30
use Koha::MetadataRecord::Authority;
32
use Koha::Authorities;
31
use Koha::Authorities;
33
use Koha::Authority::MergeRequests;
32
use Koha::Authority::MergeRequests;
Lines 38-72 use Koha::SearchEngine; Link Here
38
use Koha::SearchEngine::Indexer;
37
use Koha::SearchEngine::Indexer;
39
use Koha::SearchEngine::Search;
38
use Koha::SearchEngine::Search;
40
39
41
use vars qw(@ISA @EXPORT);
40
our (@ISA, @EXPORT_OK);
42
43
BEGIN {
41
BEGIN {
44
42
45
	require Exporter;
43
    require Exporter;
46
	@ISA = qw(Exporter);
44
    @ISA       = qw(Exporter);
47
	@EXPORT = qw(
45
    @EXPORT_OK = qw(
48
	    &GetTagsLabels
46
      GetTagsLabels
49
    	&GetAuthMARCFromKohaField 
47
      GetAuthMARCFromKohaField
50
48
51
    	&AddAuthority
49
      AddAuthority
52
    	&ModAuthority
50
      ModAuthority
53
    	&DelAuthority
51
      DelAuthority
54
    	&GetAuthority
52
      GetAuthority
55
    	&GetAuthorityXML
53
      GetAuthorityXML
56
54
57
    	&SearchAuthorities
55
      SearchAuthorities
58
    
56
59
        &BuildSummary
57
      BuildSummary
60
        &BuildAuthHierarchies
58
      BuildAuthHierarchies
61
        &BuildAuthHierarchy
59
      BuildAuthHierarchy
62
        &GenerateHierarchy
60
      GenerateHierarchy
63
    
61
      GetHeaderAuthority
64
    	&merge
62
      AddAuthorityTrees
65
    	&FindDuplicateAuthority
63
      CompareFieldWithAuthority
66
64
67
        &GuessAuthTypeCode
65
      merge
68
        &GuessAuthId
66
      FindDuplicateAuthority
69
 	);
67
68
      GuessAuthTypeCode
69
      GuessAuthId
70
      compare_fields
71
    );
70
}
72
}
71
73
72
74
(-)a/C4/AuthoritiesMarc/MARC21.pm (-1 lines)
Lines 18-24 package C4::AuthoritiesMarc::MARC21; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use MARC::Record;
22
21
23
=head1 NAME
22
=head1 NAME
24
23
(-)a/C4/BackgroundJob.pm (-1 / +1 lines)
Lines 20-26 package C4::BackgroundJob; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Context;
22
use C4::Context;
23
use C4::Auth qw/get_session/;
23
use C4::Auth qw( get_session );
24
use Digest::MD5;
24
use Digest::MD5;
25
25
26
26
(-)a/C4/Barcodes.pm (-8 / +1 lines)
Lines 20-26 package C4::Barcodes; Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use Carp;
23
use Carp qw( carp );
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Barcodes::hbyymmincr;
26
use C4::Barcodes::hbyymmincr;
Lines 28-42 use C4::Barcodes::annual; Link Here
28
use C4::Barcodes::incremental;
28
use C4::Barcodes::incremental;
29
use C4::Barcodes::EAN13;
29
use C4::Barcodes::EAN13;
30
30
31
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
32
use vars qw($max $prefformat);
31
use vars qw($max $prefformat);
33
32
34
BEGIN {
35
	require Exporter;
36
    @ISA = qw(Exporter);
37
    @EXPORT_OK = qw();
38
}
39
40
sub _prefformat {
33
sub _prefformat {
41
	unless (defined $prefformat) {
34
	unless (defined $prefformat) {
42
		unless ($prefformat = C4::Context->preference('autoBarcode')) {
35
		unless ($prefformat = C4::Context->preference('autoBarcode')) {
(-)a/C4/Barcodes/EAN13.pm (-2 / +2 lines)
Lines 22-29 use warnings; Link Here
22
22
23
use C4::Context;
23
use C4::Context;
24
24
25
use Algorithm::CheckDigits;
25
use Algorithm::CheckDigits qw( CheckDigits );
26
use Carp;
26
use Carp qw( carp );
27
27
28
use vars qw(@ISA);
28
use vars qw(@ISA);
29
29
(-)a/C4/Barcodes/annual.pm (-2 / +2 lines)
Lines 20-30 package C4::Barcodes::annual; Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use Carp;
23
use Carp qw( carp );
24
24
25
use C4::Context;
25
use C4::Context;
26
26
27
use Koha::DateUtils qw( output_pref dt_from_string );
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
28
29
use vars qw(@ISA);
29
use vars qw(@ISA);
30
use vars qw($width);
30
use vars qw($width);
(-)a/C4/Barcodes/hbyymmincr.pm (-1 / +1 lines)
Lines 19-25 package C4::Barcodes::hbyymmincr; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use Carp qw( carp );
23
23
24
use C4::Context;
24
use C4::Context;
25
25
(-)a/C4/Biblio.pm (-12 / +20 lines)
Lines 21-32 package C4::Biblio; Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use vars qw(@ISA @EXPORT);
24
use vars qw(@ISA @EXPORT_OK);
25
BEGIN {
25
BEGIN {
26
    require Exporter;
26
    require Exporter;
27
    @ISA = qw(Exporter);
27
    @ISA = qw(Exporter);
28
28
29
    @EXPORT = qw(
29
    @EXPORT_OK = qw(
30
        AddBiblio
30
        AddBiblio
31
        GetBiblioData
31
        GetBiblioData
32
        GetMarcBiblio
32
        GetMarcBiblio
Lines 45-50 BEGIN { Link Here
45
        GetMarcQuantity
45
        GetMarcQuantity
46
        GetAuthorisedValueDesc
46
        GetAuthorisedValueDesc
47
        GetMarcStructure
47
        GetMarcStructure
48
        GetMarcSubfieldStructure
48
        IsMarcStructureInternal
49
        IsMarcStructureInternal
49
        GetMarcFromKohaField
50
        GetMarcFromKohaField
50
        GetMarcSubfieldStructureFromKohaField
51
        GetMarcSubfieldStructureFromKohaField
Lines 54-59 BEGIN { Link Here
54
        CountItemsIssued
55
        CountItemsIssued
55
        ModBiblio
56
        ModBiblio
56
        ModZebra
57
        ModZebra
58
        EmbedItemsInMarcBiblio
57
        UpdateTotalIssues
59
        UpdateTotalIssues
58
        RemoveAllNsb
60
        RemoveAllNsb
59
        DelBiblio
61
        DelBiblio
Lines 63-97 BEGIN { Link Here
63
        TransformHtmlToMarc
65
        TransformHtmlToMarc
64
        TransformHtmlToXml
66
        TransformHtmlToXml
65
        prepare_host_field
67
        prepare_host_field
68
        TransformMarcToKohaOneField
66
    );
69
    );
67
70
68
    # Internal functions
71
    # Internal functions
69
    # those functions are exported but should not be used
72
    # those functions are exported but should not be used
70
    # they are useful in a few circumstances, so they are exported,
73
    # they are useful in a few circumstances, so they are exported,
71
    # but don't use them unless you are a core developer ;-)
74
    # but don't use them unless you are a core developer ;-)
72
    push @EXPORT, qw(
75
    push @EXPORT_OK, qw(
73
      ModBiblioMarc
76
      ModBiblioMarc
74
    );
77
    );
75
}
78
}
76
79
77
use Carp;
80
use Carp qw( carp );
78
use Try::Tiny;
81
use Try::Tiny qw( catch try );
79
82
80
use Encode qw( decode is_utf8 );
83
use Encode;
81
use List::MoreUtils qw( uniq );
84
use List::MoreUtils qw( uniq );
82
use MARC::Record;
85
use MARC::Record;
83
use MARC::File::USMARC;
86
use MARC::File::USMARC;
84
use MARC::File::XML;
87
use MARC::File::XML;
85
use POSIX qw(strftime);
88
use POSIX qw( strftime );
86
use Module::Load::Conditional qw(can_load);
89
use Module::Load::Conditional qw( can_load );
87
90
88
use C4::Koha;
91
use C4::Koha;
89
use C4::Log;    # logaction
92
use C4::Log qw( logaction );    # logaction
90
use C4::Budgets;
93
use C4::Budgets;
91
use C4::ClassSource;
94
use C4::ClassSource qw( GetClassSort );
92
use C4::Charset;
95
use C4::Charset qw(
96
    nsb_clean
97
    SetMarcUnicodeFlag
98
    SetUTF8Flag
99
    StripNonXmlChars
100
);
93
use C4::Linker;
101
use C4::Linker;
94
use C4::OAI::Sets;
102
use C4::OAI::Sets;
103
use C4::Items qw( GetHiddenItemnumbers GetMarcItem );
95
104
96
use Koha::Logger;
105
use Koha::Logger;
97
use Koha::Caches;
106
use Koha::Caches;
Lines 2572-2578 sub EmbedItemsInMarcBiblio { Link Here
2572
    my $opachiddenitems = $opac
2581
    my $opachiddenitems = $opac
2573
      && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
2582
      && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
2574
2583
2575
    require C4::Items;
2576
    while ( my ($itemnumber) = $sth->fetchrow_array ) {
2584
    while ( my ($itemnumber) = $sth->fetchrow_array ) {
2577
        next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
2585
        next if @$itemnumbers and not grep { $_ == $itemnumber } @$itemnumbers;
2578
        my $item;
2586
        my $item;
(-)a/C4/Breeding.pm (-8 / +7 lines)
Lines 22-43 use strict; Link Here
22
use warnings;
22
use warnings;
23
23
24
use C4::Biblio;
24
use C4::Biblio;
25
use C4::Koha;
25
use C4::Koha qw( GetNormalizedISBN );
26
use C4::Charset;
26
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
27
use MARC::File::USMARC;
27
use MARC::File::USMARC;
28
use MARC::Field;
28
use MARC::Field;
29
use C4::ImportBatch;
29
use C4::ImportBatch qw( GetZ3950BatchId AddBiblioToBatch AddAuthToBatch );
30
use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority
30
use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority
31
use C4::Languages;
31
use C4::Languages;
32
use Koha::Database;
32
use Koha::Database;
33
use Koha::XSLT::Base;
33
use Koha::XSLT::Base;
34
34
35
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
35
our (@ISA, @EXPORT_OK);
36
37
BEGIN {
36
BEGIN {
38
	require Exporter;
37
    require Exporter;
39
	@ISA = qw(Exporter);
38
    @ISA       = qw(Exporter);
40
    @EXPORT = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth);
39
    @EXPORT_OK = qw(BreedingSearch Z3950Search Z3950SearchAuth);
41
}
40
}
42
41
43
=head1 NAME
42
=head1 NAME
(-)a/C4/Budgets.pm (-46 / +53 lines)
Lines 23-76 use Koha::Database; Link Here
23
use Koha::Patrons;
23
use Koha::Patrons;
24
use Koha::Acquisition::Invoice::Adjustments;
24
use Koha::Acquisition::Invoice::Adjustments;
25
use C4::Acquisition;
25
use C4::Acquisition;
26
use vars qw(@ISA @EXPORT);
27
26
27
our (@ISA, @EXPORT_OK);
28
BEGIN {
28
BEGIN {
29
	require Exporter;
29
    require Exporter;
30
	@ISA    = qw(Exporter);
30
    @ISA       = qw(Exporter);
31
	@EXPORT = qw(
31
    @EXPORT_OK = qw(
32
32
33
        &GetBudget
33
      GetBudget
34
        &GetBudgetByOrderNumber
34
      GetBudgetByOrderNumber
35
        &GetBudgetByCode
35
      GetBudgetByCode
36
        &GetBudgets
36
      GetBudgets
37
        &BudgetsByActivity
37
      BudgetsByActivity
38
        &GetBudgetsReport
38
      GetBudgetsReport
39
        &GetBudgetReport
39
      GetBudgetReport
40
        &GetBudgetHierarchy
40
      GetBudgetsByActivity
41
	    &AddBudget
41
      GetBudgetHierarchy
42
        &ModBudget
42
      AddBudget
43
        &DelBudget
43
      ModBudget
44
        &GetBudgetSpent
44
      DelBudget
45
        &GetBudgetOrdered
45
      GetBudgetSpent
46
        &GetBudgetName
46
      GetBudgetOrdered
47
        &GetPeriodsCount
47
      GetBudgetName
48
        GetBudgetHierarchySpent
48
      GetPeriodsCount
49
        GetBudgetHierarchyOrdered
49
      GetBudgetHierarchySpent
50
50
      GetBudgetHierarchyOrdered
51
        &GetBudgetUsers
51
52
        &ModBudgetUsers
52
      GetBudgetUsers
53
        &CanUserUseBudget
53
      ModBudgetUsers
54
        &CanUserModifyBudget
54
      CanUserUseBudget
55
55
      CanUserModifyBudget
56
	    &GetBudgetPeriod
56
57
        &GetBudgetPeriods
57
      GetBudgetPeriod
58
        &ModBudgetPeriod
58
      GetBudgetPeriods
59
        &AddBudgetPeriod
59
      ModBudgetPeriod
60
	    &DelBudgetPeriod
60
      AddBudgetPeriod
61
61
      DelBudgetPeriod
62
        &ModBudgetPlan
62
63
63
      ModBudgetPlan
64
		&GetBudgetsPlanCell
64
65
        &AddBudgetPlanValue
65
      GetBudgetsPlanCell
66
        &GetBudgetAuthCats
66
      AddBudgetPlanValue
67
        &BudgetHasChildren
67
      GetBudgetAuthCats
68
        &CheckBudgetParent
68
      BudgetHasChildren
69
        &CheckBudgetParentPerm
69
      GetBudgetChildren
70
70
      SetOwnerToFundHierarchy
71
        &HideCols
71
      CheckBudgetParent
72
        &GetCols
72
      CheckBudgetParentPerm
73
	);
73
74
      HideCols
75
      GetCols
76
77
      CloneBudgetPeriod
78
      CloneBudgetHierarchy
79
      MoveOrders
80
    );
74
}
81
}
75
82
76
# ----------------------------BUDGETS.PM-----------------------------";
83
# ----------------------------BUDGETS.PM-----------------------------";
(-)a/C4/Calendar.pm (-2 / +2 lines)
Lines 19-26 use strict; Link Here
19
use warnings;
19
use warnings;
20
use vars qw(@EXPORT);
20
use vars qw(@EXPORT);
21
21
22
use Carp;
22
use Carp qw( croak );
23
use Date::Calc qw( Date_to_Days Today);
23
use Date::Calc qw( Today );
24
24
25
use C4::Context;
25
use C4::Context;
26
use Koha::Caches;
26
use Koha::Caches;
(-)a/C4/Charset.pm (-6 / +5 lines)
Lines 19-37 package C4::Charset; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use MARC::Charset qw/marc8_to_utf8/;
22
use MARC::Charset;
23
use Text::Iconv;
23
use Text::Iconv;
24
use Unicode::Normalize;
24
use Unicode::Normalize qw( NFC NFD );
25
use Encode qw( decode encode is_utf8 );
25
use Encode;
26
26
27
use Koha::Logger;
27
use Koha::Logger;
28
28
29
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
29
our (@ISA, @EXPORT_OK);
30
31
BEGIN {
30
BEGIN {
32
    require Exporter;
31
    require Exporter;
33
    @ISA    = qw(Exporter);
32
    @ISA    = qw(Exporter);
34
    @EXPORT = qw(
33
    @EXPORT_OK = qw(
35
        NormalizeString
34
        NormalizeString
36
        IsStringUTF8ish
35
        IsStringUTF8ish
37
        MarcToUTF8Record
36
        MarcToUTF8Record
(-)a/C4/Circulation.pm (-80 / +70 lines)
Lines 24-55 use POSIX qw( floor ); Link Here
24
use YAML::XS;
24
use YAML::XS;
25
use Encode;
25
use Encode;
26
26
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use C4::Context;
28
use C4::Context;
29
use C4::Stats;
29
use C4::Stats qw( UpdateStats );
30
use C4::Reserves;
30
use C4::Reserves qw( CheckReserves CanItemBeReserved MoveReserve ModReserve ModReserveMinusPriority RevertWaitingStatus IsItemOnHoldAndFound IsAvailableForItemLevelRequest );
31
use C4::Biblio;
31
use C4::Biblio qw( UpdateTotalIssues );
32
use C4::Items;
32
use C4::Items qw( ModItemTransfer ModDateLastSeen CartToShelf );
33
use C4::Members;
34
use C4::Accounts;
33
use C4::Accounts;
35
use C4::ItemCirculationAlertPreference;
34
use C4::ItemCirculationAlertPreference;
36
use C4::Message;
35
use C4::Message;
37
use C4::Log; # logaction
36
use C4::Log qw( logaction ); # logaction
38
use C4::Overdues qw(CalcFine UpdateFine get_chargeable_units);
37
use C4::Overdues;
39
use C4::RotatingCollections qw(GetCollectionItemBranches);
38
use C4::RotatingCollections qw(GetCollectionItemBranches);
40
use Algorithm::CheckDigits;
39
use Algorithm::CheckDigits qw( CheckDigits );
41
40
42
use Data::Dumper;
41
use Data::Dumper qw( Dumper );
43
use Koha::Account;
42
use Koha::Account;
44
use Koha::AuthorisedValues;
43
use Koha::AuthorisedValues;
45
use Koha::Biblioitems;
44
use Koha::Biblioitems;
46
use Koha::DateUtils;
45
use Koha::DateUtils qw( dt_from_string output_pref );
47
use Koha::Calendar;
46
use Koha::Calendar;
48
use Koha::Checkouts;
47
use Koha::Checkouts;
49
use Koha::Illrequests;
48
use Koha::Illrequests;
50
use Koha::Items;
49
use Koha::Items;
51
use Koha::Patrons;
50
use Koha::Patrons;
52
use Koha::Patron::Debarments;
51
use Koha::Patron::Debarments qw( DelUniqueDebarment GetDebarments );
53
use Koha::Database;
52
use Koha::Database;
54
use Koha::Libraries;
53
use Koha::Libraries;
55
use Koha::Account::Lines;
54
use Koha::Account::Lines;
Lines 62-138 use Koha::Config::SysPref; Link Here
62
use Koha::Checkouts::ReturnClaims;
61
use Koha::Checkouts::ReturnClaims;
63
use Koha::SearchEngine::Indexer;
62
use Koha::SearchEngine::Indexer;
64
use Koha::Exceptions::Checkout;
63
use Koha::Exceptions::Checkout;
65
use Carp;
64
use Carp qw( carp );
66
use List::MoreUtils qw( uniq any );
65
use List::MoreUtils qw( any );
67
use Scalar::Util qw( looks_like_number );
66
use Scalar::Util qw( looks_like_number );
68
use Try::Tiny;
67
use Date::Calc qw( Date_to_Days );
69
use Date::Calc qw(
68
our (@ISA, @EXPORT_OK);
70
  Today
71
  Today_and_Now
72
  Add_Delta_YM
73
  Add_Delta_DHMS
74
  Date_to_Days
75
  Day_of_Week
76
  Add_Delta_Days
77
);
78
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
79
80
BEGIN {
69
BEGIN {
81
	require Exporter;
70
82
	@ISA    = qw(Exporter);
71
    require Exporter;
83
72
    @ISA = qw(Exporter);
84
	# FIXME subs that should probably be elsewhere
73
85
	push @EXPORT, qw(
74
    # FIXME subs that should probably be elsewhere
86
		&barcodedecode
75
    push @EXPORT_OK, qw(
87
        &LostItem
76
      barcodedecode
88
        &ReturnLostItem
77
      LostItem
89
        &GetPendingOnSiteCheckouts
78
      ReturnLostItem
90
	);
79
      GetPendingOnSiteCheckouts
91
80
92
	# subs to deal with issuing a book
81
      CanBookBeIssued
93
	push @EXPORT, qw(
82
      checkHighHolds
94
		&CanBookBeIssued
83
      CanBookBeRenewed
95
		&CanBookBeRenewed
84
      AddIssue
96
		&AddIssue
85
      GetLoanLength
97
		&AddRenewal
86
      GetHardDueDate
98
		&GetRenewCount
87
      AddRenewal
99
        &GetSoonestRenewDate
88
      GetRenewCount
100
        &GetLatestAutoRenewDate
89
      GetSoonestRenewDate
101
		&GetIssuingCharges
90
      GetLatestAutoRenewDate
102
        &GetBranchBorrowerCircRule
91
      GetIssuingCharges
103
        &GetBranchItemRule
92
      AddIssuingCharge
104
		&GetOpenIssue
93
      GetBranchBorrowerCircRule
105
        &CheckIfIssuedToPatron
94
      GetBranchItemRule
106
        &IsItemIssued
95
      GetBiblioIssues
107
        GetTopIssues
96
      GetOpenIssue
108
	);
97
      GetUpcomingDueIssues
109
98
      CheckIfIssuedToPatron
110
	# subs to deal with returns
99
      IsItemIssued
111
	push @EXPORT, qw(
100
      GetAgeRestriction
112
		&AddReturn
101
      GetTopIssues
113
        &MarkIssueReturned
102
114
	);
103
      AddReturn
115
104
      MarkIssueReturned
116
	# subs to deal with transfers
105
117
	push @EXPORT, qw(
106
      transferbook
118
		&transferbook
107
      TooMany
119
		&GetTransfers
108
      GetTransfers
120
		&GetTransfersFromTo
109
      GetTransfersFromTo
121
		&updateWrongTransfer
110
      updateWrongTransfer
122
                &IsBranchTransferAllowed
111
      CalcDateDue
123
                &CreateBranchTransferLimit
112
      CheckValidBarcode
124
                &DeleteBranchTransferLimits
113
      IsBranchTransferAllowed
125
        &TransferSlip
114
      CreateBranchTransferLimit
126
	);
115
      DeleteBranchTransferLimits
127
116
      TransferSlip
128
    # subs to deal with offline circulation
117
129
    push @EXPORT, qw(
118
      GetOfflineOperations
130
      &GetOfflineOperations
119
      GetOfflineOperation
131
      &GetOfflineOperation
120
      AddOfflineOperation
132
      &AddOfflineOperation
121
      DeleteOfflineOperation
133
      &DeleteOfflineOperation
122
      ProcessOfflineOperation
134
      &ProcessOfflineOperation
123
      ProcessOfflinePayment
135
    );
124
    );
125
    push @EXPORT_OK, '_GetCircControlBranch';    # This is wrong!
136
}
126
}
137
127
138
=head1 NAME
128
=head1 NAME
(-)a/C4/ClassSortRoutine.pm (-9 / +9 lines)
Lines 20-31 package C4::ClassSortRoutine; Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
require Exporter;
24
use Class::Factory::Util;
23
use Class::Factory::Util;
25
use C4::Context;
24
use C4::Context;
26
25
27
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
26
our (@ISA, @EXPORT_OK);
28
27
BEGIN {
28
    require Exporter;
29
    @ISA    = qw(Exporter);
30
    @EXPORT_OK = qw(
31
       GetSortRoutineNames
32
       GetClassSortKey
33
    );
34
}
29
35
30
=head1 NAME 
36
=head1 NAME 
31
37
Lines 40-51 use C4::ClassSortRoutine; Link Here
40
46
41
=cut
47
=cut
42
48
43
@ISA    = qw(Exporter);
44
@EXPORT = qw(
45
   &GetSortRoutineNames
46
   &GetClassSortKey
47
);
48
49
# initialization code
49
# initialization code
50
my %loaded_routines = ();
50
my %loaded_routines = ();
51
my @sort_routines = GetSortRoutineNames();
51
my @sort_routines = GetSortRoutineNames();
(-)a/C4/ClassSortRoutine/Dewey.pm (-1 / +1 lines)
Lines 28-34 C4::ClassSortRoutine::Dewey - generic call number sorting key routine Link Here
28
28
29
=head1 SYNOPSIS
29
=head1 SYNOPSIS
30
30
31
use C4::ClassSortRoutine;
31
use C4::ClassSortRoutine qw( GetClassSortKey );
32
32
33
my $cn_sort = GetClassSortKey('Dewey', $cn_class, $cn_item);
33
my $cn_sort = GetClassSortKey('Dewey', $cn_class, $cn_item);
34
34
(-)a/C4/ClassSortRoutine/Generic.pm (-1 / +1 lines)
Lines 28-34 C4::ClassSortRoutine::Generic - generic call number sorting key routine Link Here
28
28
29
=head1 SYNOPSIS
29
=head1 SYNOPSIS
30
30
31
use C4::ClassSortRoutine;
31
use C4::ClassSortRoutine qw( GetClassSortKey );
32
32
33
my $cn_sort = GetClassSortKey('Generic', $cn_class, $cn_item);
33
my $cn_sort = GetClassSortKey('Generic', $cn_class, $cn_item);
34
34
(-)a/C4/ClassSortRoutine/LCC.pm (-1 / +1 lines)
Lines 30-36 C4::ClassSortRoutine::LCC - generic call number sorting key routine Link Here
30
30
31
=head1 SYNOPSIS
31
=head1 SYNOPSIS
32
32
33
use C4::ClassSortRoutine;
33
use C4::ClassSortRoutine qw( GetClassSortKey );
34
34
35
my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item);
35
my $cn_sort = GetClassSortKey('LCC', $cn_class, $cn_item);
36
36
(-)a/C4/ClassSource.pm (-16 / +13 lines)
Lines 20-31 package C4::ClassSource; Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
require Exporter;
24
use C4::Context;
23
use C4::Context;
25
use C4::ClassSortRoutine;
24
use C4::ClassSortRoutine qw( GetClassSortKey );
26
25
27
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
26
our (@ISA, @EXPORT_OK);
28
27
BEGIN {
28
    require Exporter;
29
    @ISA    = qw(Exporter);
30
    @EXPORT_OK = qw(
31
        GetClassSources
32
        GetClassSource
33
        GetClassSortRule
34
        GetClassSort
35
    );
36
}
29
37
30
=head1 NAME
38
=head1 NAME
31
39
Lines 44-60 sources and sorting rules. Link Here
44
52
45
=cut
53
=cut
46
54
47
48
@ISA    = qw(Exporter);
49
@EXPORT = qw(
50
    &GetClassSources
51
    &GetClassSource
52
    &GetClassSortRule
53
54
    &GetClassSort
55
56
);
57
58
=head2 GetClassSources
55
=head2 GetClassSources
59
56
60
  my $sources = GetClassSources();
57
  my $sources = GetClassSources();
(-)a/C4/ClassSplitRoutine.pm (-2 / +1 lines)
Lines 20-26 package C4::ClassSplitRoutine; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
require Exporter;
22
require Exporter;
23
use Class::Factory::Util;
24
23
25
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
24
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
26
25
Lines 39-45 use C4::ClassSplitRoutine; Link Here
39
38
40
@ISA    = qw(Exporter);
39
@ISA    = qw(Exporter);
41
@EXPORT = qw(
40
@EXPORT = qw(
42
   &GetSplitRoutineNames
41
   GetSplitRoutineNames
43
);
42
);
44
43
45
=head2 GetSplitRoutineNames
44
=head2 GetSplitRoutineNames
(-)a/C4/Context.pm (-3 / +2 lines)
Lines 35-46 BEGIN { Link Here
35
    }
35
    }
36
};
36
};
37
37
38
use Carp;
38
use Carp qw( carp );
39
use DateTime::TimeZone;
39
use DateTime::TimeZone;
40
use Encode;
40
use Encode;
41
use File::Spec;
41
use File::Spec;
42
use Module::Load::Conditional qw(can_load);
42
use POSIX;
43
use POSIX ();
44
use YAML::XS;
43
use YAML::XS;
45
use ZOOM;
44
use ZOOM;
46
45
(-)a/C4/Contract.pm (-8 / +8 lines)
Lines 25-38 use vars qw(@ISA @EXPORT); Link Here
25
25
26
BEGIN {
26
BEGIN {
27
    require Exporter;
27
    require Exporter;
28
	@ISA    = qw(Exporter);
28
    @ISA    = qw(Exporter);
29
	@EXPORT = qw(
29
    @EXPORT = qw(
30
        &GetContracts
30
      GetContracts
31
        &GetContract
31
      GetContract
32
        &AddContract
32
      AddContract
33
        &ModContract
33
      ModContract
34
        &DelContract
34
      DelContract
35
	);
35
    );
36
}
36
}
37
37
38
=head1 NAME
38
=head1 NAME
(-)a/C4/CourseReserves.pm (-19 / +18 lines)
Lines 17-59 package C4::CourseReserves; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use List::MoreUtils qw(any);
20
use List::MoreUtils qw( any );
21
21
22
use C4::Context;
22
use C4::Context;
23
use C4::Circulation qw(GetOpenIssue);
23
use C4::Circulation qw( GetOpenIssue );
24
24
25
use Koha::Courses;
25
use Koha::Courses;
26
use Koha::Course::Instructors;
26
use Koha::Course::Instructors;
27
use Koha::Course::Items;
27
use Koha::Course::Items;
28
use Koha::Course::Reserves;
28
use Koha::Course::Reserves;
29
29
30
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS @FIELDS);
30
use vars qw(@FIELDS);
31
31
our (@ISA, @EXPORT_OK);
32
BEGIN {
32
BEGIN {
33
    require Exporter;
33
    require Exporter;
34
    @ISA       = qw(Exporter);
34
    @ISA       = qw(Exporter);
35
    @EXPORT_OK = qw(
35
    @EXPORT_OK = qw(
36
      &GetCourse
36
      GetCourse
37
      &ModCourse
37
      ModCourse
38
      &GetCourses
38
      GetCourses
39
      &DelCourse
39
      DelCourse
40
40
41
      &GetCourseInstructors
41
      GetCourseInstructors
42
      &ModCourseInstructors
42
      ModCourseInstructors
43
43
44
      &GetCourseItem
44
      GetCourseItem
45
      &ModCourseItem
45
      ModCourseItem
46
46
47
      &GetCourseReserve
47
      GetCourseReserve
48
      &ModCourseReserve
48
      ModCourseReserve
49
      &GetCourseReserves
49
      GetCourseReserves
50
      &DelCourseReserve
50
      DelCourseReserve
51
51
52
      &SearchCourses
52
      SearchCourses
53
53
54
      &GetItemCourseReservesInfo
54
      GetItemCourseReservesInfo
55
    );
55
    );
56
    %EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
57
56
58
    @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
57
    @FIELDS = ( 'itype', 'ccode', 'homebranch', 'holdingbranch', 'location' );
59
}
58
}
(-)a/C4/Creators.pm (-1 / +17 lines)
Lines 38-44 BEGIN { Link Here
38
                     get_unit_values
38
                     get_unit_values
39
                     html_table
39
                     html_table
40
    );
40
    );
41
    use C4::Creators::Lib;
41
    use C4::Creators::Lib qw(
42
    get_all_image_names
43
    get_all_layouts
44
    get_all_profiles
45
    get_all_templates
46
    get_barcode_types
47
    get_batch_summary
48
    get_card_summary
49
    get_font_types
50
    get_label_summary
51
    get_label_types
52
    get_output_formats
53
    get_table_names
54
    get_text_justification_types
55
    get_unit_values
56
    html_table
57
);
42
    use C4::Creators::PDF;
58
    use C4::Creators::PDF;
43
}
59
}
44
60
(-)a/C4/Creators/Lib.pm (-1 / +1 lines)
Lines 18-24 package C4::Creators::Lib; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Storable qw(dclone);
21
use Storable qw( dclone );
22
22
23
use autouse 'Data::Dumper' => qw(Dumper);
23
use autouse 'Data::Dumper' => qw(Dumper);
24
24
(-)a/C4/Creators/PDF.pm (-2 / +33 lines)
Lines 19-28 package C4::Creators::PDF; Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use PDF::Reuse;
22
use PDF::Reuse qw(
23
    prAdd
24
    prAltJpeg
25
    prBookmark
26
    prCompress
27
    prDoc
28
    prDocDir
29
    prDocForm
30
    prEnd
31
    prExtract
32
    prField
33
    prFile
34
    prFont
35
    prFontSize
36
    prForm
37
    prGetLogBuffer
38
    prGraphState
39
    prImage
40
    prInit
41
    prInitVars
42
    prJpeg
43
    prJs
44
    prLink
45
    prLog
46
    prLogDir
47
    prMbox
48
    prPage
49
    prSinglePage
50
    prStrWidth
51
    prText
52
    prTTFont
53
);
23
use PDF::Reuse::Barcode;
54
use PDF::Reuse::Barcode;
24
use File::Temp;
55
use File::Temp;
25
use List::Util qw/first/;
56
use List::Util qw( first );
26
57
27
58
28
sub _InitVars {
59
sub _InitVars {
(-)a/C4/Creators/Profile.pm (-1 / +1 lines)
Lines 6-12 use warnings; Link Here
6
use autouse 'Data::Dumper' => qw(Dumper);
6
use autouse 'Data::Dumper' => qw(Dumper);
7
7
8
use C4::Context;
8
use C4::Context;
9
use C4::Creators::Lib qw(get_unit_values);
9
use C4::Creators::Lib qw( get_unit_values );
10
10
11
11
12
sub _check_params {
12
sub _check_params {
(-)a/C4/Creators/Template.pm (-2 / +2 lines)
Lines 2-13 package C4::Creators::Template; Link Here
2
2
3
use strict;
3
use strict;
4
use warnings;
4
use warnings;
5
use POSIX qw(ceil);
5
use POSIX qw( ceil );
6
use autouse 'Data::Dumper' => qw(Dumper);
6
use autouse 'Data::Dumper' => qw(Dumper);
7
7
8
use C4::Context;
8
use C4::Context;
9
use C4::Creators::Profile;
9
use C4::Creators::Profile;
10
use C4::Creators::Lib qw(get_unit_values);
10
use C4::Creators::Lib qw( get_unit_values );
11
11
12
12
13
sub _check_params {
13
sub _check_params {
(-)a/C4/External/BakerTaylor.pm (-7 / +6 lines)
Lines 19-39 package C4::External::BakerTaylor; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use XML::Simple;
21
use XML::Simple;
22
use LWP::Simple;
22
use LWP::Simple qw( get );
23
use HTTP::Request::Common;
24
23
25
use C4::Context;
24
use C4::Context;
26
25
27
use Modern::Perl;
26
use Modern::Perl;
28
27
29
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
28
use vars qw(%EXPORT_TAGS $VERSION);
29
our (@ISA, @EXPORT_OK);
30
30
31
BEGIN {
31
BEGIN {
32
	require Exporter;
32
    require Exporter;
33
	@ISA = qw(Exporter);
33
    @ISA = qw(Exporter);
34
    $VERSION = 3.07.00.049;
34
    $VERSION = 3.07.00.049;
35
	@EXPORT_OK = qw(&availability &content_cafe &image_url &link_url &http_jacket_link);
35
    @EXPORT_OK = qw(availability content_cafe_url image_url link_url http_jacket_link);
36
	%EXPORT_TAGS = (all=>\@EXPORT_OK);
37
}
36
}
38
37
39
# These variables are plack safe: they are initialized each time
38
# These variables are plack safe: they are initialized each time
(-)a/C4/External/OverDrive.pm (-1 / +1 lines)
Lines 21-27 use strict; Link Here
21
use warnings;
21
use warnings;
22
22
23
use Koha;
23
use Koha;
24
use JSON;
24
use JSON qw( from_json );
25
use Koha::Caches;
25
use Koha::Caches;
26
use HTTP::Request;
26
use HTTP::Request;
27
use HTTP::Request::Common;
27
use HTTP::Request::Common;
(-)a/C4/External/Syndetics.pm (-10 / +9 lines)
Lines 17-27 package C4::External::Syndetics; Link Here
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use XML::Simple;
20
use XML::Simple qw( XMLout );
21
use XML::LibXML;
21
use XML::LibXML;
22
use LWP::Simple;
22
use LWP::Simple qw( $ua );
23
use LWP::UserAgent;
23
use LWP::UserAgent;
24
use HTTP::Request::Common;
25
24
26
use strict;
25
use strict;
27
use warnings;
26
use warnings;
Lines 32-44 BEGIN { Link Here
32
    require Exporter;
31
    require Exporter;
33
    @ISA = qw(Exporter);
32
    @ISA = qw(Exporter);
34
    @EXPORT = qw(
33
    @EXPORT = qw(
35
        &get_syndetics_index
34
        get_syndetics_index
36
        &get_syndetics_summary
35
        get_syndetics_summary
37
        &get_syndetics_toc
36
        get_syndetics_toc
38
        &get_syndetics_editions
37
        get_syndetics_editions
39
        &get_syndetics_excerpt
38
        get_syndetics_excerpt
40
        &get_syndetics_reviews
39
        get_syndetics_reviews
41
        &get_syndetics_anotes
40
        get_syndetics_anotes
42
    );
41
    );
43
}
42
}
44
43
(-)a/C4/Heading.pm (-3 / +1 lines)
Lines 19-29 package C4::Heading; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use MARC::Record;
23
use MARC::Field;
22
use MARC::Field;
24
use C4::Context;
23
use C4::Context;
25
use Module::Load;
24
use Module::Load qw( load );
26
use Carp;
27
25
28
26
29
=head1 NAME
27
=head1 NAME
(-)a/C4/Heading/MARC21.pm (-1 lines)
Lines 19-25 package C4::Heading::MARC21; Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use MARC::Record;
23
use MARC::Field;
22
use MARC::Field;
24
23
25
24
(-)a/C4/Heading/UNIMARC.pm (-1 lines)
Lines 20-26 package C4::Heading::UNIMARC; Link Here
20
use 5.010;
20
use 5.010;
21
use strict;
21
use strict;
22
use warnings;
22
use warnings;
23
use MARC::Record;
24
use MARC::Field;
23
use MARC::Field;
25
use C4::Context;
24
use C4::Context;
26
25
(-)a/C4/HoldsQueue.pm (-13 / +10 lines)
Lines 24-52 use warnings; Link Here
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Search;
26
use C4::Search;
27
use C4::Items;
27
use C4::Circulation qw( GetTransfers GetBranchItemRule );
28
use C4::Circulation;
28
use Koha::DateUtils qw( dt_from_string );
29
use C4::Members;
30
use C4::Biblio;
31
use Koha::DateUtils;
32
use Koha::Items;
29
use Koha::Items;
33
use Koha::Patrons;
30
use Koha::Patrons;
34
use Koha::Libraries;
31
use Koha::Libraries;
35
32
36
use List::Util qw(shuffle);
33
use List::Util qw( shuffle );
37
use List::MoreUtils qw(any);
34
use List::MoreUtils qw( any );
38
use Data::Dumper;
39
35
40
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
36
our (@ISA, @EXPORT_OK);
41
BEGIN {
37
BEGIN {
42
    require Exporter;
38
    require Exporter;
43
    @ISA = qw(Exporter);
39
    @ISA = qw(Exporter);
44
    @EXPORT_OK = qw(
40
    @EXPORT_OK = qw(
45
        &CreateQueue
41
        CreateQueue
46
        &GetHoldsQueueItems
42
        GetHoldsQueueItems
47
43
48
        &TransportCostMatrix
44
        TransportCostMatrix
49
        &UpdateTransportCostMatrix
45
        UpdateTransportCostMatrix
46
        GetPendingHoldRequestsForBib
50
     );
47
     );
51
}
48
}
52
49
(-)a/C4/ILSDI/Services.pm (-8 / +6 lines)
Lines 21-39 use strict; Link Here
21
use warnings;
21
use warnings;
22
22
23
use C4::Members;
23
use C4::Members;
24
use C4::Items;
24
use C4::Items qw( get_hostitemnumbers_of );
25
use C4::Circulation;
25
use C4::Circulation qw( CanBookBeRenewed barcodedecode CanBookBeIssued AddRenewal );
26
use C4::Accounts;
26
use C4::Accounts;
27
use C4::Biblio;
27
use C4::Biblio qw( GetMarcBiblio );
28
use C4::Reserves qw(AddReserve CanBookBeReserved CanItemBeReserved IsAvailableForItemLevelRequest);
28
use C4::Reserves qw( CanBookBeReserved IsAvailableForItemLevelRequest CalculatePriority AddReserve CanItemBeReserved );
29
use C4::Context;
29
use C4::Context;
30
use C4::AuthoritiesMarc;
30
use C4::Auth;
31
use XML::Simple;
32
use HTML::Entities;
33
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
34
use DateTime;
32
use DateTime;
35
use C4::Auth;
33
use C4::Auth;
36
use Koha::DateUtils;
34
use Koha::DateUtils qw( dt_from_string );
37
35
38
use Koha::Biblios;
36
use Koha::Biblios;
39
use Koha::Checkouts;
37
use Koha::Checkouts;
(-)a/C4/ImportBatch.pm (-55 / +66 lines)
Lines 21-87 use strict; Link Here
21
use warnings;
21
use warnings;
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Koha;
24
use C4::Koha qw( GetNormalizedISBN );
25
use C4::Biblio;
25
use C4::Biblio qw(
26
use C4::Items;
26
    AddBiblio
27
use C4::Charset;
27
    DelBiblio
28
    GetMarcFromKohaField
29
    GetXmlBiblio
30
    ModBiblio
31
    TransformMarcToKoha
32
);
33
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
34
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag StripNonXmlChars );
28
use C4::AuthoritiesMarc;
35
use C4::AuthoritiesMarc;
29
use C4::MarcModificationTemplates;
36
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
30
use Koha::Items;
37
use Koha::Items;
31
use Koha::Plugins::Handler;
38
use Koha::Plugins::Handler;
32
use Koha::Logger;
39
use Koha::Logger;
33
40
34
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
41
our (@ISA, @EXPORT_OK);
35
36
BEGIN {
42
BEGIN {
37
	require Exporter;
43
    require Exporter;
38
	@ISA    = qw(Exporter);
44
    @ISA       = qw(Exporter);
39
	@EXPORT = qw(
45
    @EXPORT_OK = qw(
40
    GetZ3950BatchId
46
      GetZ3950BatchId
41
    GetWebserviceBatchId
47
      GetWebserviceBatchId
42
    GetImportRecordMarc
48
      GetImportRecordMarc
43
    GetImportRecordMarcXML
49
      GetImportRecordMarcXML
44
    AddImportBatch
50
      GetRecordFromImportBiblio
45
    GetImportBatch
51
      AddImportBatch
46
    AddAuthToBatch
52
      GetImportBatch
47
    AddBiblioToBatch
53
      AddAuthToBatch
48
    AddItemsToImportBiblio
54
      AddBiblioToBatch
49
    ModAuthorityInBatch
55
      AddItemsToImportBiblio
50
    ModBiblioInBatch
56
      ModAuthorityInBatch
51
57
      ModBiblioInBatch
52
    BatchStageMarcRecords
58
53
    BatchFindDuplicates
59
      BatchStageMarcRecords
54
    BatchCommitRecords
60
      BatchFindDuplicates
55
    BatchRevertRecords
61
      BatchCommitRecords
56
    CleanBatch
62
      BatchRevertRecords
57
    DeleteBatch
63
      CleanBatch
58
64
      DeleteBatch
59
    GetAllImportBatches
65
60
    GetStagedWebserviceBatches
66
      GetAllImportBatches
61
    GetImportBatchRangeDesc
67
      GetStagedWebserviceBatches
62
    GetNumberOfNonZ3950ImportBatches
68
      GetImportBatchRangeDesc
63
    GetImportBiblios
69
      GetNumberOfNonZ3950ImportBatches
64
    GetImportRecordsRange
70
      GetImportBiblios
65
	GetItemNumbersFromImportBatch
71
      GetImportRecordsRange
66
    
72
      GetItemNumbersFromImportBatch
67
    GetImportBatchStatus
73
68
    SetImportBatchStatus
74
      GetImportBatchStatus
69
    GetImportBatchOverlayAction
75
      SetImportBatchStatus
70
    SetImportBatchOverlayAction
76
      GetImportBatchOverlayAction
71
    GetImportBatchNoMatchAction
77
      SetImportBatchOverlayAction
72
    SetImportBatchNoMatchAction
78
      GetImportBatchNoMatchAction
73
    GetImportBatchItemAction
79
      SetImportBatchNoMatchAction
74
    SetImportBatchItemAction
80
      GetImportBatchItemAction
75
    GetImportBatchMatcher
81
      SetImportBatchItemAction
76
    SetImportBatchMatcher
82
      GetImportBatchMatcher
77
    GetImportRecordOverlayStatus
83
      SetImportBatchMatcher
78
    SetImportRecordOverlayStatus
84
      GetImportRecordOverlayStatus
79
    GetImportRecordStatus
85
      SetImportRecordOverlayStatus
80
    SetImportRecordStatus
86
      GetImportRecordStatus
81
    SetMatchedBiblionumber
87
      SetImportRecordStatus
82
    GetImportRecordMatches
88
      SetMatchedBiblionumber
83
    SetImportRecordMatches
89
      GetImportRecordMatches
84
	);
90
      SetImportRecordMatches
91
92
      RecordsFromMARCXMLFile
93
      RecordsFromISO2709File
94
      RecordsFromMarcPlugin
95
    );
85
}
96
}
86
97
87
=head1 NAME
98
=head1 NAME
(-)a/C4/ImportExportFramework.pm (-9 / +8 lines)
Lines 21-43 use strict; Link Here
21
use warnings;
21
use warnings;
22
use XML::LibXML;
22
use XML::LibXML;
23
use XML::LibXML::XPathContext;
23
use XML::LibXML::XPathContext;
24
use Digest::MD5 qw();
24
use Digest::MD5;
25
use POSIX qw(strftime);
25
use POSIX qw( strftime );
26
use Text::CSV_XS;
26
use Text::CSV_XS;
27
use List::MoreUtils qw(indexes);
27
use List::MoreUtils qw( indexes );
28
28
29
use C4::Context;
29
use C4::Context;
30
use Koha::Logger;
30
use Koha::Logger;
31
31
32
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
32
our (@ISA, @EXPORT_OK);
33
34
BEGIN {
33
BEGIN {
35
    require Exporter;
34
    require Exporter;
36
    @ISA    = qw(Exporter);
35
    @ISA    = qw(Exporter);
37
    @EXPORT = qw(
36
    @EXPORT_OK = qw(
38
        &ExportFramework
37
        ExportFramework
39
        &ImportFramework
38
        ImportFramework
40
        &createODS
39
        createODS
41
    );
40
    );
42
}
41
}
43
42
(-)a/C4/InstallAuth.pm (-10 / +9 lines)
Lines 18-41 package C4::InstallAuth; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Digest::MD5 qw(md5_base64);
22
use CGI::Session;
21
use CGI::Session;
23
use File::Spec;
22
use File::Spec;
24
23
25
require Exporter;
24
require Exporter;
26
25
27
use C4::Context;
26
use C4::Context;
28
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Templates;
28
use C4::Templates;
30
use C4::Koha;
31
29
32
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
30
our (@ISA, @EXPORT_OK);
33
31
BEGIN {
34
@ISA    = qw(Exporter);
32
    @ISA    = qw(Exporter);
35
@EXPORT = qw(
33
    @EXPORT_OK = qw(
36
  &checkauth
34
      checkauth
37
  &get_template_and_user
35
      get_template_and_user
38
);
36
    );
37
}
39
38
40
=head1 NAME
39
=head1 NAME
41
40
(-)a/C4/Installer.pm (-2 / +2 lines)
Lines 19-25 package C4::Installer; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Encode qw( encode is_utf8 );
22
use Encode;
23
use DBIx::RunSQL;
23
use DBIx::RunSQL;
24
use YAML::XS;
24
use YAML::XS;
25
use C4::Context;
25
use C4::Context;
Lines 30-36 use vars qw(@ISA @EXPORT); Link Here
30
BEGIN {
30
BEGIN {
31
    require Exporter;
31
    require Exporter;
32
    @ISA = qw( Exporter );
32
    @ISA = qw( Exporter );
33
    push @EXPORT, qw( primary_key_exists foreign_key_exists index_exists column_exists TableExists);
33
    push @EXPORT, qw( primary_key_exists foreign_key_exists index_exists column_exists TableExists marc_framework_sql_list);
34
};
34
};
35
35
36
=head1 NAME
36
=head1 NAME
(-)a/C4/Installer/PerlModules.pm (-2 / +1 lines)
Lines 3-10 package C4::Installer::PerlModules; Link Here
3
use warnings;
3
use warnings;
4
use strict;
4
use strict;
5
5
6
use File::Spec;
6
use File::Basename qw( dirname );
7
use File::Basename;
8
use Module::CPANfile;
7
use Module::CPANfile;
9
8
10
sub new {
9
sub new {
(-)a/C4/Installer/UpgradeBackup.pm (-3 / +3 lines)
Lines 18-27 package C4::Installer::UpgradeBackup; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use File::Compare qw(compare);
21
use File::Compare qw( compare );
22
use Cwd qw(cwd);
22
use Cwd qw( cwd );
23
use File::Copy;
23
use File::Copy;
24
use File::Find;
24
use File::Find qw( find );
25
use File::Spec;
25
use File::Spec;
26
use Exporter;
26
use Exporter;
27
27
(-)a/C4/ItemCirculationAlertPreference.pm (-1 / +1 lines)
Lines 20-26 package C4::ItemCirculationAlertPreference; Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use C4::Context;
22
use C4::Context;
23
use Carp qw(carp croak);
23
use Carp qw( carp croak );
24
24
25
use Koha::ItemTypes;
25
use Koha::ItemTypes;
26
use Koha::Patron::Categories;
26
use Koha::Patron::Categories;
(-)a/C4/Items.pm (-11 / +11 lines)
Lines 20-31 package C4::Items; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use vars qw(@ISA @EXPORT);
23
our (@ISA, @EXPORT_OK);
24
BEGIN {
24
BEGIN {
25
    require Exporter;
25
    require Exporter;
26
    @ISA = qw(Exporter);
26
    @ISA = qw(Exporter);
27
27
28
    @EXPORT = qw(
28
    @EXPORT_OK = qw(
29
        AddItemFromMarc
29
        AddItemFromMarc
30
        AddItemBatchFromMarc
30
        AddItemBatchFromMarc
31
        ModItemFromMarc
31
        ModItemFromMarc
Lines 39-68 BEGIN { Link Here
39
        GetHostItemsInfo
39
        GetHostItemsInfo
40
        get_hostitemnumbers_of
40
        get_hostitemnumbers_of
41
        GetHiddenItemnumbers
41
        GetHiddenItemnumbers
42
        GetMarcItem
42
        MoveItemFromBiblio
43
        MoveItemFromBiblio
43
        CartToShelf
44
        CartToShelf
44
        GetAnalyticsCount
45
        GetAnalyticsCount
45
        SearchItems
46
        SearchItems
46
        PrepareItemrecordDisplay
47
        PrepareItemrecordDisplay
48
        ToggleNewStatus
47
    );
49
    );
48
}
50
}
49
51
50
use Carp;
52
use Carp qw( croak );
51
use Try::Tiny;
52
use C4::Context;
53
use C4::Context;
53
use C4::Koha;
54
use C4::Koha;
54
use C4::Biblio;
55
use C4::Biblio qw( GetMarcStructure TransformMarcToKoha );
55
use Koha::DateUtils;
56
use Koha::DateUtils qw( dt_from_string output_pref );
56
use MARC::Record;
57
use MARC::Record;
57
use C4::ClassSource;
58
use C4::ClassSource qw( GetClassSort GetClassSources GetClassSource );
58
use C4::Log;
59
use C4::Log qw( logaction );
59
use List::MoreUtils qw(any);
60
use List::MoreUtils qw( any );
60
use DateTime::Format::MySQL;
61
use DateTime::Format::MySQL;
61
use Data::Dumper; # used as part of logging item record changes, not just for
62
                  # debugging; so please don't remove this
62
                  # debugging; so please don't remove this
63
63
64
use Koha::AuthorisedValues;
64
use Koha::AuthorisedValues;
65
use Koha::DateUtils qw(dt_from_string);
65
use Koha::DateUtils qw( dt_from_string output_pref );
66
use Koha::Database;
66
use Koha::Database;
67
67
68
use Koha::Biblioitems;
68
use Koha::Biblioitems;
(-)a/C4/Koha.pm (-26 / +27 lines)
Lines 30-63 use Koha::MarcSubfieldStructures; Link Here
30
use Business::ISBN;
30
use Business::ISBN;
31
use Business::ISSN;
31
use Business::ISSN;
32
use autouse 'Data::cselectall_arrayref' => qw(Dumper);
32
use autouse 'Data::cselectall_arrayref' => qw(Dumper);
33
use vars qw(@ISA @EXPORT @EXPORT_OK);
34
33
34
our (@ISA, @EXPORT_OK);
35
BEGIN {
35
BEGIN {
36
	require Exporter;
36
    require Exporter;
37
	@ISA    = qw(Exporter);
37
    @ISA       = qw(Exporter);
38
	@EXPORT = qw(
38
    @EXPORT_OK = qw(
39
        &GetItemTypesCategorized
39
      GetItemTypesCategorized
40
        &getallthemes
40
      getallthemes
41
        &getFacets
41
      getFacets
42
        &getnbpages
42
      getImageSets
43
		&getitemtypeimagedir
43
      getnbpages
44
		&getitemtypeimagesrc
44
      getitemtypeimagedir
45
		&getitemtypeimagelocation
45
      getitemtypeimagesrc
46
		&GetAuthorisedValues
46
      getitemtypeimagelocation
47
		&GetNormalizedUPC
47
      GetAuthorisedValues
48
		&GetNormalizedISBN
48
      GetNormalizedUPC
49
		&GetNormalizedEAN
49
      GetNormalizedISBN
50
		&GetNormalizedOCLCNumber
50
      GetNormalizedEAN
51
        &xml_escape
51
      GetNormalizedOCLCNumber
52
52
      xml_escape
53
        &GetVariationsOfISBN
53
54
        &GetVariationsOfISBNs
54
      GetVariationsOfISBN
55
        &NormalizeISBN
55
      GetVariationsOfISBNs
56
        &GetVariationsOfISSN
56
      NormalizeISBN
57
        &GetVariationsOfISSNs
57
      GetVariationsOfISSN
58
        &NormalizeISSN
58
      GetVariationsOfISSNs
59
59
      NormalizeISSN
60
	);
60
61
    );
61
}
62
}
62
63
63
=head1 NAME
64
=head1 NAME
(-)a/C4/Labels/Label.pm (-4 / +3 lines)
Lines 3-16 package C4::Labels::Label; Link Here
3
use strict;
3
use strict;
4
use warnings;
4
use warnings;
5
5
6
use Text::Wrap;
6
use Text::Wrap qw( wrap );
7
use Algorithm::CheckDigits;
7
use Algorithm::CheckDigits qw( CheckDigits );
8
use Text::CSV_XS;
8
use Text::CSV_XS;
9
use Data::Dumper;
10
use Text::Bidi qw( log2vis );
9
use Text::Bidi qw( log2vis );
11
10
12
use C4::Context;
11
use C4::Context;
13
use C4::Biblio;
12
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField );
14
use Koha::ClassSources;
13
use Koha::ClassSources;
15
use Koha::ClassSortRules;
14
use Koha::ClassSortRules;
16
use Koha::ClassSplitRules;
15
use Koha::ClassSplitRules;
(-)a/C4/Languages.pm (-8 / +8 lines)
Lines 22-45 package C4::Languages; Link Here
22
use strict;
22
use strict;
23
use warnings;
23
use warnings;
24
24
25
use Carp;
25
use Carp qw( carp );
26
use CGI;
26
use CGI;
27
use List::MoreUtils qw( any );
27
use List::MoreUtils qw( any );
28
use C4::Context;
28
use C4::Context;
29
use Koha::Caches;
29
use Koha::Caches;
30
use Koha::Cache::Memory::Lite;
30
use Koha::Cache::Memory::Lite;
31
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
32
31
32
our (@ISA, @EXPORT_OK);
33
BEGIN {
33
BEGIN {
34
    require Exporter;
34
    require Exporter;
35
    @ISA    = qw(Exporter);
35
    @ISA    = qw(Exporter);
36
    @EXPORT = qw(
36
    @EXPORT_OK = qw(
37
        &getFrameworkLanguages
37
        getFrameworkLanguages
38
        &getTranslatedLanguages
38
        getTranslatedLanguages
39
        &getLanguages
39
        getLanguages
40
        &getAllLanguages
40
        getAllLanguages
41
    );
41
    );
42
    @EXPORT_OK = qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage);
42
    push @EXPORT_OK, qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage get_rfc4646_from_iso639);
43
}
43
}
44
44
45
=head1 NAME
45
=head1 NAME
(-)a/C4/Letters.pm (-12 / +23 lines)
Lines 20-55 package C4::Letters; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use MIME::Lite;
22
use MIME::Lite;
23
use Date::Calc qw( Add_Delta_Days );
23
use Carp qw( carp croak );
24
use Encode;
25
use Carp;
26
use Template;
24
use Template;
27
use Module::Load::Conditional qw(can_load);
25
use Module::Load::Conditional qw( can_load );
28
26
29
use Try::Tiny;
27
use Try::Tiny qw( catch try );
30
28
31
use C4::Members;
29
use C4::Members;
32
use C4::Log;
30
use C4::Log qw( logaction );
33
use C4::SMS;
31
use C4::SMS;
34
use C4::Templates;
32
use C4::Templates;
35
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string output_pref );
36
use Koha::SMS::Providers;
34
use Koha::SMS::Providers;
37
35
38
use Koha::Email;
36
use Koha::Email;
39
use Koha::Notice::Messages;
37
use Koha::Notice::Messages;
40
use Koha::Notice::Templates;
38
use Koha::Notice::Templates;
41
use Koha::DateUtils qw( format_sqldatetime dt_from_string );
39
use Koha::DateUtils qw( dt_from_string output_pref );
42
use Koha::Patrons;
40
use Koha::Patrons;
43
use Koha::SMTP::Servers;
41
use Koha::SMTP::Servers;
44
use Koha::Subscriptions;
42
use Koha::Subscriptions;
45
43
46
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
44
our (@ISA, @EXPORT_OK);
47
48
BEGIN {
45
BEGIN {
49
    require Exporter;
46
    require Exporter;
50
    @ISA = qw(Exporter);
47
    @ISA = qw(Exporter);
51
    @EXPORT = qw(
48
    @EXPORT_OK = qw(
52
        &EnqueueLetter &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &SendAlerts &GetPrintMessages &GetMessageTransportTypes
49
      GetLetters
50
      GetLettersAvailableForALibrary
51
      GetLetterTemplates
52
      DelLetter
53
      GetPreparedLetter
54
      GetWrappedLetter
55
      SendAlerts
56
      GetPrintMessages
57
      GetQueuedMessages
58
      GetMessage
59
      GetMessageTransportTypes
60
61
      EnqueueLetter
62
      SendQueuedMessages
63
      ResendMessage
53
    );
64
    );
54
}
65
}
55
66
(-)a/C4/Linker.pm (-1 lines)
Lines 47-53 to the preferred form. Link Here
47
47
48
use strict;
48
use strict;
49
use warnings;
49
use warnings;
50
use Carp;
51
use C4::Context;
50
use C4::Context;
52
51
53
use base qw(Class::Accessor);
52
use base qw(Class::Accessor);
(-)a/C4/Linker/Default.pm (-1 lines)
Lines 19-25 package C4::Linker::Default; Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use Carp;
23
use MARC::Field;
22
use MARC::Field;
24
use C4::Heading;
23
use C4::Heading;
25
24
(-)a/C4/Linker/FirstMatch.pm (-1 lines)
Lines 19-25 package C4::Linker::FirstMatch; Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use Carp;
23
use C4::Heading;
22
use C4::Heading;
24
use C4::Linker::Default;    # Use Default for flipping
23
use C4::Linker::Default;    # Use Default for flipping
25
24
(-)a/C4/Linker/LastMatch.pm (-1 lines)
Lines 19-25 package C4::Linker::LastMatch; Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use Carp;
23
use C4::Heading;
22
use C4::Heading;
24
use C4::Linker::Default;    # Use Default for flipping
23
use C4::Linker::Default;    # Use Default for flipping
25
24
(-)a/C4/Log.pm (-2 / +1 lines)
Lines 27-33 use warnings; Link Here
27
use JSON qw( to_json );
27
use JSON qw( to_json );
28
28
29
use C4::Context;
29
use C4::Context;
30
use Koha::DateUtils;
31
use Koha::Logger;
30
use Koha::Logger;
32
31
33
use vars qw(@ISA @EXPORT);
32
use vars qw(@ISA @EXPORT);
Lines 35-41 use vars qw(@ISA @EXPORT); Link Here
35
BEGIN {
34
BEGIN {
36
        require Exporter;
35
        require Exporter;
37
        @ISA = qw(Exporter);
36
        @ISA = qw(Exporter);
38
        @EXPORT = qw(&logaction &cronlogaction);
37
        @EXPORT = qw(logaction cronlogaction);
39
}
38
}
40
39
41
=head1 NAME
40
=head1 NAME
(-)a/C4/MarcModificationTemplates.pm (-14 / +23 lines)
Lines 22-50 use Modern::Perl; Link Here
22
use DateTime;
22
use DateTime;
23
23
24
use C4::Context;
24
use C4::Context;
25
use Koha::SimpleMARC;
25
use Koha::SimpleMARC qw(
26
    add_field
27
    copy_and_replace_field
28
    copy_field
29
    delete_field
30
    field_equals
31
    field_exists
32
    move_field
33
    update_field
34
);
26
use Koha::MoreUtils;
35
use Koha::MoreUtils;
27
use Koha::DateUtils;
36
use Koha::DateUtils qw( dt_from_string );
28
37
29
use vars qw(@ISA @EXPORT);
38
use vars qw(@ISA @EXPORT);
30
39
31
BEGIN {
40
BEGIN {
32
    @ISA = qw(Exporter);
41
    @ISA    = qw(Exporter);
33
    @EXPORT = qw(
42
    @EXPORT = qw(
34
        &GetModificationTemplates
43
      GetModificationTemplates
35
        &AddModificationTemplate
44
      AddModificationTemplate
36
        &DelModificationTemplate
45
      DelModificationTemplate
37
46
38
        &GetModificationTemplateAction
47
      GetModificationTemplateAction
39
        &GetModificationTemplateActions
48
      GetModificationTemplateActions
40
49
41
        &AddModificationTemplateAction
50
      AddModificationTemplateAction
42
        &ModModificationTemplateAction
51
      ModModificationTemplateAction
43
        &DelModificationTemplateAction
52
      DelModificationTemplateAction
44
        &MoveModificationTemplateAction
53
      MoveModificationTemplateAction
45
54
46
        &ModifyRecordsWithTemplate
55
      ModifyRecordsWithTemplate
47
        &ModifyRecordWithTemplate
56
      ModifyRecordWithTemplate
48
    );
57
    );
49
}
58
}
50
59
(-)a/C4/Matcher.pm (-2 / +7 lines)
Lines 19-30 package C4::Matcher; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use MARC::Record;
23
22
24
use Koha::SearchEngine;
23
use Koha::SearchEngine;
25
use Koha::SearchEngine::Search;
24
use Koha::SearchEngine::Search;
26
use Koha::SearchEngine::QueryBuilder;
25
use Koha::SearchEngine::QueryBuilder;
27
use Koha::Util::Normalize qw/legacy_default remove_spaces upper_case lower_case ISBN/;
26
use Koha::Util::Normalize qw(
27
    ISBN
28
    legacy_default
29
    lower_case
30
    remove_spaces
31
    upper_case
32
);
28
33
29
=head1 NAME
34
=head1 NAME
30
35
(-)a/C4/Members.pm (-23 / +17 lines)
Lines 22-68 package C4::Members; Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use C4::Context;
24
use C4::Context;
25
use String::Random qw( random_string );
26
use Scalar::Util qw( looks_like_number );
25
use Scalar::Util qw( looks_like_number );
27
use Date::Calc qw/Today check_date Date_to_Days/;
26
use Date::Calc qw( check_date Date_to_Days );
28
use List::MoreUtils qw( uniq );
27
use C4::Overdues qw( checkoverdues );
29
use JSON qw(to_json);
30
use C4::Log; # logaction
31
use C4::Overdues;
32
use C4::Reserves;
28
use C4::Reserves;
33
use C4::Accounts;
29
use C4::Accounts;
34
use C4::Biblio;
30
use C4::Letters qw( GetPreparedLetter );
35
use C4::Letters;
36
use DateTime;
31
use DateTime;
37
use Koha::Database;
32
use Koha::Database;
38
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string output_pref );
39
use Koha::AuthUtils qw(hash_password);
40
use Koha::Database;
34
use Koha::Database;
41
use Koha::Holds;
35
use Koha::Holds;
42
use Koha::List::Patron;
43
use Koha::News;
36
use Koha::News;
44
use Koha::Patrons;
37
use Koha::Patrons;
45
use Koha::Patron::Categories;
38
use Koha::Patron::Categories;
46
39
47
our (@ISA,@EXPORT,@EXPORT_OK);
40
our (@ISA, @EXPORT_OK);
48
49
BEGIN {
41
BEGIN {
50
    require Exporter;
42
    require Exporter;
51
    @ISA = qw(Exporter);
43
    @ISA = qw(Exporter);
52
    #Get data
44
    @EXPORT_OK = qw(
53
    push @EXPORT, qw(
45
      GetMemberDetails
46
      GetMember
54
47
55
        &GetAllIssues
48
      GetAllIssues
56
49
57
        &GetBorrowersToExpunge
50
      GetBorrowersToExpunge
58
51
59
        &IssueSlip
52
      IssueSlip
60
    );
53
54
      checkuserpassword
55
      get_cardnumber_length
56
      checkcardnumber
61
57
62
    #Check data
58
      DeleteUnverifiedOpacRegistrations
63
    push @EXPORT, qw(
59
      DeleteExpiredOpacRegistrations
64
        &checkuserpassword
65
        &checkcardnumber
66
    );
60
    );
67
}
61
}
68
62
(-)a/C4/Members/Statistics.pm (-5 / +6 lines)
Lines 26-41 use Modern::Perl; Link Here
26
26
27
use C4::Context;
27
use C4::Context;
28
28
29
our ( @ISA, @EXPORT, @EXPORT_OK );
29
our ( @ISA, @EXPORT_OK );
30
30
31
BEGIN {
31
BEGIN {
32
    require Exporter;
32
    require Exporter;
33
    @ISA = qw(Exporter);
33
    @ISA = qw(Exporter);
34
34
35
    push @EXPORT, qw(
35
    @EXPORT_OK = qw(
36
        &GetTotalIssuesTodayByBorrower
36
        get_fields
37
        &GetTotalIssuesReturnedTodayByBorrower
37
        GetTotalIssuesTodayByBorrower
38
        &GetPrecedentStateByBorrower
38
        GetTotalIssuesReturnedTodayByBorrower
39
        GetPrecedentStateByBorrower
39
    );
40
    );
40
}
41
}
41
42
(-)a/C4/Message.pm (-3 / +3 lines)
Lines 22-31 package C4::Message; Link Here
22
use strict;
22
use strict;
23
use warnings;
23
use warnings;
24
use C4::Context;
24
use C4::Context;
25
use C4::Letters;
25
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
26
use YAML::XS;
26
use YAML::XS qw( Dump );
27
use Encode;
27
use Encode;
28
use Carp;
28
use Carp qw( carp );
29
29
30
=head1 NAME
30
=head1 NAME
31
31
(-)a/C4/OAI/Sets.pm (-4 / +4 lines)
Lines 38-47 BEGIN { Link Here
38
    require Exporter;
38
    require Exporter;
39
    @ISA = qw(Exporter);
39
    @ISA = qw(Exporter);
40
    @EXPORT = qw(
40
    @EXPORT = qw(
41
        &GetOAISets &GetOAISet &GetOAISetBySpec &ModOAISet &DelOAISet &AddOAISet
41
        GetOAISets GetOAISet GetOAISetBySpec ModOAISet DelOAISet AddOAISet
42
        &GetOAISetsMappings &GetOAISetMappings &ModOAISetMappings
42
        GetOAISetsMappings GetOAISetMappings ModOAISetMappings
43
        &GetOAISetsBiblio &ModOAISetsBiblios &AddOAISetsBiblios
43
        GetOAISetsBiblio ModOAISetsBiblios AddOAISetsBiblios
44
        &CalcOAISetsBiblio &UpdateOAISetsBiblio &DelOAISetsBiblio
44
        CalcOAISetsBiblio UpdateOAISetsBiblio DelOAISetsBiblio
45
    );
45
    );
46
}
46
}
47
47
(-)a/C4/Output.pm (-15 / +8 lines)
Lines 30-59 use Modern::Perl; Link Here
30
use URI::Escape;
30
use URI::Escape;
31
use Scalar::Util qw( looks_like_number );
31
use Scalar::Util qw( looks_like_number );
32
32
33
use C4::Auth qw(get_template_and_user);
33
use C4::Auth qw( get_template_and_user );
34
use C4::Context;
34
use C4::Context;
35
use C4::Templates;
35
use C4::Templates;
36
36
37
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
37
our (@ISA, @EXPORT_OK);
38
38
39
BEGIN {
39
BEGIN {
40
    require Exporter;
40
    require Exporter;
41
41
42
 @ISA    = qw(Exporter);
42
    @ISA    = qw(Exporter);
43
    @EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead
43
    @EXPORT_OK = qw(
44
    %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url
44
        is_ajax
45
                                &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)],
45
        ajax_fail
46
                    ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)],
47
                    html =>[qw(&output_with_http_headers &output_html_with_http_headers)]
48
                );
49
    push @EXPORT, qw(
50
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
46
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
47
        output_html_with_http_headers output_ajax_with_http_headers output_with_http_headers
48
        output_and_exit_if_error output_and_exit output_error
51
    );
49
    );
52
    push @EXPORT, qw(
53
        &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers
54
        &output_and_exit_if_error &output_and_exit &output_error
55
    );
56
57
}
50
}
58
51
59
=head1 NAME
52
=head1 NAME
(-)a/C4/Output/JSONStream.pm (-1 / +1 lines)
Lines 39-45 This module allows you to build JSON incrementally. Link Here
39
use strict;
39
use strict;
40
use warnings;
40
use warnings;
41
41
42
use JSON;
42
use JSON qw( to_json );
43
43
44
sub new {
44
sub new {
45
    my $class = shift;
45
    my $class = shift;
(-)a/C4/Overdues.pm (-25 / +18 lines)
Lines 20-64 package C4::Overdues; Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use Date::Calc qw/Today Date_to_Days/;
23
use Date::Calc qw( Today );
24
use Date::Manip qw/UnixDate/;
24
use Date::Manip qw( UnixDate );
25
use List::MoreUtils qw( uniq );
25
use List::MoreUtils qw( uniq );
26
use POSIX qw( floor ceil );
26
use POSIX qw( ceil floor );
27
use Locale::Currency::Format 1.28;
27
use Locale::Currency::Format 1.28 qw( currency_format FMT_SYMBOL );
28
use Carp;
28
use Carp qw( carp );
29
29
30
use C4::Circulation;
31
use C4::Context;
30
use C4::Context;
32
use C4::Accounts;
31
use C4::Accounts;
33
use C4::Log; # logaction
34
use Koha::Logger;
32
use Koha::Logger;
35
use Koha::DateUtils;
36
use Koha::Account::Lines;
33
use Koha::Account::Lines;
37
use Koha::Account::Offsets;
34
use Koha::Account::Offsets;
38
use Koha::Libraries;
35
use Koha::Libraries;
39
36
40
use vars qw(@ISA @EXPORT);
37
our (@ISA, @EXPORT_OK);
41
42
BEGIN {
38
BEGIN {
43
    require Exporter;
39
    require Exporter;
44
    @ISA = qw(Exporter);
40
    @ISA = qw(Exporter);
45
41
46
    # subs to rename (and maybe merge some...)
42
    # subs to rename (and maybe merge some...)
47
    push @EXPORT, qw(
43
    @EXPORT_OK = qw(
48
      &CalcFine
44
      CalcFine
49
      &Getoverdues
45
      Getoverdues
50
      &checkoverdues
46
      checkoverdues
51
      &UpdateFine
47
      UpdateFine
52
      &GetFine
48
      GetFine
53
      &get_chargeable_units
49
      GetBranchcodesWithOverdueRules
54
      &GetOverduesForBranch
50
      get_chargeable_units
55
      &GetOverdueMessageTransportTypes
51
      GetOverduesForBranch
56
      &parse_overdues_letter
52
      GetOverdueMessageTransportTypes
57
    );
53
      parse_overdues_letter
58
54
      GetIssuesIteminfo
59
    # subs to move to Circulation.pm
60
    push @EXPORT, qw(
61
      &GetIssuesIteminfo
62
    );
55
    );
63
}
56
}
64
57
(-)a/C4/Patroncards.pm (-1 / +10 lines)
Lines 16-22 BEGIN { Link Here
16
    );
16
    );
17
    use C4::Patroncards::Batch;
17
    use C4::Patroncards::Batch;
18
    use C4::Patroncards::Layout;
18
    use C4::Patroncards::Layout;
19
    use C4::Patroncards::Lib;
19
    use C4::Patroncards::Lib qw(
20
    box
21
    get_borrower_attributes
22
    get_image
23
    leading
24
    put_image
25
    rm_image
26
    text_alignment
27
    unpack_UTF8
28
);
20
    use C4::Patroncards::Patroncard;
29
    use C4::Patroncards::Patroncard;
21
    use C4::Patroncards::Profile;
30
    use C4::Patroncards::Profile;
22
    use C4::Patroncards::Template;
31
    use C4::Patroncards::Template;
(-)a/C4/Patroncards/Patroncard.pm (-3 / +7 lines)
Lines 21-32 use strict; Link Here
21
use warnings;
21
use warnings;
22
22
23
use autouse 'Data::Dumper' => qw(Dumper);
23
use autouse 'Data::Dumper' => qw(Dumper);
24
use Text::Wrap qw(wrap);
25
#use Font::TTFMetrics;
24
#use Font::TTFMetrics;
26
25
27
use C4::Creators::Lib qw(get_font_types get_unit_values);
26
use C4::Creators::Lib qw( get_unit_values );
28
use C4::Creators::PDF qw(StrWidth);
27
use C4::Creators::PDF qw(StrWidth);
29
use C4::Patroncards::Lib qw(unpack_UTF8 text_alignment leading box get_borrower_attributes);
28
use C4::Patroncards::Lib qw(
29
    box
30
    get_borrower_attributes
31
    leading
32
    text_alignment
33
);
30
34
31
=head1 NAME
35
=head1 NAME
32
36
(-)a/C4/Record.pm (-15 / +16 lines)
Lines 25-44 use Modern::Perl; Link Here
25
use MARC::Record; # marc2marcxml, marcxml2marc, changeEncoding
25
use MARC::Record; # marc2marcxml, marcxml2marc, changeEncoding
26
use MARC::File::XML; # marc2marcxml, marcxml2marc, changeEncoding
26
use MARC::File::XML; # marc2marcxml, marcxml2marc, changeEncoding
27
use Biblio::EndnoteStyle;
27
use Biblio::EndnoteStyle;
28
use Unicode::Normalize; # _entity_encode
28
use Unicode::Normalize qw( NFC ); # _entity_encode
29
use C4::Biblio; #marc2bibtex
29
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio );
30
use C4::Koha; #marc2csv
30
use C4::Koha; #marc2csv
31
use C4::XSLT ();
31
use C4::XSLT;
32
use YAML::XS; #marcrecords2csv
32
use YAML::XS; #marcrecords2csv
33
use Encode;
33
use Encode;
34
use Template;
34
use Template;
35
use Text::CSV::Encoded; #marc2csv
35
use Text::CSV::Encoded; #marc2csv
36
use Koha::Items;
36
use Koha::Items;
37
use Koha::SimpleMARC qw(read_field);
37
use Koha::SimpleMARC qw( read_field );
38
use Koha::XSLT::Base;
38
use Koha::XSLT::Base;
39
use Koha::CsvProfiles;
39
use Koha::CsvProfiles;
40
use Koha::AuthorisedValues;
40
use Koha::AuthorisedValues;
41
use Carp;
41
use Carp qw( carp croak );
42
42
43
use vars qw(@ISA @EXPORT);
43
use vars qw(@ISA @EXPORT);
44
44
Lines 48-63 use vars qw(@ISA @EXPORT); Link Here
48
# only export API methods
48
# only export API methods
49
49
50
@EXPORT = qw(
50
@EXPORT = qw(
51
  &marc2endnote
51
  marc2endnote
52
  &marc2marc
52
  marc2marc
53
  &marc2marcxml
53
  marc2marcxml
54
  &marcxml2marc
54
  marcxml2marc
55
  &marc2dcxml
55
  marc2dcxml
56
  &marc2modsxml
56
  marc2modsxml
57
  &marc2madsxml
57
  marc2madsxml
58
  &marc2bibtex
58
  marc2bibtex
59
  &marc2csv
59
  marc2csv
60
  &changeEncoding
60
  marcrecord2csv
61
  changeEncoding
61
);
62
);
62
63
63
=head1 NAME
64
=head1 NAME
(-)a/C4/Reports.pm (-2 / +2 lines)
Lines 20-32 package C4::Reports; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
24
use C4::Context;
23
use C4::Context;
25
24
25
our (@ISA, @EXPORT_OK);
26
BEGIN {
26
BEGIN {
27
    require Exporter;
27
    require Exporter;
28
    @ISA = qw(Exporter);
28
    @ISA = qw(Exporter);
29
    @EXPORT = qw(
29
    @EXPORT_OK = qw(
30
        GetDelimiterChoices
30
        GetDelimiterChoices
31
    );
31
    );
32
}
32
}
(-)a/C4/Reports/Guided.pm (-8 / +10 lines)
Lines 19-58 package C4::Reports::Guided; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Carp;
22
use Carp qw( carp croak );
23
use JSON qw( from_json );
23
use JSON qw( from_json );
24
24
25
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
26
use C4::Context;
25
use C4::Context;
27
use C4::Templates qw/themelanguage/;
26
use C4::Templates qw/themelanguage/;
28
use C4::Koha;
27
use C4::Koha qw( GetAuthorisedValues );
29
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::Patrons;
29
use Koha::Patrons;
31
use Koha::Reports;
30
use Koha::Reports;
32
use C4::Output;
31
use C4::Output;
33
use C4::Log;
32
use C4::Log qw( logaction );
34
use Koha::Notice::Templates;
33
use Koha::Notice::Templates;
35
use C4::Letters;
36
34
37
use Koha::Logger;
35
use Koha::Logger;
38
use Koha::AuthorisedValues;
36
use Koha::AuthorisedValues;
39
use Koha::Patron::Categories;
37
use Koha::Patron::Categories;
40
use Koha::SharedContent;
38
use Koha::SharedContent;
41
39
40
our (@ISA, @EXPORT_OK);
42
BEGIN {
41
BEGIN {
43
    require Exporter;
42
    require Exporter;
44
    @ISA    = qw(Exporter);
43
    @ISA    = qw(Exporter);
45
    @EXPORT = qw(
44
    @EXPORT_OK = qw(
46
      get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
45
      get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
47
      save_report get_saved_reports execute_query
46
      save_report get_saved_reports execute_query
48
      get_column_type get_distinct_values save_dictionary get_from_dictionary
47
      get_column_type get_distinct_values save_dictionary get_from_dictionary
49
      delete_definition delete_report format_results get_sql
48
      delete_definition delete_report store_results format_results get_sql get_results
50
      nb_rows update_sql
49
      nb_rows update_sql
50
      strip_limit
51
      convert_sql
51
      GetReservedAuthorisedValues
52
      GetReservedAuthorisedValues
52
      GetParametersFromSQL
53
      GetParametersFromSQL
53
      IsAuthorisedValueValid
54
      IsAuthorisedValueValid
54
      ValidateSQLParameters
55
      ValidateSQLParameters
55
      nb_rows update_sql
56
      nb_rows update_sql
57
      EmailReport
56
    );
58
    );
57
}
59
}
58
60
(-)a/C4/Reserves.pm (-38 / +42 lines)
Lines 24-35 package C4::Reserves; Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use C4::Accounts;
26
use C4::Accounts;
27
use C4::Biblio;
27
use C4::Circulation qw( CheckIfIssuedToPatron GetAgeRestriction GetBranchItemRule );
28
use C4::Circulation;
29
use C4::Context;
28
use C4::Context;
30
use C4::Items;
29
use C4::Items qw( CartToShelf get_hostitemnumbers_of );
31
use C4::Letters;
30
use C4::Letters;
32
use C4::Log;
31
use C4::Log qw( logaction );
33
use C4::Members::Messaging;
32
use C4::Members::Messaging;
34
use C4::Members;
33
use C4::Members;
35
use Koha::Account::Lines;
34
use Koha::Account::Lines;
Lines 37-43 use Koha::Biblios; Link Here
37
use Koha::Calendar;
36
use Koha::Calendar;
38
use Koha::CirculationRules;
37
use Koha::CirculationRules;
39
use Koha::Database;
38
use Koha::Database;
40
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::Hold;
40
use Koha::Hold;
42
use Koha::Holds;
41
use Koha::Holds;
43
use Koha::ItemTypes;
42
use Koha::ItemTypes;
Lines 47-57 use Koha::Old::Hold; Link Here
47
use Koha::Patrons;
46
use Koha::Patrons;
48
use Koha::Plugins;
47
use Koha::Plugins;
49
48
50
use Carp;
49
use Data::Dumper qw( Dumper );
51
use Data::Dumper;
50
use List::MoreUtils qw( any );
52
use List::MoreUtils qw( firstidx any );
53
54
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
55
51
56
=head1 NAME
52
=head1 NAME
57
53
Lines 99-147 This modules provides somes functions to deal with reservations. Link Here
99
95
100
=cut
96
=cut
101
97
98
our (@ISA, @EXPORT_OK);
102
BEGIN {
99
BEGIN {
103
    require Exporter;
100
    require Exporter;
104
    @ISA = qw(Exporter);
101
    @ISA = qw(Exporter);
105
    @EXPORT = qw(
102
    @EXPORT_OK = qw(
106
        &AddReserve
103
      AddReserve
104
105
      GetReserveStatus
106
107
      GetOtherReserves
108
      ChargeReserveFee
109
      GetReserveFee
110
111
      ModReserveFill
112
      ModReserveAffect
113
      ModReserve
114
      ModReserveStatus
115
      ModReserveCancelAll
116
      ModReserveMinusPriority
117
      MoveReserve
107
118
108
        &GetReserveStatus
119
      CheckReserves
120
      CanBookBeReserved
121
      CanItemBeReserved
122
      CanReserveBeCanceledFromOpac
123
      CancelExpiredReserves
109
124
110
        &GetOtherReserves
125
      AutoUnsuspendReserves
111
126
112
        &ModReserveFill
127
      IsAvailableForItemLevelRequest
113
        &ModReserveAffect
128
      ItemsAnyAvailableAndNotRestricted
114
        &ModReserve
115
        &ModReserveStatus
116
        &ModReserveCancelAll
117
        &ModReserveMinusPriority
118
        &MoveReserve
119
129
120
        &CheckReserves
130
      AlterPriority
121
        &CanBookBeReserved
131
      ToggleLowestPriority
122
        &CanItemBeReserved
123
        &CanReserveBeCanceledFromOpac
124
        &CancelExpiredReserves
125
132
126
        &AutoUnsuspendReserves
133
      ReserveSlip
134
      ToggleSuspend
135
      SuspendAll
127
136
128
        &IsAvailableForItemLevelRequest
137
      GetReservesControlBranch
129
        ItemsAnyAvailableAndNotRestricted
130
138
131
        &AlterPriority
139
      CalculatePriority
132
        &ToggleLowestPriority
133
140
134
        &ReserveSlip
141
      IsItemOnHoldAndFound
135
        &ToggleSuspend
136
        &SuspendAll
137
142
138
        &GetReservesControlBranch
143
      GetMaxPatronHoldsForRecord
139
144
140
        IsItemOnHoldAndFound
145
      MergeHolds
141
146
142
        GetMaxPatronHoldsForRecord
147
      RevertWaitingStatus
143
    );
148
    );
144
    @EXPORT_OK = qw( MergeHolds );
145
}
149
}
146
150
147
=head2 AddReserve
151
=head2 AddReserve
(-)a/C4/Ris.pm (-3 / +3 lines)
Lines 62-73 package C4::Ris; Link Here
62
62
63
use Modern::Perl;
63
use Modern::Perl;
64
64
65
use List::MoreUtils qw/uniq/;
65
use List::MoreUtils qw( uniq );
66
use YAML::XS;
66
use YAML::XS;
67
use Encode;
67
use Encode;
68
use vars qw(@ISA @EXPORT);
68
use vars qw(@ISA @EXPORT);
69
69
70
use Koha::SimpleMARC qw(read_field);
70
use Koha::SimpleMARC qw( read_field );
71
71
72
72
73
@ISA = qw(Exporter);
73
@ISA = qw(Exporter);
Lines 75-81 use Koha::SimpleMARC qw(read_field); Link Here
75
# only export API methods
75
# only export API methods
76
76
77
@EXPORT = qw(
77
@EXPORT = qw(
78
  &marc2ris
78
  marc2ris
79
);
79
);
80
80
81
our $marcprint = 0; # Debug flag;
81
our $marcprint = 0; # Debug flag;
(-)a/C4/RotatingCollections.pm (-3 / +3 lines)
Lines 25-36 package C4::RotatingCollections; Link Here
25
use Modern::Perl;
25
use Modern::Perl;
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Circulation;
29
use C4::Reserves qw(CheckReserves);
28
use C4::Reserves qw(CheckReserves);
30
use Koha::Database;
29
use Koha::Database;
31
30
32
use DBI;
31
use Try::Tiny qw( catch try );
33
use Try::Tiny;
34
32
35
use vars qw(@ISA @EXPORT);
33
use vars qw(@ISA @EXPORT);
36
34
Lines 61-66 BEGIN { Link Here
61
      TransferCollection
59
      TransferCollection
62
60
63
      GetCollectionItemBranches
61
      GetCollectionItemBranches
62
      isItemInAnyCollection
63
      isItemInThisCollection
64
    );
64
    );
65
}
65
}
66
66
(-)a/C4/SIP/ILS.pm (-1 / +1 lines)
Lines 6-12 package C4::SIP::ILS; Link Here
6
6
7
use warnings;
7
use warnings;
8
use strict;
8
use strict;
9
use C4::SIP::Sip qw(siplog);
9
use C4::SIP::Sip qw( siplog );
10
use Data::Dumper;
10
use Data::Dumper;
11
11
12
use C4::SIP::ILS::Item;
12
use C4::SIP::ILS::Item;
(-)a/C4/SIP/ILS/Item.pm (-2 / +2 lines)
Lines 17-27 use C4::SIP::ILS::Transaction; Link Here
17
use C4::SIP::Sip qw(add_field);
17
use C4::SIP::Sip qw(add_field);
18
18
19
use C4::Biblio;
19
use C4::Biblio;
20
use C4::Circulation;
20
use C4::Circulation qw( barcodedecode );
21
use C4::Context;
21
use C4::Context;
22
use C4::Items;
22
use C4::Items;
23
use C4::Members;
23
use C4::Members;
24
use C4::Reserves;
24
use C4::Reserves qw( ModReserveFill );
25
use Koha::Biblios;
25
use Koha::Biblios;
26
use Koha::Checkouts::ReturnClaims;
26
use Koha::Checkouts::ReturnClaims;
27
use Koha::Checkouts;
27
use Koha::Checkouts;
(-)a/C4/SIP/ILS/Transaction/Checkin.pm (-2 / +2 lines)
Lines 11-19 use strict; Link Here
11
11
12
use C4::SIP::ILS::Transaction;
12
use C4::SIP::ILS::Transaction;
13
13
14
use C4::Circulation;
14
use C4::Circulation qw( AddReturn LostItem );
15
use C4::Items qw( ModItemTransfer );
15
use C4::Items qw( ModItemTransfer );
16
use C4::Reserves qw( ModReserveAffect );
16
use C4::Reserves qw( ModReserve ModReserveAffect );
17
use Koha::DateUtils qw( dt_from_string );
17
use Koha::DateUtils qw( dt_from_string );
18
use Koha::Items;
18
use Koha::Items;
19
19
(-)a/C4/SIP/ILS/Transaction/Checkout.pm (-2 / +2 lines)
Lines 8-21 use warnings; Link Here
8
use strict;
8
use strict;
9
9
10
use POSIX qw(strftime);
10
use POSIX qw(strftime);
11
use C4::SIP::Sip qw(siplog);
11
use C4::SIP::Sip qw( siplog );
12
use Data::Dumper;
12
use Data::Dumper;
13
use CGI qw ( -utf8 );
13
use CGI qw ( -utf8 );
14
14
15
use C4::SIP::ILS::Transaction;
15
use C4::SIP::ILS::Transaction;
16
16
17
use C4::Context;
17
use C4::Context;
18
use C4::Circulation;
18
use C4::Circulation qw( AddIssue GetIssuingCharges CanBookBeIssued );
19
use C4::Members;
19
use C4::Members;
20
use C4::Reserves qw(ModReserveFill);
20
use C4::Reserves qw(ModReserveFill);
21
use Koha::DateUtils;
21
use Koha::DateUtils;
(-)a/C4/SIP/ILS/Transaction/Hold.pm (-3 / +3 lines)
Lines 7-19 use Modern::Perl; Link Here
7
7
8
use C4::SIP::ILS::Transaction;
8
use C4::SIP::ILS::Transaction;
9
9
10
use C4::Reserves;	# AddReserve
10
use C4::Reserves qw( CalculatePriority AddReserve ModReserve );
11
use Koha::Holds;
11
use Koha::Holds;
12
use Koha::Patrons;
12
use Koha::Patrons;
13
use parent qw(C4::SIP::ILS::Transaction);
14
15
use Koha::Items;
13
use Koha::Items;
16
14
15
use parent qw(C4::SIP::ILS::Transaction);
16
17
my %fields = (
17
my %fields = (
18
	expiration_date => 0,
18
	expiration_date => 0,
19
	pickup_location => undef,
19
	pickup_location => undef,
(-)a/C4/SIP/ILS/Transaction/Renew.pm (-1 / +1 lines)
Lines 7-13 package C4::SIP::ILS::Transaction::Renew; Link Here
7
use warnings;
7
use warnings;
8
use strict;
8
use strict;
9
9
10
use C4::Circulation;
10
use C4::Circulation qw( CanBookBeRenewed GetIssuingCharges AddIssue );
11
use Koha::Patrons;
11
use Koha::Patrons;
12
use Koha::DateUtils;
12
use Koha::DateUtils;
13
13
(-)a/C4/SIP/ILS/Transaction/RenewAll.pm (-1 / +1 lines)
Lines 6-12 package C4::SIP::ILS::Transaction::RenewAll; Link Here
6
use strict;
6
use strict;
7
use warnings;
7
use warnings;
8
8
9
use C4::SIP::Sip qw(siplog);
9
use C4::SIP::Sip qw( siplog );
10
10
11
use C4::SIP::ILS::Item;
11
use C4::SIP::ILS::Item;
12
12
(-)a/C4/SIP/SIPServer.pm (-1 / +1 lines)
Lines 21-28 use C4::SIP::Sip::MsgType qw( handle login_core ); Link Here
21
use C4::SIP::Logger qw(set_logger);
21
use C4::SIP::Logger qw(set_logger);
22
22
23
use Koha::Caches;
23
use Koha::Caches;
24
25
use Koha::Logger;
24
use Koha::Logger;
25
26
use C4::SIP::Trapper;
26
use C4::SIP::Trapper;
27
tie *STDERR, "C4::SIP::Trapper";
27
tie *STDERR, "C4::SIP::Trapper";
28
28
(-)a/C4/SIP/Sip.pm (-1 / +1 lines)
Lines 15-21 use List::Util qw(first); Link Here
15
15
16
use C4::SIP::Sip::Constants qw(SIP_DATETIME FID_SCREEN_MSG);
16
use C4::SIP::Sip::Constants qw(SIP_DATETIME FID_SCREEN_MSG);
17
use C4::SIP::Sip::Checksum qw(checksum);
17
use C4::SIP::Sip::Checksum qw(checksum);
18
use C4::SIP::Logger qw(get_logger);
18
use C4::SIP::Logger qw( get_logger );
19
19
20
use base qw(Exporter);
20
use base qw(Exporter);
21
21
(-)a/C4/Scheduler.pm (-5 / +4 lines)
Lines 19-33 package C4::Scheduler; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
23
use C4::Context;
22
use C4::Context;
24
use Schedule::At;
23
use Schedule::At;
25
24
25
our (@ISA, @EXPORT_OK);
26
BEGIN {
26
BEGIN {
27
	require Exporter;
27
    require Exporter;
28
	@ISA = qw(Exporter);
28
    @ISA       = qw(Exporter);
29
	@EXPORT =
29
    @EXPORT_OK = qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
30
		qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
31
}
30
}
32
31
33
=head1 NAME
32
=head1 NAME
(-)a/C4/Scrubber.pm (-1 / +1 lines)
Lines 21-27 package C4::Scrubber; Link Here
21
21
22
use strict;
22
use strict;
23
use warnings;
23
use warnings;
24
use Carp;
24
use Carp qw( croak );
25
use HTML::Scrubber;
25
use HTML::Scrubber;
26
26
27
use C4::Context;
27
use C4::Context;
(-)a/C4/Search.pm (-19 / +24 lines)
Lines 16-43 package C4::Search; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
require Exporter;
20
use C4::Context;
19
use C4::Context;
21
use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
20
use C4::Biblio qw( TransformMarcToKoha GetMarcFromKohaField GetFrameworkCode GetAuthorisedValueDesc GetBiblioData );
22
use C4::Koha;      # getFacets
21
use C4::Koha qw( getFacets GetVariationsOfISBN GetNormalizedUPC GetNormalizedEAN GetNormalizedOCLCNumber GetNormalizedISBN getitemtypeimagelocation );
23
use Koha::DateUtils;
22
use Koha::DateUtils;
24
use Koha::Libraries;
23
use Koha::Libraries;
25
use Lingua::Stem;
24
use Lingua::Stem;
26
use XML::Simple;
25
use XML::Simple;
27
use C4::XSLT;
26
use C4::XSLT qw( XSLTParse4Display );
28
use C4::Reserves;    # GetReserveStatus
27
use C4::Reserves qw( GetReserveStatus );
29
use C4::Charset;
28
use C4::Charset qw( SetUTF8Flag );
30
use Koha::Logger;
31
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
32
use Koha::ItemTypes;
30
use Koha::ItemTypes;
33
use Koha::Libraries;
31
use Koha::Libraries;
32
use Koha::Logger;
34
use Koha::Patrons;
33
use Koha::Patrons;
35
use Koha::RecordProcessor;
34
use Koha::RecordProcessor;
36
use URI::Escape;
35
use URI::Escape;
37
use Business::ISBN;
36
use Business::ISBN;
38
use MARC::Record;
37
use MARC::Record;
39
use MARC::Field;
38
use MARC::Field;
40
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
39
40
our (@ISA, @EXPORT_OK);
41
BEGIN {
42
    require Exporter;
43
    @ISA    = qw(Exporter);
44
    @EXPORT_OK = qw(
45
      FindDuplicate
46
      SimpleSearch
47
      searchResults
48
      getRecords
49
      buildQuery
50
      GetDistinctValues
51
      enabled_staff_search_views
52
      new_record_from_zebra
53
      z3950_search_args
54
      getIndexes
55
    );
56
}
41
57
42
=head1 NAME
58
=head1 NAME
43
59
Lines 55-71 This module provides searching functions for Koha's bibliographic databases Link Here
55
71
56
=cut
72
=cut
57
73
58
@ISA    = qw(Exporter);
59
@EXPORT = qw(
60
  &FindDuplicate
61
  &SimpleSearch
62
  &searchResults
63
  &getRecords
64
  &buildQuery
65
  &GetDistinctValues
66
  &enabled_staff_search_views
67
);
68
69
# make all your functions, whether exported or not;
74
# make all your functions, whether exported or not;
70
75
71
=head2 FindDuplicate
76
=head2 FindDuplicate
(-)a/C4/Search/History.pm (-4 / +3 lines)
Lines 4-14 use Modern::Perl; Link Here
4
4
5
use C4::Auth qw( get_session );
5
use C4::Auth qw( get_session );
6
use C4::Context;
6
use C4::Context;
7
use Koha::DateUtils;
7
use Koha::DateUtils qw( dt_from_string output_pref );
8
8
9
use JSON qw( encode_json decode_json );
9
use JSON qw( decode_json encode_json );
10
use URI::Escape;
10
use URI::Escape qw( uri_escape uri_unescape );
11
use Encode;
12
11
13
sub add {
12
sub add {
14
    my ($params)   = @_;
13
    my ($params)   = @_;
(-)a/C4/Search/PazPar2.pm (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use LWP::UserAgent;
22
use LWP::UserAgent;
23
use URI;
23
use URI;
24
use URI::QueryParam;
24
use URI::QueryParam;
25
use XML::Simple;
25
use XML::Simple qw( XMLin );
26
26
27
=head1 NAME
27
=head1 NAME
28
28
(-)a/C4/Serials.pm (-30 / +43 lines)
Lines 20-44 package C4::Serials; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth qw(haspermission);
23
use C4::Auth qw( haspermission );
24
use C4::Context;
24
use C4::Context;
25
use DateTime;
25
use DateTime;
26
use Date::Calc qw(:all);
26
use Date::Calc qw(
27
use POSIX qw(strftime);
27
    Add_Delta_Days
28
use C4::Biblio;
28
    Add_Delta_YM
29
use C4::Log;    # logaction
29
    check_date
30
use C4::Serials::Frequency;
30
    Delta_Days
31
    N_Delta_YMD
32
    Today
33
);
34
use POSIX qw( strftime );
35
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblio );
36
use C4::Log qw( logaction );    # logaction
37
use C4::Serials::Frequency qw( GetSubscriptionFrequency );
31
use C4::Serials::Numberpattern;
38
use C4::Serials::Numberpattern;
32
use Koha::AdditionalFieldValues;
39
use Koha::AdditionalFieldValues;
33
use Koha::DateUtils;
40
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::Serial;
41
use Koha::Serial;
35
use Koha::Subscriptions;
42
use Koha::Subscriptions;
36
use Koha::Subscription::Histories;
43
use Koha::Subscription::Histories;
37
use Koha::SharedContent;
44
use Koha::SharedContent;
38
use Scalar::Util qw( looks_like_number );
45
use Scalar::Util qw( looks_like_number );
39
46
40
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
41
42
# Define statuses
47
# Define statuses
43
use constant {
48
use constant {
44
    EXPECTED               => 1,
49
    EXPECTED               => 1,
Lines 61-91 use constant MISSING_STATUSES => ( Link Here
61
    MISSING_LOST
66
    MISSING_LOST
62
);
67
);
63
68
69
our (@ISA, @EXPORT_OK);
64
BEGIN {
70
BEGIN {
65
    require Exporter;
71
    require Exporter;
66
    @ISA    = qw(Exporter);
72
    @ISA    = qw(Exporter);
67
    @EXPORT = qw(
73
    @EXPORT_OK = qw(
68
      &NewSubscription    &ModSubscription    &DelSubscription
74
      NewSubscription    ModSubscription    DelSubscription
69
      &GetSubscription    &CountSubscriptionFromBiblionumber      &GetSubscriptionsFromBiblionumber
75
      GetSubscription    CountSubscriptionFromBiblionumber      GetSubscriptionsFromBiblionumber
70
      &SearchSubscriptions
76
      SearchSubscriptions
71
      &GetFullSubscriptionsFromBiblionumber   &GetFullSubscription &ModSubscriptionHistory
77
      GetFullSubscriptionsFromBiblionumber   GetFullSubscription ModSubscriptionHistory
72
      &HasSubscriptionStrictlyExpired &HasSubscriptionExpired &GetExpirationDate &abouttoexpire
78
      HasSubscriptionStrictlyExpired HasSubscriptionExpired GetExpirationDate abouttoexpire
73
      &GetSubscriptionHistoryFromSubscriptionId
79
      GetFictiveIssueNumber
74
80
      GetSubscriptionHistoryFromSubscriptionId
75
      &GetNextSeq &GetSeq &NewIssue           &GetSerials
81
76
      &GetLatestSerials   &ModSerialStatus    &GetNextDate       &GetSerials2
82
      GetNextSeq GetSeq NewIssue           GetSerials
77
      &GetSubscriptionLength &ReNewSubscription  &GetLateOrMissingIssues
83
      GetLatestSerials   ModSerialStatus    GetNextDate
78
      &GetSerialInformation                   &AddItem2Serial
84
      CloseSubscription ReopenSubscription
79
      &PrepareSerialsData &GetNextExpected    &ModNextExpected
85
      subscriptionCurrentlyOnOrder
80
      &GetPreviousSerialid
86
      can_claim_subscription can_edit_subscription can_show_subscription
81
87
      GetSerials2
82
      &GetSuppliersWithLateIssues
88
      GetSubscriptionLength ReNewSubscription  GetLateOrMissingIssues
83
      &getroutinglist     &delroutingmember   &addroutingmember
89
      GetSerialInformation                   AddItem2Serial
84
      &reorder_members
90
      PrepareSerialsData GetNextExpected    ModNextExpected
85
      &check_routing &updateClaim
91
      GetSubscriptionIrregularities
86
      &CountIssues
92
      GetPreviousSerialid
93
94
      GetSuppliersWithLateIssues
95
      getroutinglist     delroutingmember   addroutingmember
96
      reorder_members
97
      check_routing updateClaim
98
      CountIssues
87
      HasItems
99
      HasItems
88
      &subscriptionCurrentlyOnOrder
100
101
      findSerialsByStatus
89
102
90
    );
103
    );
91
}
104
}
(-)a/C4/Serials/Frequency.pm (-6 / +6 lines)
Lines 28-40 BEGIN { Link Here
28
    require Exporter;
28
    require Exporter;
29
    @ISA    = qw(Exporter);
29
    @ISA    = qw(Exporter);
30
    @EXPORT = qw(
30
    @EXPORT = qw(
31
      &GetSubscriptionFrequencies
31
      GetSubscriptionFrequencies
32
      &GetSubscriptionFrequency
32
      GetSubscriptionFrequency
33
      &AddSubscriptionFrequency
33
      AddSubscriptionFrequency
34
      &ModSubscriptionFrequency
34
      ModSubscriptionFrequency
35
      &DelSubscriptionFrequency
35
      DelSubscriptionFrequency
36
36
37
      &GetSubscriptionsWithFrequency
37
      GetSubscriptionsWithFrequency
38
    );
38
    );
39
}
39
}
40
40
(-)a/C4/Serials/Numberpattern.pm (-8 / +8 lines)
Lines 29-42 BEGIN { Link Here
29
    require Exporter;
29
    require Exporter;
30
    @ISA    = qw(Exporter);
30
    @ISA    = qw(Exporter);
31
    @EXPORT = qw(
31
    @EXPORT = qw(
32
        &GetSubscriptionNumberpatterns
32
        GetSubscriptionNumberpatterns
33
        &GetSubscriptionNumberpattern
33
        GetSubscriptionNumberpattern
34
        &GetSubscriptionNumberpatternByName
34
        GetSubscriptionNumberpatternByName
35
        &AddSubscriptionNumberpattern
35
        AddSubscriptionNumberpattern
36
        &ModSubscriptionNumberpattern
36
        ModSubscriptionNumberpattern
37
        &DelSubscriptionNumberpattern
37
        DelSubscriptionNumberpattern
38
38
39
        &GetSubscriptionsWithNumberpattern
39
        GetSubscriptionsWithNumberpattern
40
    );
40
    );
41
}
41
}
42
42
(-)a/C4/Service.pm (-1 / +1 lines)
Lines 43-49 use warnings; Link Here
43
43
44
use CGI qw ( -utf8 );
44
use CGI qw ( -utf8 );
45
use C4::Auth qw( check_api_auth );
45
use C4::Auth qw( check_api_auth );
46
use C4::Output qw( :ajax );
46
use C4::Output qw( output_with_http_headers );
47
use C4::Output::JSONStream;
47
use C4::Output::JSONStream;
48
use JSON;
48
use JSON;
49
49
(-)a/C4/ShelfBrowser.pm (-9 / +6 lines)
Lines 20-40 package C4::ShelfBrowser; Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use C4::Biblio;
23
use C4::Biblio qw( GetAuthorisedValueDesc GetMarcBiblio );
24
use C4::Context;
24
use C4::Context;
25
use C4::Koha;
25
use C4::Koha qw( GetNormalizedUPC GetNormalizedOCLCNumber GetNormalizedISBN GetNormalizedEAN );
26
use Koha::Biblios;
26
use Koha::Biblios;
27
use Koha::Libraries;
27
use Koha::Libraries;
28
28
29
use vars qw(@ISA @EXPORT @EXPORT_OK);
29
our (@ISA, @EXPORT_OK);
30
31
BEGIN {
30
BEGIN {
32
	require Exporter;
31
    require Exporter;
33
	@ISA    = qw(Exporter);
32
    @ISA       = qw(Exporter);
34
	@EXPORT = qw(
35
	    &GetNearbyItems
36
    );
37
    @EXPORT_OK = qw(
33
    @EXPORT_OK = qw(
34
      GetNearbyItems
38
    );
35
    );
39
}
36
}
40
37
(-)a/C4/SocialData.pm (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use C4::Context;
20
use C4::Context;
21
use Business::ISBN;
21
use Business::ISBN;
22
use C4::Koha;
22
use C4::Koha qw( GetNormalizedISBN );
23
23
24
=head1 NAME
24
=head1 NAME
25
25
(-)a/C4/Stats.pm (-5 / +5 lines)
Lines 20-26 package C4::Stats; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
require Exporter;
22
require Exporter;
23
use Carp;
23
use Carp qw( croak );
24
use C4::Context;
24
use C4::Context;
25
25
26
use Koha::DateUtils qw( dt_from_string );
26
use Koha::DateUtils qw( dt_from_string );
Lines 30-39 use Koha::PseudonymizedTransactions; Link Here
30
use vars qw(@ISA @EXPORT);
30
use vars qw(@ISA @EXPORT);
31
31
32
BEGIN {
32
BEGIN {
33
	@ISA    = qw(Exporter);
33
    @ISA    = qw(Exporter);
34
	@EXPORT = qw(
34
    @EXPORT = qw(
35
		&UpdateStats
35
      UpdateStats
36
	);
36
    );
37
}
37
}
38
38
39
39
(-)a/C4/Suggestions.pm (-2 / +1 lines)
Lines 25-34 use C4::Context; Link Here
25
use C4::Output;
25
use C4::Output;
26
use C4::Letters;
26
use C4::Letters;
27
use C4::Biblio qw( GetMarcFromKohaField );
27
use C4::Biblio qw( GetMarcFromKohaField );
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string );
29
use Koha::Suggestions;
29
use Koha::Suggestions;
30
30
31
use List::MoreUtils qw(any);
32
use base qw(Exporter);
31
use base qw(Exporter);
33
32
34
our @EXPORT  = qw(
33
our @EXPORT  = qw(
(-)a/C4/Tags.pm (-18 / +19 lines)
Lines 20-54 package C4::Tags; Link Here
20
20
21
use strict;
21
use strict;
22
use warnings;
22
use warnings;
23
use Carp;
23
use Carp qw( carp );
24
use Exporter;
24
use Exporter;
25
25
26
use C4::Context;
26
use C4::Context;
27
use Module::Load::Conditional qw/check_install/;
27
use Module::Load::Conditional qw( check_install );
28
#use Data::Dumper;
28
#use Data::Dumper;
29
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
29
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
30
use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM   tags_all\n";
30
use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM   tags_all\n";
31
31
32
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
32
our (@ISA, @EXPORT_OK);
33
34
BEGIN {
33
BEGIN {
35
	@ISA = qw(Exporter);
34
    @ISA       = qw(Exporter);
36
    @EXPORT_OK = qw(
35
    @EXPORT_OK = qw(
37
      &get_tag &get_tags &get_tag_rows
36
      get_tag get_tags get_tag_rows
38
      &add_tags &add_tag
37
      add_tags
39
      &delete_tag_row_by_id
38
      add_tag
40
      &remove_tag
39
      add_tag_approval
41
      &delete_tag_rows_by_ids
40
      add_tag_index
42
      &get_approval_rows
41
      delete_tag_row_by_id
43
      &blacklist
42
      remove_tag
44
      &whitelist
43
      delete_tag_rows_by_ids
45
      &is_approved
44
      get_approval_rows
46
      &approval_counts
45
      blacklist
47
      &get_count_by_tag_status
46
      whitelist
48
      &get_filters
47
      is_approved
48
      approval_counts
49
      get_count_by_tag_status
50
      get_filters
49
      stratify_tags
51
      stratify_tags
50
    );
52
    );
51
	# %EXPORT_TAGS = ();
52
    my $ext_dict = C4::Context->preference('TagsExternalDictionary');
53
    my $ext_dict = C4::Context->preference('TagsExternalDictionary');
53
    if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) {
54
    if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) {
54
        warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed.";
55
        warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed.";
(-)a/C4/Templates.pm (-4 / +3 lines)
Lines 2-10 package C4::Templates; Link Here
2
2
3
use strict;
3
use strict;
4
use warnings;
4
use warnings;
5
use Carp;
5
use Carp qw( carp );
6
use CGI qw ( -utf8 );
6
use CGI qw ( -utf8 );
7
use List::MoreUtils qw/ any uniq /;
7
use List::MoreUtils qw( uniq );
8
8
9
# Copyright 2009 Chris Cormack and The Koha Dev Team
9
# Copyright 2009 Chris Cormack and The Koha Dev Team
10
#
10
#
Lines 31-38 C4::Templates - Object for manipulating templates for use with Koha Link Here
31
31
32
use base qw(Class::Accessor);
32
use base qw(Class::Accessor);
33
use Template;
33
use Template;
34
use Template::Constants qw( :debug );
34
use C4::Languages qw( get_bidi getTranslatedLanguages regex_lang_subtags );
35
use C4::Languages qw(getTranslatedLanguages get_bidi regex_lang_subtags language_get_description accept_language );
36
35
37
use C4::Context;
36
use C4::Context;
38
37
(-)a/C4/TmplTokenType.pm (-15 / +16 lines)
Lines 20-27 package C4::TmplTokenType; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
require Exporter;
21
require Exporter;
22
22
23
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
24
25
###############################################################################
23
###############################################################################
26
24
27
=head1 NAME
25
=head1 NAME
Lines 38-62 The predefined constants are Link Here
38
###############################################################################
36
###############################################################################
39
37
40
38
41
@ISA = qw(Exporter);
42
@EXPORT_OK = qw(
43
    &TEXT
44
    &TEXT_PARAMETRIZED
45
    &CDATA
46
    &TAG
47
    &DECL
48
    &PI
49
    &DIRECTIVE
50
    &COMMENT
51
    &UNKNOWN
52
);
53
54
###############################################################################
39
###############################################################################
55
40
56
use vars qw( $_text $_text_parametrized $_cdata
41
use vars qw( $_text $_text_parametrized $_cdata
57
    $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
42
    $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
58
43
44
our (@ISA, @EXPORT_OK);
59
BEGIN {
45
BEGIN {
46
47
    require Exporter;
48
    @ISA = qw(Exporter);
49
    @EXPORT_OK = qw(
50
      TEXT
51
      TEXT_PARAMETRIZED
52
      CDATA
53
      TAG
54
      DECL
55
      PI
56
      DIRECTIVE
57
      COMMENT
58
      UNKNOWN
59
    );
60
60
    my $new = sub {
61
    my $new = sub {
61
	my $this = 'C4::TmplTokenType';#shift;
62
	my $this = 'C4::TmplTokenType';#shift;
62
	my $class = ref($this) || $this;
63
	my $class = ref($this) || $this;
(-)a/C4/UsageStats.pm (-2 / +2 lines)
Lines 19-27 package C4::UsageStats; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Context;
21
use C4::Context;
22
use POSIX qw(strftime);
22
use POSIX qw( strftime );
23
use LWP::UserAgent;
23
use LWP::UserAgent;
24
use JSON;
24
use JSON qw( decode_json encode_json );
25
25
26
use Koha::Libraries;
26
use Koha::Libraries;
27
27
(-)a/C4/Utils/DataTables/Members.pm (-2 / +2 lines)
Lines 2-9 package C4::Utils::DataTables::Members; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Context;
4
use C4::Context;
5
use C4::Utils::DataTables;
5
use C4::Utils::DataTables qw( dt_build_orderby );
6
use Koha::DateUtils;
6
use Koha::DateUtils qw( dt_from_string output_pref );
7
7
8
sub search {
8
sub search {
9
    my ( $params ) = @_;
9
    my ( $params ) = @_;
(-)a/C4/Utils/DataTables/VirtualShelves.pm (-1 / +1 lines)
Lines 2-8 package C4::Utils::DataTables::VirtualShelves; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Context;
4
use C4::Context;
5
use C4::Utils::DataTables;
5
use C4::Utils::DataTables qw( dt_build_orderby );
6
use Koha::Virtualshelves;
6
use Koha::Virtualshelves;
7
7
8
sub search {
8
sub search {
(-)a/C4/XISBN.pm (-11 / +9 lines)
Lines 21-44 use Modern::Perl; Link Here
21
use XML::Simple;
21
use XML::Simple;
22
#use LWP::Simple;
22
#use LWP::Simple;
23
use C4::Biblio;
23
use C4::Biblio;
24
use C4::Koha;
24
use C4::Koha qw( GetNormalizedISBN );
25
use C4::Search;
25
use C4::Search qw( new_record_from_zebra );
26
use C4::External::Syndetics qw(get_syndetics_editions);
26
use C4::External::Syndetics qw( get_syndetics_editions );
27
use LWP::UserAgent;
27
use LWP::UserAgent;
28
use HTTP::Request::Common;
29
28
30
use Koha::Biblios;
29
use Koha::Biblios;
31
use Koha::SearchEngine;
30
use Koha::SearchEngine;
32
use Koha::SearchEngine::Search;
31
use Koha::SearchEngine::Search;
33
32
34
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
33
our (@ISA, @EXPORT_OK);
35
36
BEGIN {
34
BEGIN {
37
	require Exporter;
35
    require Exporter;
38
	@ISA = qw(Exporter);
36
    @ISA       = qw(Exporter);
39
	@EXPORT_OK = qw(
37
    @EXPORT_OK = qw(
40
		&get_xisbns
38
      get_xisbns
41
	);
39
    );
42
}
40
}
43
41
44
=head1 NAME
42
=head1 NAME
(-)a/C4/XSLT.pm (-9 / +8 lines)
Lines 24-53 package C4::XSLT; Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use C4::Context;
26
use C4::Context;
27
use C4::Items;
27
use C4::Koha qw( xml_escape );
28
use C4::Koha;
28
use C4::Biblio qw( GetAuthorisedValueDesc GetFrameworkCode GetMarcStructure );
29
use C4::Biblio;
30
use C4::Circulation;
31
use C4::Reserves;
32
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
33
use Koha::ItemTypes;
30
use Koha::ItemTypes;
34
use Koha::XSLT::Base;
31
use Koha::XSLT::Base;
35
use Koha::Libraries;
32
use Koha::Libraries;
36
33
37
use Encode;
38
34
39
use vars qw(@ISA @EXPORT);
40
35
41
my $engine; #XSLT Handler object
36
my $engine; #XSLT Handler object
42
my %authval_per_framework;
37
my %authval_per_framework;
43
    # Cache for tagfield-tagsubfield to decode per framework.
38
    # Cache for tagfield-tagsubfield to decode per framework.
44
    # Should be preferably be placed in Koha-core...
39
    # Should be preferably be placed in Koha-core...
45
40
41
our (@ISA, @EXPORT_OK);
46
BEGIN {
42
BEGIN {
47
    require Exporter;
43
    require Exporter;
48
    @ISA = qw(Exporter);
44
    @ISA = qw(Exporter);
49
    @EXPORT = qw(
45
    @EXPORT_OK = qw(
50
        &XSLTParse4Display
46
        transformMARCXML4XSLT
47
        getAuthorisedValues4MARCSubfields
48
        buildKohaItemsNamespace
49
        XSLTParse4Display
51
    );
50
    );
52
    $engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } );
51
    $engine=Koha::XSLT::Base->new( { do_not_return_source => 1 } );
53
}
52
}
(-)a/Koha/Account.pm (-4 / +2 lines)
Lines 20-28 package Koha::Account; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use Carp;
23
use Data::Dumper;
23
use Data::Dumper qw( Dumper );
24
use List::MoreUtils qw( uniq );
24
use Try::Tiny qw( catch try );
25
use Try::Tiny;
26
25
27
use C4::Circulation qw( ReturnLostItem CanBookBeRenewed AddRenewal );
26
use C4::Circulation qw( ReturnLostItem CanBookBeRenewed AddRenewal );
28
use C4::Letters;
27
use C4::Letters;
Lines 34-40 use Koha::Patrons; Link Here
34
use Koha::Account::Lines;
33
use Koha::Account::Lines;
35
use Koha::Account::Offsets;
34
use Koha::Account::Offsets;
36
use Koha::Account::DebitTypes;
35
use Koha::Account::DebitTypes;
37
use Koha::DateUtils qw( dt_from_string );
38
use Koha::Exceptions;
36
use Koha::Exceptions;
39
use Koha::Exceptions::Account;
37
use Koha::Exceptions::Account;
40
38
(-)a/Koha/Account/CreditType.pm (-1 lines)
Lines 18-24 package Koha::Account::CreditType; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use List::Util qw/any/;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
use Koha::Exceptions;
23
use Koha::Exceptions;
(-)a/Koha/Account/CreditTypes.pm (-1 lines)
Lines 18-24 package Koha::Account::CreditTypes; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use List::Util qw/any/;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
use Koha::Account::CreditType;
23
use Koha::Account::CreditType;
(-)a/Koha/Account/DebitType.pm (-1 lines)
Lines 18-24 package Koha::Account::DebitType; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use List::Util qw/any/;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
use Koha::Exceptions;
23
use Koha::Exceptions;
(-)a/Koha/Account/DebitTypes.pm (-1 lines)
Lines 18-24 package Koha::Account::DebitTypes; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use List::Util qw/any/;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
use Koha::Account::DebitType;
23
use Koha::Account::DebitType;
(-)a/Koha/Account/Line.pm (-5 / +4 lines)
Lines 17-33 package Koha::Account::Line; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
20
use Data::Dumper qw( Dumper );
21
use Data::Dumper;
22
21
23
use C4::Log qw(logaction);
22
use C4::Log qw( logaction );
24
use C4::Overdues qw(GetFine);
23
use C4::Overdues qw( UpdateFine );
25
24
26
use Koha::Account::CreditType;
25
use Koha::Account::CreditType;
27
use Koha::Account::DebitType;
26
use Koha::Account::DebitType;
28
use Koha::Account::Offsets;
27
use Koha::Account::Offsets;
29
use Koha::Database;
28
use Koha::Database;
30
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string );
31
use Koha::Exceptions::Account;
30
use Koha::Exceptions::Account;
32
use Koha::Items;
31
use Koha::Items;
33
32
(-)a/Koha/Account/Lines.pm (-1 lines)
Lines 17-23 package Koha::Account::Lines; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Account::Line;
22
use Koha::Account::Line;
(-)a/Koha/Account/Offset.pm (-1 lines)
Lines 17-23 package Koha::Account::Offset; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Account::Lines;
22
use Koha::Account::Lines;
(-)a/Koha/Account/Offsets.pm (-1 lines)
Lines 17-23 package Koha::Account::Offsets; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Acquisition/Basket.pm (-1 / +1 lines)
Lines 25-31 use Koha::Acquisition::BasketGroups; Link Here
25
use Koha::Acquisition::Orders;
25
use Koha::Acquisition::Orders;
26
use Koha::Exceptions::Acquisition::Basket;
26
use Koha::Exceptions::Acquisition::Basket;
27
use Koha::Patrons;
27
use Koha::Patrons;
28
use C4::Log qw(logaction);
28
use C4::Log qw( logaction );
29
29
30
use base qw( Koha::Object Koha::Object::Mixin::AdditionalFields );
30
use base qw( Koha::Object Koha::Object::Mixin::AdditionalFields );
31
31
(-)a/Koha/Acquisition/Bookseller/Contact.pm (-1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
4
5
use base qw( Koha::Object );
5
use base qw( Koha::Object );
6
6
7
use Carp qw( croak );
8
7
9
sub _type {
8
sub _type {
10
    return 'Aqcontact';
9
    return 'Aqcontact';
(-)a/Koha/Acquisition/Bookseller/Contacts.pm (-1 lines)
Lines 2-8 package Koha::Acquisition::Bookseller::Contacts; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Carp;
6
5
7
use base qw( Koha::Objects );
6
use base qw( Koha::Objects );
8
7
(-)a/Koha/Acquisition/Currencies.pm (-1 lines)
Lines 17-23 package Koha::Acquisition::Currencies; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Acquisition/Currency.pm (-1 lines)
Lines 17-23 package Koha::Acquisition::Currency; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Acquisition/Invoice/Adjustment.pm (-1 lines)
Lines 17-23 package Koha::Acquisition::Invoice::Adjustment; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Acquisition::Invoices;
22
use Koha::Acquisition::Invoices;
(-)a/Koha/Acquisition/Invoice/Adjustments.pm (-1 lines)
Lines 18-24 package Koha::Acquisition::Invoice::Adjustments; Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
use Koha::Acquisition::Invoice::Adjustment;
19
use Koha::Acquisition::Invoice::Adjustment;
20
20
21
use Carp;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
23
(-)a/Koha/Acquisition/Order.pm (-3 / +2 lines)
Lines 18-33 package Koha::Acquisition::Order; Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp qw( croak );
20
use Carp qw( croak );
21
use Try::Tiny;
22
21
23
use C4::Biblio qw(DelBiblio);
22
use C4::Biblio qw( DelBiblio );
24
23
25
use Koha::Acquisition::Baskets;
24
use Koha::Acquisition::Baskets;
26
use Koha::Acquisition::Funds;
25
use Koha::Acquisition::Funds;
27
use Koha::Acquisition::Invoices;
26
use Koha::Acquisition::Invoices;
28
use Koha::Acquisition::Order::Claims;
27
use Koha::Acquisition::Order::Claims;
29
use Koha::Database;
28
use Koha::Database;
30
use Koha::DateUtils qw( dt_from_string output_pref );
29
use Koha::DateUtils qw( dt_from_string );
31
use Koha::Exceptions::Object;
30
use Koha::Exceptions::Object;
32
use Koha::Biblios;
31
use Koha::Biblios;
33
use Koha::Holds;
32
use Koha::Holds;
(-)a/Koha/Acquisition/Order/Claim.pm (-1 lines)
Lines 17-23 package Koha::Acquisition::Order::Claim; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Acquisition/Order/Claims.pm (-1 lines)
Lines 17-23 package Koha::Acquisition::Order::Claims; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Acquisition/Orders.pm (-1 lines)
Lines 17-23 package Koha::Acquisition::Orders; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/AdvancedEditorMacro.pm (-1 lines)
Lines 16-22 package Koha::AdvancedEditorMacro; Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
18
19
use Carp;
20
19
21
use Koha::Database;
20
use Koha::Database;
22
21
(-)a/Koha/AdvancedEditorMacros.pm (-1 lines)
Lines 16-22 package Koha::AdvancedEditorMacros; Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
18
19
use Carp;
20
19
21
use Koha::Database;
20
use Koha::Database;
22
21
(-)a/Koha/ApiKey.pm (-1 lines)
Lines 19-25 package Koha::ApiKey; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::Exceptions;
24
use Koha::Exceptions;
(-)a/Koha/ApiKeys.pm (-1 lines)
Lines 19-25 package Koha::ApiKeys; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::ApiKey;
24
use Koha::ApiKey;
(-)a/Koha/ArticleRequest.pm (-2 / +1 lines)
Lines 19-32 package Koha::ArticleRequest; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::Patrons;
24
use Koha::Patrons;
26
use Koha::Biblios;
25
use Koha::Biblios;
27
use Koha::Items;
26
use Koha::Items;
28
use Koha::Libraries;
27
use Koha::Libraries;
29
use Koha::DateUtils qw(dt_from_string);
28
use Koha::DateUtils qw( dt_from_string );
30
29
31
use base qw(Koha::Object);
30
use base qw(Koha::Object);
32
31
(-)a/Koha/ArticleRequests.pm (-1 lines)
Lines 19-25 package Koha::ArticleRequests; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/AudioAlert.pm (-1 lines)
Lines 19-25 package Koha::AudioAlert; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/AudioAlerts.pm (-1 lines)
Lines 19-25 package Koha::AudioAlerts; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/AuthUtils.pm (-7 / +10 lines)
Lines 18-36 package Koha::AuthUtils; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64);
21
use Crypt::Eksblowfish::Bcrypt qw( bcrypt en_base64 );
22
use Encode qw( encode is_utf8 );
22
use Encode;
23
use Fcntl qw/O_RDONLY/; # O_RDONLY is used in generate_salt
23
use Fcntl qw( O_RDONLY ); # O_RDONLY is used in generate_salt
24
use List::MoreUtils qw/ any /;
24
use List::MoreUtils qw( any );
25
use String::Random qw( random_string );
25
use String::Random qw( random_string );
26
use Koha::Exceptions::Password;
26
use Koha::Exceptions::Password;
27
27
28
use C4::Context;
28
use C4::Context;
29
29
30
use base 'Exporter';
31
32
our @EXPORT_OK   = qw(hash_password get_script_name);
33
30
31
our (@ISA, @EXPORT_OK);
32
BEGIN {
33
    require Exporter;
34
    @ISA = qw(Exporter);
35
    @EXPORT_OK = qw(hash_password get_script_name is_password_valid);
36
};
34
=head1 NAME
37
=head1 NAME
35
38
36
Koha::AuthUtils - utility routines for authentication
39
Koha::AuthUtils - utility routines for authentication
(-)a/Koha/AuthorisedValue.pm (-1 lines)
Lines 19-25 package Koha::AuthorisedValue; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/AuthorisedValueCategories.pm (-1 lines)
Lines 17-23 package Koha::AuthorisedValueCategories; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Exceptions;
22
use Koha::Exceptions;
(-)a/Koha/AuthorisedValueCategory.pm (-1 lines)
Lines 17-23 package Koha::AuthorisedValueCategory; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Exceptions;
22
use Koha::Exceptions;
(-)a/Koha/AuthorisedValues.pm (-1 lines)
Lines 19-25 package Koha::AuthorisedValues; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Authorities.pm (-1 lines)
Lines 19-25 package Koha::Authorities; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Authority/MergeRequests.pm (-2 / +1 lines)
Lines 19-30 package Koha::Authority::MergeRequests; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use MARC::File::XML;
21
use MARC::File::XML;
22
use MARC::Record;
23
22
24
use C4::Context;
23
use C4::Context;
25
use Koha::Authority::MergeRequest;
24
use Koha::Authority::MergeRequest;
26
use Koha::Database;
25
use Koha::Database;
27
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
28
27
29
use parent qw(Koha::Objects);
28
use parent qw(Koha::Objects);
30
29
(-)a/Koha/Authority/Type.pm (-1 lines)
Lines 17-23 package Koha::Authority::Type; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Authority/Types.pm (-1 lines)
Lines 17-23 package Koha::Authority::Types; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/BackgroundJob.pm (-2 / +2 lines)
Lines 16-25 package Koha::BackgroundJob; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( encode_json decode_json );
19
use JSON qw( decode_json encode_json );
20
use Carp qw( croak );
20
use Carp qw( croak );
21
use Net::Stomp;
21
use Net::Stomp;
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
25
use Koha::DateUtils qw( dt_from_string );
25
use Koha::DateUtils qw( dt_from_string );
(-)a/Koha/BackgroundJob/BatchUpdateAuthority.pm (-2 / +2 lines)
Lines 16-24 package Koha::BackgroundJob::BatchUpdateAuthority; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( encode_json decode_json );
19
use JSON qw( decode_json encode_json );
20
20
21
use C4::MarcModificationTemplates;
21
use C4::MarcModificationTemplates qw( ModifyRecordWithTemplate );
22
use C4::AuthoritiesMarc;
22
use C4::AuthoritiesMarc;
23
use Koha::BackgroundJobs;
23
use Koha::BackgroundJobs;
24
use Koha::DateUtils qw( dt_from_string );
24
use Koha::DateUtils qw( dt_from_string );
(-)a/Koha/BackgroundJob/BatchUpdateBiblio.pm (-1 / +1 lines)
Lines 16-22 package Koha::BackgroundJob::BatchUpdateBiblio; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( encode_json decode_json );
19
use JSON qw( decode_json encode_json );
20
20
21
use Koha::BackgroundJobs;
21
use Koha::BackgroundJobs;
22
use Koha::DateUtils qw( dt_from_string );
22
use Koha::DateUtils qw( dt_from_string );
(-)a/Koha/Biblio.pm (-5 / +3 lines)
Lines 19-31 package Koha::Biblio; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use List::MoreUtils qw( any );
23
use List::MoreUtils qw(any);
24
use URI;
23
use URI;
25
use URI::Escape;
24
use URI::Escape qw( uri_escape_utf8 );
26
25
27
use C4::Koha;
26
use C4::Koha qw( GetNormalizedISBN );
28
use C4::Biblio qw();
29
27
30
use Koha::Database;
28
use Koha::Database;
31
use Koha::DateUtils qw( dt_from_string );
29
use Koha::DateUtils qw( dt_from_string );
(-)a/Koha/Biblio/Metadatas.pm (-1 lines)
Lines 17-23 package Koha::Biblio::Metadatas; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/BiblioFramework.pm (-1 lines)
Lines 17-23 package Koha::BiblioFramework; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/BiblioFrameworks.pm (-1 lines)
Lines 17-23 package Koha::BiblioFrameworks; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/BiblioUtils.pm (-2 / +1 lines)
Lines 32-43 the new thing that should be used. Link Here
32
32
33
=cut
33
=cut
34
34
35
use C4::Biblio; # EmbedItemsInMarcBiblio
35
use C4::Biblio;
36
use Koha::MetadataIterator;
36
use Koha::MetadataIterator;
37
use Koha::Database;
37
use Koha::Database;
38
use Modern::Perl;
38
use Modern::Perl;
39
39
40
use Data::Dumper; # TODO remove
41
40
42
use base qw(Koha::MetadataRecord);
41
use base qw(Koha::MetadataRecord);
43
42
(-)a/Koha/BiblioUtils/Iterator.pm (-2 / +2 lines)
Lines 43-51 Returns biblionumber and marc in list context. Link Here
43
43
44
=cut
44
=cut
45
45
46
use C4::Biblio;    # :( - for EmbedItemsInMarcBiblio
46
use C4::Biblio;
47
47
48
use Carp;
48
use Carp qw( confess );
49
use MARC::Record;
49
use MARC::Record;
50
use MARC::File::XML;
50
use MARC::File::XML;
51
use Modern::Perl;
51
use Modern::Perl;
(-)a/Koha/Biblioitem.pm (-1 lines)
Lines 17-23 package Koha::Biblioitem; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Biblioitems.pm (-1 lines)
Lines 17-23 package Koha::Biblioitems; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Biblios.pm (-1 lines)
Lines 19-25 package Koha::Biblios; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Cache.pm (-2 / +2 lines)
Lines 40-47 The first, traditional OO interface provides the following functions: Link Here
40
40
41
use strict;
41
use strict;
42
use warnings;
42
use warnings;
43
use Carp;
43
use Carp qw( croak );
44
use Module::Load::Conditional qw(can_load);
44
use Module::Load::Conditional qw( can_load );
45
use Sereal::Encoder;
45
use Sereal::Encoder;
46
use Sereal::Decoder;
46
use Sereal::Decoder;
47
47
(-)a/Koha/Cache/Object.pm (-1 lines)
Lines 52-58 scalars and hashes, with arrays a potential future addition. Link Here
52
52
53
use strict;
53
use strict;
54
use warnings;
54
use warnings;
55
use Carp;
56
55
57
use base qw(Class::Accessor);
56
use base qw(Class::Accessor);
58
57
(-)a/Koha/Calendar.pm (-1 / +1 lines)
Lines 2-8 package Koha::Calendar; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Carp;
5
use Carp qw( croak );
6
use DateTime;
6
use DateTime;
7
use DateTime::Duration;
7
use DateTime::Duration;
8
use C4::Context;
8
use C4::Context;
(-)a/Koha/Cash/Register.pm (-1 lines)
Lines 17-23 package Koha::Cash::Register; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Account::Lines;
21
use Koha::Account::Lines;
23
use Koha::Account::Offsets;
22
use Koha::Account::Offsets;
(-)a/Koha/Cash/Register/Action.pm (-1 lines)
Lines 17-23 package Koha::Cash::Register::Action; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Cash/Register/Actions.pm (-1 lines)
Lines 17-23 package Koha::Cash::Register::Actions; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Cash/Register/Cashup.pm (-1 lines)
Lines 17-23 package Koha::Cash::Register::Cashup; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Cash/Register/Cashups.pm (-1 lines)
Lines 17-23 package Koha::Cash::Register::Cashups; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Cash::Register::Cashup;
22
use Koha::Cash::Register::Cashup;
(-)a/Koha/Cash/Registers.pm (-1 lines)
Lines 17-23 package Koha::Cash::Registers; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Charges/Fees.pm (-1 / +1 lines)
Lines 19-25 package Koha::Charges::Fees; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp qw( carp confess );
22
use Carp;
23
23
24
use Koha::Calendar;
24
use Koha::Calendar;
25
use Koha::DateUtils qw( dt_from_string );
25
use Koha::DateUtils qw( dt_from_string );
(-)a/Koha/Checkout.pm (-4 / +3 lines)
Lines 20-33 package Koha::Checkout; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Carp;
24
use DateTime;
23
use DateTime;
25
use Try::Tiny;
24
use Try::Tiny qw( catch try );
26
25
27
use C4::Circulation qw(MarkIssueReturned);
26
use C4::Circulation qw( LostItem MarkIssueReturned );
28
use Koha::Checkouts::ReturnClaims;
27
use Koha::Checkouts::ReturnClaims;
29
use Koha::Database;
28
use Koha::Database;
30
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string );
31
use Koha::Items;
30
use Koha::Items;
32
use Koha::Libraries;
31
use Koha::Libraries;
33
32
(-)a/Koha/Checkouts.pm (-3 / +2 lines)
Lines 19-31 package Koha::Checkouts; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use C4::Context;
23
use C4::Context;
25
use C4::Circulation;
24
use C4::Circulation qw( AddReturn );
26
use Koha::Checkout;
25
use Koha::Checkout;
27
use Koha::Database;
26
use Koha::Database;
28
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string );
29
28
30
use base qw(Koha::Objects);
29
use base qw(Koha::Objects);
31
30
(-)a/Koha/Checkouts/ReturnClaims.pm (-1 lines)
Lines 19-25 package Koha::Checkouts::ReturnClaims; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/CirculationRules.pm (-1 / +1 lines)
Lines 18-24 package Koha::CirculationRules; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp qw(croak);
21
use Carp qw( croak );
22
22
23
use Koha::Exceptions;
23
use Koha::Exceptions;
24
use Koha::CirculationRule;
24
use Koha::CirculationRule;
(-)a/Koha/Cities.pm (-1 lines)
Lines 17-23 package Koha::Cities; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/City.pm (-1 lines)
Lines 17-23 package Koha::City; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/ClassSortRule.pm (-1 lines)
Lines 17-23 package Koha::ClassSortRule; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/ClassSortRules.pm (-1 lines)
Lines 17-23 package Koha::ClassSortRules; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/ClassSource.pm (-1 lines)
Lines 17-23 package Koha::ClassSource; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/ClassSources.pm (-1 lines)
Lines 17-23 package Koha::ClassSources; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/ClassSplitRule.pm (-1 / +1 lines)
Lines 17-23 package Koha::ClassSplitRule; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use JSON qw(to_json from_json);
20
use JSON qw( from_json to_json );
21
21
22
use Koha::Database;
22
use Koha::Database;
23
23
(-)a/Koha/Club.pm (-1 lines)
Lines 19-25 package Koha::Club; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Enrollment.pm (-2 / +1 lines)
Lines 19-30 package Koha::Club::Enrollment; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::Clubs;
24
use Koha::Clubs;
26
use Koha::Patrons;
25
use Koha::Patrons;
27
use Koha::DateUtils qw(dt_from_string);
26
use Koha::DateUtils qw( dt_from_string );
28
use DateTime;
27
use DateTime;
29
28
30
use base qw(Koha::Object);
29
use base qw(Koha::Object);
(-)a/Koha/Club/Enrollment/Field.pm (-1 lines)
Lines 19-25 package Koha::Club::Enrollment::Field; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Enrollment/Fields.pm (-1 lines)
Lines 19-25 package Koha::Club::Enrollment::Fields; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Enrollments.pm (-1 lines)
Lines 19-25 package Koha::Club::Enrollments; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Field.pm (-1 lines)
Lines 19-25 package Koha::Club::Field; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Fields.pm (-1 lines)
Lines 19-25 package Koha::Club::Fields; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Hold.pm (-2 / +1 lines)
Lines 19-25 package Koha::Club::Hold; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
Lines 32-38 use Koha::Club::Hold::PatronHold; Link Here
32
use Koha::Clubs;
31
use Koha::Clubs;
33
use Koha::Patrons;
32
use Koha::Patrons;
34
33
35
use List::Util 'shuffle';
34
use List::Util qw( shuffle );
36
35
37
=head1 NAME
36
=head1 NAME
38
37
(-)a/Koha/Club/Hold/PatronHold.pm (-1 lines)
Lines 19-25 package Koha::Club::Hold::PatronHold; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Hold/PatronHolds.pm (-1 lines)
Lines 19-25 package Koha::Club::Hold::PatronHolds; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Holds.pm (-1 lines)
Lines 19-25 package Koha::Club::Holds; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Template.pm (-1 lines)
Lines 19-25 package Koha::Club::Template; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Template/EnrollmentField.pm (-1 lines)
Lines 19-25 package Koha::Club::Template::EnrollmentField; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Template/EnrollmentFields.pm (-1 lines)
Lines 19-25 package Koha::Club::Template::EnrollmentFields; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Template/Field.pm (-1 lines)
Lines 19-25 package Koha::Club::Template::Field; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Template/Fields.pm (-1 lines)
Lines 19-25 package Koha::Club::Template::Fields; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Club/Templates.pm (-1 lines)
Lines 19-25 package Koha::Club::Templates; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Clubs.pm (-1 lines)
Lines 19-25 package Koha::Clubs; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::DateUtils qw( dt_from_string );
24
use Koha::DateUtils qw( dt_from_string );
(-)a/Koha/Config.pm (-1 / +1 lines)
Lines 17-23 package Koha::Config; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use XML::LibXML ':libxml';
20
use XML::LibXML qw( XML_ELEMENT_NODE XML_TEXT_NODE );
21
21
22
# Default config file, if none is specified
22
# Default config file, if none is specified
23
use constant CONFIG_FNAME => "/etc/koha/koha-conf.xml";
23
use constant CONFIG_FNAME => "/etc/koha/koha-conf.xml";
(-)a/Koha/Config/SysPref.pm (-1 lines)
Lines 19-25 package Koha::Config::SysPref; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Config/SysPrefs.pm (-1 lines)
Lines 19-25 package Koha::Config::SysPrefs; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Course.pm (-1 lines)
Lines 17-23 package Koha::Course; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use base qw(Koha::Object);
21
use base qw(Koha::Object);
23
22
(-)a/Koha/Course/Instructor.pm (-1 lines)
Lines 17-23 package Koha::Course::Instructor; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use base qw(Koha::Object);
21
use base qw(Koha::Object);
23
22
(-)a/Koha/Course/Instructors.pm (-1 lines)
Lines 17-23 package Koha::Course::Instructors; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Course::Instructor;
21
use Koha::Course::Instructor;
23
22
(-)a/Koha/Course/Item.pm (-1 lines)
Lines 17-23 package Koha::Course::Item; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use base qw(Koha::Object);
21
use base qw(Koha::Object);
23
22
(-)a/Koha/Course/Items.pm (-1 lines)
Lines 17-23 package Koha::Course::Items; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Course::Item;
21
use Koha::Course::Item;
23
22
(-)a/Koha/Course/Reserve.pm (-1 lines)
Lines 17-23 package Koha::Course::Reserve; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use base qw(Koha::Object);
21
use base qw(Koha::Object);
23
22
(-)a/Koha/Course/Reserves.pm (-1 lines)
Lines 17-23 package Koha::Course::Reserves; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Course::Reserve;
21
use Koha::Course::Reserve;
23
22
(-)a/Koha/Courses.pm (-1 lines)
Lines 17-23 package Koha::Courses; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Course;
21
use Koha::Course;
23
22
(-)a/Koha/CoverImage.pm (-1 lines)
Lines 17-23 package Koha::CoverImage; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
use GD;
20
use GD;
22
21
23
use Koha::Database;
22
use Koha::Database;
(-)a/Koha/CoverImages.pm (-1 lines)
Lines 17-23 package Koha::CoverImages; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/CsvProfile.pm (-1 lines)
Lines 17-23 package Koha::CsvProfile; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/CsvProfiles.pm (-1 lines)
Lines 17-23 package Koha::CsvProfiles; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Database.pm (-1 lines)
Lines 33-39 Koha::Database Link Here
33
=cut
33
=cut
34
34
35
use Modern::Perl;
35
use Modern::Perl;
36
use Carp;
37
use C4::Context;
36
use C4::Context;
38
use base qw(Class::Accessor);
37
use base qw(Class::Accessor);
39
38
(-)a/Koha/Desk.pm (-1 lines)
Lines 18-24 package Koha::Desk; Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use Carp;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
23
(-)a/Koha/Desks.pm (-1 lines)
Lines 19-25 package Koha::Desks; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/EDI.pm (-8 / +24 lines)
Lines 21-48 use strict; Link Here
21
use warnings;
21
use warnings;
22
use base qw(Exporter);
22
use base qw(Exporter);
23
use utf8;
23
use utf8;
24
use Carp;
24
use Carp qw( carp );
25
use English qw{ -no_match_vars };
25
use English qw{ -no_match_vars };
26
use Business::ISBN;
26
use Business::ISBN;
27
use DateTime;
27
use DateTime;
28
use C4::Context;
28
use C4::Context;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string );
31
use C4::Acquisition qw( NewBasket ModOrder);
31
use C4::Acquisition qw( ModOrder NewBasket );
32
use C4::Suggestions qw( ModSuggestion );
32
use C4::Suggestions qw( ModSuggestion );
33
use C4::Biblio qw( AddBiblio TransformKohaToMarc GetMarcBiblio GetFrameworkCode GetMarcFromKohaField );
33
use C4::Biblio qw(
34
    AddBiblio
35
    GetFrameworkCode
36
    GetMarcFromKohaField
37
    TransformKohaToMarc
38
);
34
use Koha::Edifact::Order;
39
use Koha::Edifact::Order;
35
use Koha::Edifact;
40
use Koha::Edifact;
36
use C4::Log qw(logaction);
41
use C4::Log qw( logaction );
37
use Log::Log4perl;
42
use Log::Log4perl;
38
use Text::Unidecode;
43
use Text::Unidecode qw( unidecode );
39
use Koha::Plugins::Handler;
44
use Koha::Plugins::Handler;
40
use Koha::Acquisition::Baskets;
45
use Koha::Acquisition::Baskets;
41
use Koha::Acquisition::Booksellers;
46
use Koha::Acquisition::Booksellers;
42
47
43
our $VERSION = 1.1;
48
our $VERSION = 1.1;
44
our @EXPORT_OK =
49
45
  qw( process_quote process_invoice process_ordrsp create_edi_order get_edifact_ean );
50
our (@ISA, @EXPORT_OK);
51
BEGIN {
52
    require Exporter;
53
    @ISA = qw(Exporter);
54
    @EXPORT_OK = qw(
55
      process_quote
56
      process_invoice
57
      process_ordrsp
58
      create_edi_order
59
      get_edifact_ean
60
    );
61
};
46
62
47
sub create_edi_order {
63
sub create_edi_order {
48
    my $parameters = shift;
64
    my $parameters = shift;
(-)a/Koha/Edifact.pm (-3 / +2 lines)
Lines 19-27 package Koha::Edifact; Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use File::Slurp;
22
use File::Slurp qw( read_file );
23
use Carp;
23
use Carp qw( carp croak );
24
use Encode qw( from_to );
25
use Koha::Edifact::Segment;
24
use Koha::Edifact::Segment;
26
use Koha::Edifact::Message;
25
use Koha::Edifact::Message;
27
26
(-)a/Koha/Edifact/Line.pm (-1 / +1 lines)
Lines 23-29 use utf8; Link Here
23
23
24
use MARC::Record;
24
use MARC::Record;
25
use MARC::Field;
25
use MARC::Field;
26
use Carp;
26
use Carp qw( carp );
27
27
28
sub new {
28
sub new {
29
    my ( $class, $data_array_ref ) = @_;
29
    my ( $class, $data_array_ref ) = @_;
(-)a/Koha/Edifact/Order.pm (-4 / +3 lines)
Lines 21-32 use utf8; Link Here
21
# You should have received a copy of the GNU General Public License
21
# You should have received a copy of the GNU General Public License
22
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
# along with Koha; if not, see <http://www.gnu.org/licenses>.
23
23
24
use Carp;
24
use Carp qw( carp );
25
use DateTime;
25
use DateTime;
26
use Readonly;
26
use Readonly qw( Readonly );
27
use Business::ISBN;
28
use Koha::Database;
27
use Koha::Database;
29
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string );
30
use C4::Budgets qw( GetBudget );
29
use C4::Budgets qw( GetBudget );
31
30
32
use Koha::Acquisition::Orders;
31
use Koha::Acquisition::Orders;
(-)a/Koha/Edifact/Transport.pm (-5 / +4 lines)
Lines 21-35 use strict; Link Here
21
use warnings;
21
use warnings;
22
use utf8;
22
use utf8;
23
use DateTime;
23
use DateTime;
24
use Carp;
24
use Carp qw( carp );
25
use English qw{ -no_match_vars };
25
use English qw{ -no_match_vars };
26
use Net::FTP;
26
use Net::FTP;
27
use Net::SFTP::Foreign;
27
use Net::SFTP::Foreign;
28
use File::Slurp;
28
use File::Slurp qw( read_file );
29
use File::Copy;
29
use File::Copy qw( copy move );
30
use File::Basename qw( fileparse );
31
use Koha::Database;
30
use Koha::Database;
32
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string );
33
use Encode qw( from_to );
32
use Encode qw( from_to );
34
33
35
sub new {
34
sub new {
(-)a/Koha/Email.pm (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
22
23
use Email::Valid;
23
use Email::Valid;
24
use Email::MessageID;
24
use Email::MessageID;
25
use List::Util qw(pairs);
25
use List::Util qw( pairs );
26
26
27
use Koha::Exceptions;
27
use Koha::Exceptions;
28
28
(-)a/Koha/Exporter/Record.pm (-2 / +2 lines)
Lines 5-15 use MARC::File::XML; Link Here
5
use MARC::File::USMARC;
5
use MARC::File::USMARC;
6
6
7
use C4::AuthoritiesMarc;
7
use C4::AuthoritiesMarc;
8
use C4::Biblio;
8
use C4::Biblio qw( GetMarcFromKohaField );
9
use C4::Record;
9
use C4::Record;
10
use Koha::CsvProfiles;
10
use Koha::CsvProfiles;
11
use Koha::Logger;
11
use Koha::Logger;
12
use List::Util qw(all any);
12
use List::Util qw( all any );
13
13
14
sub _get_record_for_export {
14
sub _get_record_for_export {
15
    my ($params)           = @_;
15
    my ($params)           = @_;
(-)a/Koha/ExternalContent.pm (-1 / +1 lines)
Lines 18-24 Link Here
18
package Koha::ExternalContent;
18
package Koha::ExternalContent;
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp;
21
use Carp qw( croak );
22
use base qw(Class::Accessor);
22
use base qw(Class::Accessor);
23
23
24
use Koha;
24
use Koha;
(-)a/Koha/ExternalContent/OverDrive.pm (-1 / +1 lines)
Lines 18-24 Link Here
18
package Koha::ExternalContent::OverDrive;
18
package Koha::ExternalContent::OverDrive;
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp;
21
use Carp qw( croak );
22
22
23
use base qw(Koha::ExternalContent);
23
use base qw(Koha::ExternalContent);
24
use WebService::ILS::OverDrive::Patron;
24
use WebService::ILS::OverDrive::Patron;
(-)a/Koha/ExternalContent/RecordedBooks.pm (-1 / +1 lines)
Lines 18-24 Link Here
18
package Koha::ExternalContent::RecordedBooks;
18
package Koha::ExternalContent::RecordedBooks;
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp;
21
use Carp qw( croak );
22
22
23
use base qw(Koha::ExternalContent);
23
use base qw(Koha::ExternalContent);
24
use WebService::ILS::RecordedBooks::PartnerPatron;
24
use WebService::ILS::RecordedBooks::PartnerPatron;
(-)a/Koha/Filter/MARC/EmbedItemsAvailability.pm (-1 / +1 lines)
Lines 32-38 Filter to embed items not on loan count information into MARC records. Link Here
32
32
33
use Modern::Perl;
33
use Modern::Perl;
34
34
35
use C4::Biblio qw/GetMarcFromKohaField/;
35
use C4::Biblio qw( GetMarcFromKohaField );
36
use Koha::Items;
36
use Koha::Items;
37
37
38
use base qw(Koha::RecordProcessor::Base);
38
use base qw(Koha::RecordProcessor::Base);
(-)a/Koha/Filter/MARC/EmbedSeeFromHeadings.pm (-2 / +1 lines)
Lines 32-40 Filter to embed see from headings into MARC records. Link Here
32
32
33
use strict;
33
use strict;
34
use warnings;
34
use warnings;
35
use Carp;
36
use Koha::MetadataRecord::Authority;
35
use Koha::MetadataRecord::Authority;
37
use C4::Biblio qw/GetMarcFromKohaField/;
36
use C4::Biblio qw( GetMarcFromKohaField );
38
37
39
use base qw(Koha::RecordProcessor::Base);
38
use base qw(Koha::RecordProcessor::Base);
40
our $NAME = 'EmbedSeeFromHeadings';
39
our $NAME = 'EmbedSeeFromHeadings';
(-)a/Koha/Filter/MARC/Null.pm (-1 lines)
Lines 33-39 RecordProcessor. Link Here
33
33
34
use strict;
34
use strict;
35
use warnings;
35
use warnings;
36
use Carp;
37
36
38
use base qw(Koha::RecordProcessor::Base);
37
use base qw(Koha::RecordProcessor::Base);
39
our $NAME = 'Null';
38
our $NAME = 'Null';
(-)a/Koha/Filter/MARC/ViewPolicy.pm (-3 / +2 lines)
Lines 39-46 menu. Link Here
39
=cut
39
=cut
40
40
41
use Modern::Perl;
41
use Modern::Perl;
42
use Carp;
42
use C4::Biblio qw( GetMarcStructure );
43
use C4::Biblio;
44
43
45
use base qw(Koha::RecordProcessor::Base);
44
use base qw(Koha::RecordProcessor::Base);
46
our $NAME    = 'MARC_ViewPolicy';
45
our $NAME    = 'MARC_ViewPolicy';
Lines 86-92 sub filter { Link Here
86
        my $result        = $current_record;
85
        my $result        = $current_record;
87
        my $hide          = _should_hide_on_interface();
86
        my $hide          = _should_hide_on_interface();
88
87
89
        my $marcsubfieldstructure = GetMarcStructure( 0, $frameworkcode, { unsafe => 1 } );
88
        my $marcsubfieldstructure = C4::Biblio::GetMarcStructure( 0, $frameworkcode, { unsafe => 1 } );
90
89
91
        #if ($marcsubfieldstructure->{'000'}->{'@'}->{hidden}>0) {
90
        #if ($marcsubfieldstructure->{'000'}->{'@'}->{hidden}>0) {
92
        # LDR field is excluded from $current_record->fields().
91
        # LDR field is excluded from $current_record->fields().
(-)a/Koha/Hold.pm (-6 / +5 lines)
Lines 20-35 package Koha::Hold; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Carp;
23
use Data::Dumper qw( Dumper );
24
use Data::Dumper qw(Dumper);
24
use List::MoreUtils qw( any );
25
use List::MoreUtils qw(any);
26
25
27
use C4::Context qw(preference);
26
use C4::Context qw(preference);
28
use C4::Letters;
27
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
29
use C4::Log;
28
use C4::Log qw( logaction );
30
29
31
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
32
use Koha::DateUtils qw(dt_from_string output_pref);
31
use Koha::DateUtils qw( dt_from_string );
33
use Koha::Patrons;
32
use Koha::Patrons;
34
use Koha::Biblios;
33
use Koha::Biblios;
35
use Koha::Items;
34
use Koha::Items;
(-)a/Koha/Holds.pm (-1 lines)
Lines 19-25 package Koha::Holds; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/I18N.pm (-3 / +10 lines)
Lines 19-32 package Koha::I18N; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
23
use C4::Languages;
22
use C4::Languages;
24
use C4::Context;
23
use C4::Context;
25
24
26
use Encode;
25
use Encode;
27
use List::Util qw( first );
26
use List::Util qw( first );
28
use Locale::Messages qw(:locale_h LC_MESSAGES);
27
use Locale::Messages qw(
29
use POSIX qw( setlocale );
28
    bindtextdomain
29
    gettext
30
    LC_MESSAGES
31
    ngettext
32
    npgettext
33
    pgettext
34
    textdomain
35
);
36
use POSIX;
30
use Koha::Cache::Memory::Lite;
37
use Koha::Cache::Memory::Lite;
31
38
32
use parent 'Exporter';
39
use parent 'Exporter';
(-)a/Koha/Illrequest.pm (-7 / +4 lines)
Lines 19-34 package Koha::Illrequest; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Clone 'clone';
22
use Clone qw( clone );
23
use File::Basename qw( basename );
23
use Try::Tiny qw( catch try );
24
use Encode qw( encode );
25
use Try::Tiny;
26
use DateTime;
24
use DateTime;
27
25
28
use C4::Letters;
26
use C4::Letters;
29
use C4::Members;
30
use Koha::Database;
27
use Koha::Database;
31
use Koha::DateUtils qw/ dt_from_string /;
28
use Koha::DateUtils qw( dt_from_string );
32
use Koha::Exceptions::Ill;
29
use Koha::Exceptions::Ill;
33
use Koha::Illcomments;
30
use Koha::Illcomments;
34
use Koha::Illrequestattributes;
31
use Koha::Illrequestattributes;
Lines 41-47 use Koha::Items; Link Here
41
use Koha::ItemTypes;
38
use Koha::ItemTypes;
42
use Koha::Libraries;
39
use Koha::Libraries;
43
40
44
use C4::Circulation qw( CanBookBeIssued AddIssue  );
41
use C4::Circulation qw( CanBookBeIssued AddIssue );
45
42
46
use base qw(Koha::Object);
43
use base qw(Koha::Object);
47
44
(-)a/Koha/Illrequest/Config.pm (-1 / +1 lines)
Lines 19-25 package Koha::Illrequest::Config; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use File::Basename qw/basename/;
22
use File::Basename qw( basename );
23
23
24
use C4::Context;
24
use C4::Context;
25
25
(-)a/Koha/Illrequest/Logger.pm (-3 / +2 lines)
Lines 18-27 package Koha::Illrequest::Logger; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use JSON qw( to_json from_json );
21
use JSON qw( from_json to_json );
22
use Time::Local;
23
22
24
use C4::Koha;
23
use C4::Koha qw( GetAuthorisedValues );
25
use C4::Context;
24
use C4::Context;
26
use C4::Templates;
25
use C4::Templates;
27
use C4::Log qw( logaction );
26
use C4::Log qw( logaction );
(-)a/Koha/Item.pm (-6 / +4 lines)
Lines 19-36 package Koha::Item; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use List::MoreUtils qw( any );
23
use List::MoreUtils qw(any);
23
use Data::Dumper qw( Dumper );
24
use Data::Dumper;
25
use Try::Tiny;
26
24
27
use Koha::Database;
25
use Koha::Database;
28
use Koha::DateUtils qw( dt_from_string );
26
use Koha::DateUtils qw( dt_from_string );
29
27
30
use C4::Context;
28
use C4::Context;
31
use C4::Circulation;
29
use C4::Circulation qw( GetBranchItemRule );
32
use C4::Reserves;
30
use C4::Reserves;
33
use C4::ClassSource; # FIXME We would like to avoid that
31
use C4::ClassSource qw( GetClassSort );
34
use C4::Log qw( logaction );
32
use C4::Log qw( logaction );
35
33
36
use Koha::Checkouts;
34
use Koha::Checkouts;
(-)a/Koha/Item/Search/Field.pm (-9 / +13 lines)
Lines 1-15 Link Here
1
package Koha::Item::Search::Field;
1
package Koha::Item::Search::Field;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use base qw( Exporter );
4
5
5
our (@ISA, @EXPORT_OK);
6
our @EXPORT_OK = qw(
6
BEGIN {
7
    AddItemSearchField
7
    require Exporter;
8
    ModItemSearchField
8
    @ISA = qw(Exporter);
9
    DelItemSearchField
9
    @EXPORT_OK = qw(
10
    GetItemSearchField
10
        AddItemSearchField
11
    GetItemSearchFields
11
        ModItemSearchField
12
);
12
        DelItemSearchField
13
        GetItemSearchField
14
        GetItemSearchFields
15
    );
16
};
13
17
14
use C4::Context;
18
use C4::Context;
15
19
(-)a/Koha/Item/Transfer.pm (-3 / +2 lines)
Lines 17-28 package Koha::Item::Transfer; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use C4::Items;
21
use C4::Items qw( CartToShelf ModDateLastSeen );
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Exceptions::Item::Transfer;
25
use Koha::Exceptions::Item::Transfer;
27
26
28
use base qw(Koha::Object);
27
use base qw(Koha::Object);
(-)a/Koha/Item/Transfer/Limit.pm (-1 lines)
Lines 18-24 package Koha::Item::Transfer::Limit; Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use Carp;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
23
(-)a/Koha/Item/Transfers.pm (-1 lines)
Lines 17-23 package Koha::Item::Transfers; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/ItemType.pm (-2 / +1 lines)
Lines 17-25 package Koha::ItemType; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use C4::Koha;
21
use C4::Koha qw( getitemtypeimagelocation );
23
use C4::Languages;
22
use C4::Languages;
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::CirculationRules;
24
use Koha::CirculationRules;
(-)a/Koha/ItemTypes.pm (-1 lines)
Lines 17-23 package Koha::ItemTypes; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use C4::Languages;
21
use C4::Languages;
23
22
(-)a/Koha/Items.pm (-1 lines)
Lines 19-25 package Koha::Items; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/KeyboardShortcut.pm (-1 lines)
Lines 17-23 package Koha::KeyboardShortcut; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/KeyboardShortcuts.pm (-1 lines)
Lines 17-23 package Koha::KeyboardShortcuts; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Libraries.pm (-1 lines)
Lines 19-25 package Koha::Libraries; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use C4::Context;
23
use C4::Context;
25
24
(-)a/Koha/Library.pm (-1 lines)
Lines 19-25 package Koha::Library; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use C4::Context;
23
use C4::Context;
25
24
(-)a/Koha/Library/Group.pm (-2 / +1 lines)
Lines 19-28 package Koha::Library::Group; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::DateUtils qw(dt_from_string);
24
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Libraries;
25
use Koha::Libraries;
27
26
28
use base qw(Koha::Object);
27
use base qw(Koha::Object);
(-)a/Koha/Library/Groups.pm (-1 lines)
Lines 19-25 package Koha::Library::Groups; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Library/OverDriveInfo.pm (-1 lines)
Lines 17-23 package Koha::Library::OverDriveInfo; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Library/OverDriveInfos.pm (-1 lines)
Lines 17-23 package Koha::Library::OverDriveInfos; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Linktracker.pm (-1 lines)
Lines 32-38 Koha::Linktracker Link Here
32
=cut
32
=cut
33
33
34
use Modern::Perl;
34
use Modern::Perl;
35
use Carp;
36
use C4::Context;
35
use C4::Context;
37
use base qw(Class::Accessor);
36
use base qw(Class::Accessor);
38
37
(-)a/Koha/List/Patron.pm (-1 / +1 lines)
Lines 27-33 Koha::List::Patron - Management of lists of patrons Link Here
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
29
30
use Carp;
30
use Carp qw( carp croak );
31
31
32
use Koha::Database;
32
use Koha::Database;
33
33
(-)a/Koha/Logger.pm (-1 lines)
Lines 37-43 Koha::Logger Link Here
37
use Modern::Perl;
37
use Modern::Perl;
38
38
39
use Log::Log4perl;
39
use Log::Log4perl;
40
use Carp;
41
40
42
use C4::Context;
41
use C4::Context;
43
42
(-)a/Koha/MarcSubfieldStructure.pm (-1 lines)
Lines 17-23 package Koha::MarcSubfieldStructure; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/MarcSubfieldStructures.pm (-1 lines)
Lines 17-23 package Koha::MarcSubfieldStructures; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/MessageAttribute.pm (-1 lines)
Lines 19-25 package Koha::MessageAttribute; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use base qw(Koha::Object);
23
use base qw(Koha::Object);
25
24
(-)a/Koha/MessageAttributes.pm (-1 lines)
Lines 19-25 package Koha::MessageAttributes; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use base qw(Koha::Objects);
23
use base qw(Koha::Objects);
25
use Koha::MessageAttribute;
24
use Koha::MessageAttribute;
(-)a/Koha/MetaSearcher.pm (-2 / +2 lines)
Lines 22-35 use Modern::Perl; Link Here
22
use base 'Class::Accessor';
22
use base 'Class::Accessor';
23
23
24
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
24
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
25
use C4::Search qw(); # Purely for new_record_from_zebra
25
use C4::Search qw( new_record_from_zebra );
26
use DBIx::Class::ResultClass::HashRefInflator;
26
use DBIx::Class::ResultClass::HashRefInflator;
27
use IO::Select;
27
use IO::Select;
28
use Koha::Caches;
28
use Koha::Caches;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::MetadataRecord;
30
use Koha::MetadataRecord;
31
use MARC::File::XML;
31
use MARC::File::XML;
32
use Storable qw( store_fd fd_retrieve );
32
use Storable qw( fd_retrieve store_fd );
33
use Time::HiRes qw( clock_gettime CLOCK_MONOTONIC );
33
use Time::HiRes qw( clock_gettime CLOCK_MONOTONIC );
34
use UUID;
34
use UUID;
35
use ZOOM;
35
use ZOOM;
(-)a/Koha/MetadataRecord.pm (-1 / +1 lines)
Lines 34-40 and authority) records in Koha. Link Here
34
34
35
use Modern::Perl;
35
use Modern::Perl;
36
36
37
use Carp;
37
use Carp qw( carp );
38
use C4::Biblio;
38
use C4::Biblio;
39
use Koha::Util::MARC;
39
use Koha::Util::MARC;
40
40
(-)a/Koha/MetadataRecord/Authority.pm (-2 / +1 lines)
Lines 33-43 Authority data. Link Here
33
33
34
use strict;
34
use strict;
35
use warnings;
35
use warnings;
36
use Carp;
37
use C4::Context;
36
use C4::Context;
38
use MARC::Record;
37
use MARC::Record;
39
use MARC::File::XML;
38
use MARC::File::XML;
40
use C4::Charset;
39
use C4::Charset qw( StripNonXmlChars );
41
use Koha::Util::MARC;
40
use Koha::Util::MARC;
42
41
43
use base qw(Koha::MetadataRecord);
42
use base qw(Koha::MetadataRecord);
(-)a/Koha/News.pm (-1 lines)
Lines 19-25 package Koha::News; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::Exceptions;
24
use Koha::Exceptions;
(-)a/Koha/NewsItem.pm (-2 / +1 lines)
Lines 19-28 package Koha::NewsItem; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Libraries;
25
use Koha::Libraries;
27
use Koha::Patrons;
26
use Koha::Patrons;
28
27
(-)a/Koha/Notice/Message.pm (-1 lines)
Lines 17-23 package Koha::Notice::Message; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Notice/Messages.pm (-1 lines)
Lines 17-23 package Koha::Notice::Messages; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Notice/Template.pm (-1 lines)
Lines 17-23 package Koha::Notice::Template; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Notice/Templates.pm (-1 lines)
Lines 17-23 package Koha::Notice::Templates; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/OAI/Server/Description.pm (-1 / +1 lines)
Lines 20-26 package Koha::OAI::Server::Description; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use HTTP::OAI;
22
use HTTP::OAI;
23
use HTTP::OAI::SAXHandler qw/ :SAX /;
23
use HTTP::OAI::SAXHandler qw( g_data_element );
24
24
25
25
26
sub new {
26
sub new {
(-)a/Koha/OAI/Server/GetRecord.pm (-2 / +1 lines)
Lines 20-27 package Koha::OAI::Server::GetRecord; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use HTTP::OAI;
22
use HTTP::OAI;
23
use C4::Biblio;
23
use C4::OAI::Sets qw( GetOAISetsBiblio );
24
use C4::OAI::Sets;
25
use MARC::File::XML;
24
use MARC::File::XML;
26
25
27
use base ("HTTP::OAI::GetRecord");
26
use base ("HTTP::OAI::GetRecord");
(-)a/Koha/OAI/Server/ListBase.pm (-2 / +1 lines)
Lines 28-39 Koha::OAI::Server::ListBase contains OAI-PMH functions shared by ListIdentifiers Link Here
28
=cut
28
=cut
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
use C4::Biblio;
32
use HTTP::OAI;
31
use HTTP::OAI;
33
use Koha::OAI::Server::ResumptionToken;
32
use Koha::OAI::Server::ResumptionToken;
34
use Koha::OAI::Server::Record;
33
use Koha::OAI::Server::Record;
35
use Koha::OAI::Server::DeletedRecord;
34
use Koha::OAI::Server::DeletedRecord;
36
use C4::OAI::Sets;
35
use C4::OAI::Sets qw( GetOAISetBySpec GetOAISetsBiblio );
37
use MARC::File::XML;
36
use MARC::File::XML;
38
37
39
sub GetRecords {
38
sub GetRecords {
(-)a/Koha/OAI/Server/ListSets.pm (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use HTTP::OAI;
22
use HTTP::OAI;
23
use Koha::OAI::Server::ResumptionToken;
23
use Koha::OAI::Server::ResumptionToken;
24
use Koha::OAI::Server::Description;
24
use Koha::OAI::Server::Description;
25
use C4::OAI::Sets;
25
use C4::OAI::Sets qw( GetOAISets );
26
26
27
use base ("HTTP::OAI::ListSets");
27
use base ("HTTP::OAI::ListSets");
28
28
(-)a/Koha/OAI/Server/Repository.pm (-2 / +2 lines)
Lines 21-27 package Koha::OAI::Server::Repository; Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use HTTP::OAI;
23
use HTTP::OAI;
24
use HTTP::OAI::Repository qw/:validate/;
24
use HTTP::OAI::Repository qw( validate_request );
25
25
26
use base ("HTTP::OAI::Repository");
26
use base ("HTTP::OAI::Repository");
27
27
Lines 35-41 use XML::SAX::Writer; Link Here
35
use YAML::XS;
35
use YAML::XS;
36
use CGI qw/:standard -oldstyle_urls/;
36
use CGI qw/:standard -oldstyle_urls/;
37
use C4::Context;
37
use C4::Context;
38
use C4::Biblio;
38
use C4::Biblio qw( GetMarcBiblio );
39
use Koha::XSLT::Base;
39
use Koha::XSLT::Base;
40
40
41
=head1 NAME
41
=head1 NAME
(-)a/Koha/Object.pm (-3 / +3 lines)
Lines 20-33 package Koha::Object; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Carp;
23
use Carp qw( croak );
24
use Mojo::JSON;
24
use Mojo::JSON;
25
use Scalar::Util qw( blessed looks_like_number );
25
use Scalar::Util qw( blessed looks_like_number );
26
use Try::Tiny;
26
use Try::Tiny qw( catch try );
27
27
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::Exceptions::Object;
29
use Koha::Exceptions::Object;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::Object::Message;
31
use Koha::Object::Message;
32
32
33
=head1 NAME
33
=head1 NAME
(-)a/Koha/Object/Limit/Library.pm (-1 / +1 lines)
Lines 21-27 use Koha::Database; Link Here
21
use Koha::Exceptions;
21
use Koha::Exceptions;
22
use Koha::Libraries;
22
use Koha::Libraries;
23
23
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
=head1 NAME
26
=head1 NAME
27
27
(-)a/Koha/Objects.pm (-1 / +1 lines)
Lines 19-25 package Koha::Objects; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use Carp qw( carp );
23
use List::MoreUtils qw( none );
23
use List::MoreUtils qw( none );
24
use Class::Inspector;
24
use Class::Inspector;
25
25
(-)a/Koha/Old/Holds.pm (-1 lines)
Lines 19-25 package Koha::Old::Holds; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Patron.pm (-5 / +4 lines)
Lines 20-40 package Koha::Patron; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Carp;
24
use List::MoreUtils qw( any uniq );
23
use List::MoreUtils qw( any uniq );
25
use JSON qw( to_json );
24
use JSON qw( to_json );
26
use Unicode::Normalize;
25
use Unicode::Normalize qw( NFKD );
27
26
28
use C4::Context;
27
use C4::Context;
29
use C4::Log;
28
use C4::Log qw( logaction );
30
use Koha::Account;
29
use Koha::Account;
31
use Koha::ArticleRequests;
30
use Koha::ArticleRequests;
32
use C4::Letters qw( GetPreparedLetter EnqueueLetter );
31
use C4::Letters;
33
use Koha::AuthUtils;
32
use Koha::AuthUtils;
34
use Koha::Checkouts;
33
use Koha::Checkouts;
35
use Koha::Club::Enrollments;
34
use Koha::Club::Enrollments;
36
use Koha::Database;
35
use Koha::Database;
37
use Koha::DateUtils;
36
use Koha::DateUtils qw( dt_from_string );
38
use Koha::Exceptions::Password;
37
use Koha::Exceptions::Password;
39
use Koha::Holds;
38
use Koha::Holds;
40
use Koha::Old::Checkouts;
39
use Koha::Old::Checkouts;
(-)a/Koha/Patron/Category.pm (-3 / +2 lines)
Lines 17-29 package Koha::Patron::Category; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
20
use List::MoreUtils qw( any );
21
use List::MoreUtils qw(any);
22
21
23
use C4::Members::Messaging;
22
use C4::Members::Messaging;
24
23
25
use Koha::Database;
24
use Koha::Database;
26
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string );
27
26
28
use base qw(Koha::Object Koha::Object::Limit::Library);
27
use base qw(Koha::Object Koha::Object::Limit::Library);
29
28
(-)a/Koha/Patron/Discharge.pm (-3 / +3 lines)
Lines 2-12 package Koha::Patron::Discharge; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI;
4
use CGI;
5
use File::Temp qw( :POSIX );
5
use File::Temp qw( tmpnam );
6
use Carp;
6
use Carp qw( carp );
7
7
8
use C4::Templates qw ( gettemplate );
8
use C4::Templates qw ( gettemplate );
9
use C4::Letters qw ( GetPreparedLetter );
9
use C4::Letters qw( GetPreparedLetter );
10
10
11
use Koha::Database;
11
use Koha::Database;
12
use Koha::DateUtils qw( dt_from_string output_pref );
12
use Koha::DateUtils qw( dt_from_string output_pref );
(-)a/Koha/Patron/Image.pm (-1 lines)
Lines 17-23 package Koha::Patron::Image; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Patron/Images.pm (-1 lines)
Lines 17-23 package Koha::Patron::Images; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Patron/Message.pm (-2 / +1 lines)
Lines 17-26 package Koha::Patron::Message; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use C4::Context;
21
use C4::Context;
23
use C4::Log qw( logaction );
22
use C4::Log;
24
23
25
use Koha::Database;
24
use Koha::Database;
26
25
(-)a/Koha/Patron/Messages.pm (-1 lines)
Lines 17-23 package Koha::Patron::Messages; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Patron/Modification.pm (-4 / +3 lines)
Lines 19-25 package Koha::Patron::Modification; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::Exceptions::Patron::Modification;
24
use Koha::Exceptions::Patron::Modification;
Lines 27-35 use Koha::Patron::Attribute; Link Here
27
use Koha::Patron::Attributes;
26
use Koha::Patron::Attributes;
28
use Koha::Patron::Modifications;
27
use Koha::Patron::Modifications;
29
28
30
use JSON;
29
use JSON qw( from_json );
31
use List::MoreUtils qw( uniq any );
30
use List::MoreUtils qw( any uniq );
32
use Try::Tiny;
31
use Try::Tiny qw( catch try );
33
32
34
use base qw(Koha::Object);
33
use base qw(Koha::Object);
35
34
(-)a/Koha/Patron/Modifications.pm (-2 / +2 lines)
Lines 29-36 use C4::Context; Link Here
29
use Koha::Patron::Attribute;
29
use Koha::Patron::Attribute;
30
use Koha::Patron::Modification;
30
use Koha::Patron::Modification;
31
31
32
use JSON;
32
use JSON qw( from_json );
33
use List::Util qw /any none/;
33
use List::Util qw( none );
34
34
35
use base qw(Koha::Objects);
35
use base qw(Koha::Objects);
36
36
(-)a/Koha/Patron/Password/Recovery.pm (-5 / +4 lines)
Lines 20-34 package Koha::Patron::Password::Recovery; Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Context;
21
use C4::Context;
22
use C4::Letters;
22
use C4::Letters;
23
use Crypt::Eksblowfish::Bcrypt qw(en_base64);
23
use Crypt::Eksblowfish::Bcrypt qw( en_base64 );
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
25
26
use vars qw(@ISA @EXPORT);
27
25
26
our (@ISA, @EXPORT_OK);
28
BEGIN {
27
BEGIN {
29
    require Exporter;
28
    require Exporter;
30
    @ISA = qw(Exporter);
29
    @ISA = qw(Exporter);
31
    push @EXPORT, qw(
30
    @EXPORT_OK = qw(
32
      &ValidateBorrowernumber
31
      &ValidateBorrowernumber
33
      &SendPasswordRecoveryEmail
32
      &SendPasswordRecoveryEmail
34
      &GetValidLinkInfo
33
      &GetValidLinkInfo
(-)a/Koha/Patron/Relationship.pm (-2 / +1 lines)
Lines 17-25 package Koha::Patron::Relationship; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
use List::MoreUtils qw( any );
20
use List::MoreUtils qw( any );
22
use Try::Tiny;
21
use Try::Tiny qw( catch try );
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::Exceptions::Patron::Relationship;
24
use Koha::Exceptions::Patron::Relationship;
(-)a/Koha/Patron/Relationships.pm (-1 lines)
Lines 17-23 package Koha::Patron::Relationships; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
use List::MoreUtils qw( uniq );
20
use List::MoreUtils qw( uniq );
22
21
23
use Koha::Database;
22
use Koha::Database;
(-)a/Koha/Patrons.pm (-3 / +1 lines)
Lines 20-36 package Koha::Patrons; Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Carp;
24
23
25
use Koha::Database;
24
use Koha::Database;
26
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string );
27
26
28
use Koha::ArticleRequests;
27
use Koha::ArticleRequests;
29
use Koha::ArticleRequest::Status;
28
use Koha::ArticleRequest::Status;
30
use Koha::Patron;
29
use Koha::Patron;
31
use Koha::Exceptions::Patron;
30
use Koha::Exceptions::Patron;
32
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
33
use Date::Calc qw( Today Add_Delta_YMD );
34
32
35
use base qw(Koha::Objects);
33
use base qw(Koha::Objects);
36
34
(-)a/Koha/Patrons/Import.pm (-6 / +5 lines)
Lines 17-36 package Koha::Patrons::Import; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Moo;
19
use Moo;
20
use namespace::clean;
21
20
22
use Carp;
21
use Carp qw( carp );
23
use Text::CSV;
22
use Text::CSV;
24
use Encode qw( decode_utf8 );
23
use Encode qw( decode_utf8 );
25
use Try::Tiny;
24
use Try::Tiny qw( catch try );
26
25
27
use C4::Members;
26
use C4::Members qw( checkcardnumber );
28
27
29
use Koha::Libraries;
28
use Koha::Libraries;
30
use Koha::Patrons;
29
use Koha::Patrons;
31
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
32
use Koha::Patron::Debarments;
31
use Koha::Patron::Debarments qw( AddDebarment GetDebarments );
33
use Koha::DateUtils;
32
use Koha::DateUtils qw( dt_from_string output_pref );
34
33
35
=head1 NAME
34
=head1 NAME
36
35
(-)a/Koha/Plugins.pm (-4 / +5 lines)
Lines 19-31 package Koha::Plugins; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Array::Utils qw(array_minus);
22
use Array::Utils qw( array_minus );
23
use Class::Inspector;
23
use Class::Inspector;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
use Module::Load::Conditional qw(can_load);
25
use Module::Load::Conditional qw( can_load );
26
use Module::Load qw(load);
26
use Module::Load;
27
use Module::Pluggable search_path => ['Koha::Plugin'], except => qr/::Edifact(|::Line|::Message|::Order|::Segment|::Transport)$/;
27
use Module::Pluggable search_path => ['Koha::Plugin'], except => qr/::Edifact(|::Line|::Message|::Order|::Segment|::Transport)$/;
28
28
29
29
use C4::Context;
30
use C4::Context;
30
use C4::Output;
31
use C4::Output;
31
use Koha::Plugins::Methods;
32
use Koha::Plugins::Methods;
(-)a/Koha/Plugins/Base.pm (-4 / +3 lines)
Lines 19-32 package Koha::Plugins::Base; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Module::Pluggable require => 1;
22
use Cwd qw( abs_path );
23
use Cwd qw(abs_path);
23
use List::Util qw( max );
24
use List::Util qw(max);
25
24
26
use base qw{Module::Bundled::Files};
25
use base qw{Module::Bundled::Files};
27
26
28
use C4::Context;
27
use C4::Context;
29
use C4::Output qw(output_with_http_headers output_html_with_http_headers);
28
use C4::Output qw( output_with_http_headers );
30
29
31
=head1 NAME
30
=head1 NAME
32
31
(-)a/Koha/Plugins/Handler.pm (-3 / +3 lines)
Lines 19-28 package Koha::Plugins::Handler; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Array::Utils qw(array_minus);
22
use Array::Utils qw( array_minus );
23
use File::Path qw(remove_tree);
23
use File::Path qw( remove_tree );
24
24
25
use Module::Load qw(load);
25
use Module::Load qw( load );
26
26
27
use C4::Context;
27
use C4::Context;
28
use Koha::Plugins::Methods;
28
use Koha::Plugins::Methods;
(-)a/Koha/Plugins/Method.pm (-1 lines)
Lines 17-23 package Koha::Plugins::Method; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Plugins/Methods.pm (-1 lines)
Lines 17-23 package Koha::Plugins::Methods; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/PseudonymizedTransaction.pm (-2 / +1 lines)
Lines 16-23 package Koha::PseudonymizedTransaction; Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
18
19
use Carp;
19
use Crypt::Eksblowfish::Bcrypt qw( bcrypt );
20
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64);
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Exceptions::Config;
22
use Koha::Exceptions::Config;
(-)a/Koha/PseudonymizedTransactions.pm (-1 lines)
Lines 16-22 package Koha::PseudonymizedTransactions; Link Here
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
18
19
use Carp;
20
19
21
use Koha::Database;
20
use Koha::Database;
22
use Koha::PseudonymizedTransaction;
21
use Koha::PseudonymizedTransaction;
(-)a/Koha/Quote.pm (-1 lines)
Lines 16-22 package Koha::Quote; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Carp;
20
19
21
use Koha::Database;
20
use Koha::Database;
22
use Koha::Quotes;
21
use Koha::Quotes;
(-)a/Koha/Quotes.pm (-2 / +1 lines)
Lines 16-25 package Koha::Quotes; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Carp;
20
19
21
use Koha::Database;
20
use Koha::Database;
22
use Koha::DateUtils qw(dt_from_string);
21
use Koha::DateUtils qw( dt_from_string );
23
use Koha::Quote;
22
use Koha::Quote;
24
23
25
use base qw(Koha::Objects);
24
use base qw(Koha::Objects);
(-)a/Koha/REST/Plugin/PluginRoutes.pm (-2 / +2 lines)
Lines 23-30 use Koha::Exceptions::Plugin; Link Here
23
use Koha::Plugins;
23
use Koha::Plugins;
24
use Koha::Logger;
24
use Koha::Logger;
25
25
26
use Clone qw(clone);
26
use Clone qw( clone );
27
use Try::Tiny;
27
use Try::Tiny qw( catch try );
28
28
29
=head1 NAME
29
=head1 NAME
30
30
(-)a/Koha/REST/Plugin/Query.pm (-3 / +3 lines)
Lines 18-26 package Koha::REST::Plugin::Query; Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Mojo::Base 'Mojolicious::Plugin';
20
use Mojo::Base 'Mojolicious::Plugin';
21
use List::MoreUtils qw(any);
21
use List::MoreUtils qw( any );
22
use Scalar::Util qw(reftype);
22
use Scalar::Util qw( reftype );
23
use JSON qw(decode_json);
23
use JSON qw( decode_json );
24
24
25
use Koha::Exceptions;
25
use Koha::Exceptions;
26
26
(-)a/Koha/REST/V1.pm (-1 / +1 lines)
Lines 23-29 use C4::Context; Link Here
23
use Koha::Logger;
23
use Koha::Logger;
24
24
25
use JSON::Validator::OpenAPI::Mojolicious;
25
use JSON::Validator::OpenAPI::Mojolicious;
26
use Try::Tiny;
26
use Try::Tiny qw( catch try );
27
27
28
=head1 NAME
28
=head1 NAME
29
29
(-)a/Koha/REST/V1/Acquisitions/Funds.pm (-1 / +1 lines)
Lines 21-27 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::Acquisition::Funds;
22
use Koha::Acquisition::Funds;
23
23
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
=head1 NAME
26
=head1 NAME
27
27
(-)a/Koha/REST/V1/Acquisitions/Orders.pm (-4 / +2 lines)
Lines 20-31 use Modern::Perl; Link Here
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Koha::Acquisition::Orders;
22
use Koha::Acquisition::Orders;
23
use Koha::DateUtils;
24
23
25
use Clone 'clone';
24
use Clone qw( clone );
26
use JSON qw(decode_json);
27
use Scalar::Util qw( blessed );
25
use Scalar::Util qw( blessed );
28
use Try::Tiny;
26
use Try::Tiny qw( catch try );
29
27
30
=head1 NAME
28
=head1 NAME
31
29
(-)a/Koha/REST/V1/Acquisitions/Vendors.pm (-1 / +1 lines)
Lines 21-27 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::Acquisition::Booksellers;
22
use Koha::Acquisition::Booksellers;
23
23
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
=head1 NAME
26
=head1 NAME
27
27
(-)a/Koha/REST/V1/AdvancedEditorMacro.pm (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
use Mojo::Base 'Mojolicious::Controller';
19
use Mojo::Base 'Mojolicious::Controller';
20
use Koha::AdvancedEditorMacros;
20
use Koha::AdvancedEditorMacros;
21
21
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
=head1 Name
24
=head1 Name
25
25
(-)a/Koha/REST/V1/Auth.pm (-2 / +2 lines)
Lines 38-47 use Koha::Exceptions; Link Here
38
use Koha::Exceptions::Authentication;
38
use Koha::Exceptions::Authentication;
39
use Koha::Exceptions::Authorization;
39
use Koha::Exceptions::Authorization;
40
40
41
use MIME::Base64;
41
use MIME::Base64 qw( decode_base64 );
42
use Module::Load::Conditional;
42
use Module::Load::Conditional;
43
use Scalar::Util qw( blessed );
43
use Scalar::Util qw( blessed );
44
use Try::Tiny;
44
use Try::Tiny qw( catch try );
45
45
46
=head1 NAME
46
=head1 NAME
47
47
(-)a/Koha/REST/V1/Biblios.pm (-3 / +3 lines)
Lines 21-32 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::Biblios;
22
use Koha::Biblios;
23
use Koha::RecordProcessor;
23
use Koha::RecordProcessor;
24
use C4::Biblio qw(DelBiblio);
24
use C4::Biblio qw( DelBiblio );
25
25
26
use List::MoreUtils qw(any);
26
use List::MoreUtils qw( any );
27
use MARC::Record::MiJ;
27
use MARC::Record::MiJ;
28
28
29
use Try::Tiny;
29
use Try::Tiny qw( catch try );
30
30
31
=head1 API
31
=head1 API
32
32
(-)a/Koha/REST/V1/CashRegisters/Cashups.pm (-2 / +1 lines)
Lines 19-26 use Modern::Perl; Link Here
19
19
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Scalar::Util qw(blessed);
22
use Try::Tiny qw( catch try );
23
use Try::Tiny;
24
23
25
use Koha::Cash::Registers;
24
use Koha::Cash::Registers;
26
25
(-)a/Koha/REST/V1/Checkouts.pm (-2 / +2 lines)
Lines 22-32 use Mojo::JSON; Link Here
22
22
23
use C4::Auth qw( haspermission );
23
use C4::Auth qw( haspermission );
24
use C4::Context;
24
use C4::Context;
25
use C4::Circulation;
25
use C4::Circulation qw( AddRenewal );
26
use Koha::Checkouts;
26
use Koha::Checkouts;
27
use Koha::Old::Checkouts;
27
use Koha::Old::Checkouts;
28
28
29
use Try::Tiny;
29
use Try::Tiny qw( catch try );
30
30
31
=head1 NAME
31
=head1 NAME
32
32
(-)a/Koha/REST/V1/CirculationRules.pm (-1 lines)
Lines 21-27 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::CirculationRules;
22
use Koha::CirculationRules;
23
23
24
use Try::Tiny;
25
24
26
=head1 API
25
=head1 API
27
26
(-)a/Koha/REST/V1/Cities.pm (-1 / +1 lines)
Lines 21-27 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::Cities;
22
use Koha::Cities;
23
23
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
=head1 API
26
=head1 API
27
27
(-)a/Koha/REST/V1/Clubs/Holds.pm (-5 / +3 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use C4::Biblio;
23
use C4::Reserves;
22
use C4::Reserves;
24
23
25
use Koha::Items;
24
use Koha::Items;
Lines 27-37 use Koha::Patrons; Link Here
27
use Koha::Holds;
26
use Koha::Holds;
28
use Koha::Clubs;
27
use Koha::Clubs;
29
use Koha::Club::Hold;
28
use Koha::Club::Hold;
30
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
31
30
32
use Scalar::Util qw(blessed);
31
use Scalar::Util qw( blessed );
33
use Try::Tiny;
32
use Try::Tiny qw( catch try );
34
use List::Util 'shuffle';
35
33
36
=head1 API
34
=head1 API
37
35
(-)a/Koha/REST/V1/Config/SMTP/Servers.pm (-1 / +1 lines)
Lines 21-27 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::SMTP::Servers;
22
use Koha::SMTP::Servers;
23
23
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
=head1 API
26
=head1 API
27
27
(-)a/Koha/REST/V1/Holds.pm (-5 / +4 lines)
Lines 19-36 use Modern::Perl; Link Here
19
19
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Mojo::JSON qw(decode_json);
22
use Mojo::JSON;
23
23
24
use C4::Biblio;
25
use C4::Reserves;
24
use C4::Reserves;
26
25
27
use Koha::Items;
26
use Koha::Items;
28
use Koha::Patrons;
27
use Koha::Patrons;
29
use Koha::Holds;
28
use Koha::Holds;
30
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
31
30
32
use List::MoreUtils qw(any);
31
use List::MoreUtils qw( any );
33
use Try::Tiny;
32
use Try::Tiny qw( catch try );
34
33
35
=head1 API
34
=head1 API
36
35
(-)a/Koha/REST/V1/ImportBatchProfiles.pm (-1 / +1 lines)
Lines 22-28 use Mojo::Base 'Mojolicious::Controller'; Link Here
22
use Koha::ImportBatchProfiles;
22
use Koha::ImportBatchProfiles;
23
use Koha::ImportBatchProfile;
23
use Koha::ImportBatchProfile;
24
24
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
=head1 NAME
27
=head1 NAME
28
28
(-)a/Koha/REST/V1/Items.pm (-2 / +2 lines)
Lines 21-28 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::Items;
22
use Koha::Items;
23
23
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
=head1 NAME
27
=head1 NAME
28
28
(-)a/Koha/REST/V1/Libraries.pm (-1 / +1 lines)
Lines 22-28 use Koha::Libraries; Link Here
22
22
23
use Scalar::Util qw( blessed );
23
use Scalar::Util qw( blessed );
24
24
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
=head1 NAME
27
=head1 NAME
28
28
(-)a/Koha/REST/V1/OAuth.pm (-1 / +1 lines)
Lines 21-27 use Module::Load::Conditional; Link Here
21
21
22
use C4::Context;
22
use C4::Context;
23
use Koha::OAuth;
23
use Koha::OAuth;
24
use MIME::Base64;
24
use MIME::Base64 qw( decode_base64 );
25
25
26
use Mojo::Base 'Mojolicious::Controller';
26
use Mojo::Base 'Mojolicious::Controller';
27
27
(-)a/Koha/REST/V1/Patrons.pm (-3 / +2 lines)
Lines 20-30 use Modern::Perl; Link Here
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils;
24
use Koha::Patrons;
23
use Koha::Patrons;
25
24
26
use Scalar::Util qw(blessed);
25
use Scalar::Util qw( blessed );
27
use Try::Tiny;
26
use Try::Tiny qw( catch try );
28
27
29
=head1 NAME
28
=head1 NAME
30
29
(-)a/Koha/REST/V1/Patrons/Account.pm (-2 / +1 lines)
Lines 21-28 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::Patrons;
22
use Koha::Patrons;
23
23
24
use Scalar::Util qw(blessed);
24
use Try::Tiny qw( catch try );
25
use Try::Tiny;
26
25
27
=head1 NAME
26
=head1 NAME
28
27
(-)a/Koha/REST/V1/Patrons/Attributes.pm (-2 / +2 lines)
Lines 22-29 use Mojo::Base 'Mojolicious::Controller'; Link Here
22
use Koha::Patron::Attributes;
22
use Koha::Patron::Attributes;
23
use Koha::Patrons;
23
use Koha::Patrons;
24
24
25
use Scalar::Util qw(blessed);
25
use Scalar::Util qw( blessed );
26
use Try::Tiny;
26
use Try::Tiny qw( catch try );
27
27
28
=head1 NAME
28
=head1 NAME
29
29
(-)a/Koha/REST/V1/Patrons/Password.pm (-2 / +2 lines)
Lines 23-30 use C4::Auth qw(checkpw_internal); Link Here
23
23
24
use Koha::Patrons;
24
use Koha::Patrons;
25
25
26
use Scalar::Util qw(blessed);
26
use Scalar::Util qw( blessed );
27
use Try::Tiny;
27
use Try::Tiny qw( catch try );
28
28
29
=head1 NAME
29
=head1 NAME
30
30
(-)a/Koha/REST/V1/Quotes.pm (-1 / +1 lines)
Lines 21-27 use Mojo::Base 'Mojolicious::Controller'; Link Here
21
21
22
use Koha::Quotes;
22
use Koha::Quotes;
23
23
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
=head1 API
26
=head1 API
27
27
(-)a/Koha/REST/V1/ReturnClaims.pm (-2 / +1 lines)
Lines 19-29 use Modern::Perl; Link Here
19
19
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use Koha::Checkouts::ReturnClaims;
24
use Koha::Checkouts::ReturnClaims;
25
use Koha::Checkouts;
25
use Koha::Checkouts;
26
use Koha::DateUtils qw( dt_from_string output_pref );
27
26
28
=head1 NAME
27
=head1 NAME
29
28
(-)a/Koha/REST/V1/Static.pm (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Mojo::Base 'Mojolicious::Controller';
20
use Mojo::Base 'Mojolicious::Controller';
21
21
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
=head1 API
24
=head1 API
25
25
(-)a/Koha/REST/V1/TransferLimits.pm (-1 / +1 lines)
Lines 25-31 use Koha::Exceptions::TransferLimit; Link Here
25
25
26
use Scalar::Util qw( blessed );
26
use Scalar::Util qw( blessed );
27
27
28
use Try::Tiny;
28
use Try::Tiny qw( catch try );
29
29
30
=head1 NAME
30
=head1 NAME
31
31
(-)a/Koha/Rating.pm (-1 lines)
Lines 17-23 package Koha::Rating; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Ratings.pm (-1 lines)
Lines 17-23 package Koha::Ratings; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/RecordProcessor.pm (-1 / +1 lines)
Lines 59-65 clone it I<prior> to passing it off to the RecordProcessor. Link Here
59
59
60
use Modern::Perl;
60
use Modern::Perl;
61
61
62
use Module::Load::Conditional qw(can_load);
62
use Module::Load::Conditional qw( can_load );
63
use Module::Pluggable::Object;
63
use Module::Pluggable::Object;
64
64
65
use base qw(Class::Accessor);
65
use base qw(Class::Accessor);
(-)a/Koha/Report.pm (-2 lines)
Lines 17-26 package Koha::Report; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use JSON;
24
use Koha::Reports;
22
use Koha::Reports;
25
use Koha::DateUtils qw( dt_from_string output_pref );
23
use Koha::DateUtils qw( dt_from_string output_pref );
26
24
(-)a/Koha/Reports.pm (-1 lines)
Lines 17-23 package Koha::Reports; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Review.pm (-1 lines)
Lines 17-23 package Koha::Review; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Reviews.pm (-1 lines)
Lines 17-23 package Koha::Reviews; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/SMS/Provider.pm (-1 lines)
Lines 19-25 package Koha::SMS::Provider; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Patrons;
23
use Koha::Patrons;
25
24
(-)a/Koha/SMS/Providers.pm (-1 lines)
Lines 19-25 package Koha::SMS::Providers; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::SMS::Provider;
23
use Koha::SMS::Provider;
25
24
(-)a/Koha/Schema/Loader/mysql.pm (-1 / +1 lines)
Lines 24-30 use Modern::Perl; Link Here
24
use base 'DBIx::Class::Schema::Loader::DBI::mysql';
24
use base 'DBIx::Class::Schema::Loader::DBI::mysql';
25
use mro 'c3';
25
use mro 'c3';
26
26
27
use Scalar::Util 'blessed';
27
use Scalar::Util qw( blessed );
28
28
29
# This is being upstreamed, but for now lets make sure whatever version of DBIx::Class::Schema::Loader you are using,
29
# This is being upstreamed, but for now lets make sure whatever version of DBIx::Class::Schema::Loader you are using,
30
# we will catch MariaDB current_timestamp() and convert it to \"current_timestamp" correctly.
30
# we will catch MariaDB current_timestamp() and convert it to \"current_timestamp" correctly.
(-)a/Koha/Script.pm (-2 / +2 lines)
Lines 35-42 This class should be used in all scripts. It sets the interface and userenv appr Link Here
35
35
36
=cut
36
=cut
37
37
38
use File::Basename;
38
use File::Basename qw( fileparse );
39
use Fcntl qw(:flock);
39
use Fcntl qw( LOCK_EX LOCK_NB );
40
40
41
use C4::Context;
41
use C4::Context;
42
use Koha::Exceptions;
42
use Koha::Exceptions;
(-)a/Koha/SearchEngine.pm (-1 / +1 lines)
Lines 19-25 package Koha::SearchEngine; Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use Readonly;
22
use Readonly qw( Readonly );
23
23
24
=head1 NAME
24
=head1 NAME
25
25
(-)a/Koha/SearchEngine/Elasticsearch.pm (-10 / +9 lines)
Lines 28-50 use Koha::SearchFields; Link Here
28
use Koha::SearchMarcMaps;
28
use Koha::SearchMarcMaps;
29
use Koha::Caches;
29
use Koha::Caches;
30
use C4::Heading;
30
use C4::Heading;
31
use C4::AuthoritiesMarc;
31
use C4::AuthoritiesMarc qw( GuessAuthTypeCode );
32
32
33
use Carp;
33
use Carp qw( carp croak );
34
use Clone qw(clone);
34
use Clone qw( clone );
35
use JSON;
36
use Modern::Perl;
35
use Modern::Perl;
37
use Readonly;
36
use Readonly qw( Readonly );
38
use Search::Elasticsearch;
37
use Search::Elasticsearch;
39
use Try::Tiny;
38
use Try::Tiny qw( catch try );
40
use YAML::XS;
39
use YAML::XS;
41
40
42
use List::Util qw( sum0 reduce all );
41
use List::Util qw( sum0 );
43
use MARC::File::XML;
42
use MARC::File::XML;
44
use MIME::Base64;
43
use MIME::Base64 qw( encode_base64 );
45
use Encode qw(encode);
44
use Encode qw( encode );
46
use Business::ISBN;
45
use Business::ISBN;
47
use Scalar::Util qw(looks_like_number);
46
use Scalar::Util qw( looks_like_number );
48
47
49
__PACKAGE__->mk_ro_accessors(qw( index index_name ));
48
__PACKAGE__->mk_ro_accessors(qw( index index_name ));
50
__PACKAGE__->mk_accessors(qw( sort_fields ));
49
__PACKAGE__->mk_accessors(qw( sort_fields ));
(-)a/Koha/SearchEngine/Elasticsearch/Indexer.pm (-4 / +3 lines)
Lines 17-28 package Koha::SearchEngine::Elasticsearch::Indexer; Link Here
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Carp;
20
use Carp qw( carp croak );
21
use Modern::Perl;
21
use Modern::Perl;
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
use List::Util qw(any);
23
use List::Util qw( any );
24
use base qw(Koha::SearchEngine::Elasticsearch);
24
use base qw(Koha::SearchEngine::Elasticsearch);
25
use Data::Dumper;
26
25
27
use Koha::Exceptions;
26
use Koha::Exceptions;
28
use Koha::Exceptions::Elasticsearch;
27
use Koha::Exceptions::Elasticsearch;
(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-3 / +2 lines)
Lines 40-50 provides something that can be given to elasticsearch to get answers. Link Here
40
=cut
40
=cut
41
41
42
use base qw(Koha::SearchEngine::Elasticsearch);
42
use base qw(Koha::SearchEngine::Elasticsearch);
43
use Carp;
44
use JSON;
43
use JSON;
45
use List::MoreUtils qw/ each_array /;
44
use List::MoreUtils qw( each_array );
46
use Modern::Perl;
45
use Modern::Perl;
47
use URI::Escape;
46
use URI::Escape qw( uri_escape_utf8 );
48
47
49
use C4::Context;
48
use C4::Context;
50
use Koha::Exceptions;
49
use Koha::Exceptions;
(-)a/Koha/SearchEngine/Elasticsearch/Search.pm (-3 / +1 lines)
Lines 50-58 use Koha::SearchEngine::Search; Link Here
50
use Koha::Exceptions::Elasticsearch;
50
use Koha::Exceptions::Elasticsearch;
51
use MARC::Record;
51
use MARC::Record;
52
use MARC::File::XML;
52
use MARC::File::XML;
53
use Data::Dumper; #TODO remove
53
use MIME::Base64 qw( decode_base64 );
54
use Carp qw(cluck);
55
use MIME::Base64;
56
54
57
Koha::SearchEngine::Elasticsearch::Search->mk_accessors(qw( store ));
55
Koha::SearchEngine::Elasticsearch::Search->mk_accessors(qw( store ));
58
56
(-)a/Koha/SearchEngine/Indexer.pm (-1 lines)
Lines 45-51 Creates a new C<Search> of whatever the relevant type is. Link Here
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
use C4::Context;
47
use C4::Context;
48
use C4::Biblio qw//;
49
48
50
sub new {
49
sub new {
51
    my $engine = C4::Context->preference("SearchEngine") // 'Zebra';
50
    my $engine = C4::Context->preference("SearchEngine") // 'Zebra';
(-)a/Koha/SearchEngine/QueryBuilder.pm (-1 / +1 lines)
Lines 45-51 Creates a new C<QueryBuilder> of whatever the relevant type is. Link Here
45
45
46
use C4::Context;
46
use C4::Context;
47
use Modern::Perl;
47
use Modern::Perl;
48
use Carp;
48
use Carp qw( croak );
49
49
50
sub new {
50
sub new {
51
    my $engine = C4::Context->preference("SearchEngine");
51
    my $engine = C4::Context->preference("SearchEngine");
(-)a/Koha/SearchEngine/Search.pm (-2 / +2 lines)
Lines 45-52 Creates a new C<Search> of whatever the relevant type is. Link Here
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
use C4::Context;
47
use C4::Context;
48
use C4::Biblio qw//;
48
use C4::Biblio;
49
use POSIX qw(ceil floor);
49
use POSIX qw( ceil );
50
50
51
sub new {
51
sub new {
52
    my $engine = C4::Context->preference("SearchEngine") // 'Zebra';
52
    my $engine = C4::Context->preference("SearchEngine") // 'Zebra';
(-)a/Koha/SearchEngine/Zebra/Indexer.pm (-1 / +1 lines)
Lines 18-24 package Koha::SearchEngine::Zebra::Indexer; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Biblio qw(ModZebra); # FIXME This is terrible, we should move the indexation code outside of C4::Biblio
21
use C4::Biblio qw( ModZebra ); # FIXME This is terrible, we should move the indexation code outside of C4::Biblio
22
use base qw(Class::Accessor);
22
use base qw(Class::Accessor);
23
23
24
=head1 NAME
24
=head1 NAME
(-)a/Koha/SearchEngine/Zebra/Search.pm (-2 / +2 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use base qw(Class::Accessor);
22
use base qw(Class::Accessor);
23
23
24
use C4::Search; # :(
24
use C4::Search qw( getRecords ); # :(
25
use C4::AuthoritiesMarc;
25
use C4::AuthoritiesMarc;
26
use Koha::SearchEngine::Search;
26
use Koha::SearchEngine::Search;
27
27
Lines 62-68 This passes straight through to C4::Search::getRecords. Link Here
62
sub search_compat {
62
sub search_compat {
63
    shift; # get rid of $self
63
    shift; # get rid of $self
64
64
65
    return getRecords(@_);
65
    return C4::Search::getRecords(@_);
66
}
66
}
67
67
68
=head2 simple_search_compat
68
=head2 simple_search_compat
(-)a/Koha/SearchField.pm (-1 lines)
Lines 17-23 package Koha::SearchField; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/SearchFields.pm (-1 lines)
Lines 17-23 package Koha::SearchFields; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/SearchMarcMap.pm (-1 lines)
Lines 17-23 package Koha::SearchMarcMap; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/SearchMarcMaps.pm (-1 lines)
Lines 17-23 package Koha::SearchMarcMaps; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Serial.pm (-1 lines)
Lines 19-25 package Koha::Serial; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Serial/Item.pm (-1 lines)
Lines 19-25 package Koha::Serial::Item; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Serial/Items.pm (-1 lines)
Lines 19-25 package Koha::Serial::Items; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Serials.pm (-1 lines)
Lines 19-25 package Koha::Serials; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/SharedContent.pm (-1 / +1 lines)
Lines 18-24 package Koha::SharedContent; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use JSON;
21
use JSON qw( from_json to_json );
22
use HTTP::Request;
22
use HTTP::Request;
23
use LWP::UserAgent;
23
use LWP::UserAgent;
24
24
(-)a/Koha/SimpleMARC.pm (-23 / +17 lines)
Lines 18-46 package Koha::SimpleMARC; Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
#use MARC::Record;
21
our (@ISA, @EXPORT_OK);
22
22
BEGIN {
23
require Exporter;
23
    require Exporter;
24
24
    our @ISA = qw(Exporter);
25
our @ISA = qw(Exporter);
25
26
our %EXPORT_TAGS = ( 'all' => [ qw(
26
    @EXPORT_OK = qw(
27
27
      read_field
28
) ] );
28
      add_field
29
29
      update_field
30
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
30
      copy_field
31
31
      copy_and_replace_field
32
our @EXPORT = qw(
32
      move_field
33
  read_field
33
      delete_field
34
  add_field
34
      field_exists
35
  update_field
35
      field_equals
36
  copy_field
36
    );
37
  copy_and_replace_field
37
}
38
  move_field
39
  delete_field
40
  field_exists
41
  field_equals
42
);
43
44
38
45
=head1 NAME
39
=head1 NAME
46
40
(-)a/Koha/Sitemapper/Writer.pm (-1 / +1 lines)
Lines 23-29 use Moo; Link Here
23
use Modern::Perl;
23
use Modern::Perl;
24
use XML::Writer;
24
use XML::Writer;
25
use IO::File;
25
use IO::File;
26
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
27
27
28
28
29
my $MAX = 50000;
29
my $MAX = 50000;
(-)a/Koha/Statistic.pm (-1 lines)
Lines 17-23 package Koha::Statistic; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Items;
22
use Koha::Items;
(-)a/Koha/Statistics.pm (-1 lines)
Lines 17-23 package Koha::Statistics; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/StockRotationItem.pm (-2 / +2 lines)
Lines 22-32 use Modern::Perl; Link Here
22
use DateTime;
22
use DateTime;
23
use DateTime::Duration;
23
use DateTime::Duration;
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::DateUtils qw/dt_from_string/;
25
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Item::Transfer;
26
use Koha::Item::Transfer;
27
use Koha::Item;
27
use Koha::Item;
28
use Koha::StockRotationStage;
28
use Koha::StockRotationStage;
29
use Try::Tiny;
29
use Try::Tiny qw( catch try );
30
30
31
use base qw(Koha::Object);
31
use base qw(Koha::Object);
32
32
(-)a/Koha/Subscription.pm (-2 lines)
Lines 19-25 package Koha::Subscription; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::Biblios;
24
use Koha::Biblios;
Lines 28-34 use Koha::Biblioitems; Link Here
28
use Koha::Subscriptions;
27
use Koha::Subscriptions;
29
use Koha::Subscription::Frequencies;
28
use Koha::Subscription::Frequencies;
30
use Koha::Subscription::Numberpatterns;
29
use Koha::Subscription::Numberpatterns;
31
use JSON;
32
30
33
use base qw(Koha::Object Koha::Object::Mixin::AdditionalFields);
31
use base qw(Koha::Object Koha::Object::Mixin::AdditionalFields);
34
32
(-)a/Koha/Subscription/Frequencies.pm (-1 lines)
Lines 17-23 package Koha::Subscription::Frequencies; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Subscription/Frequency.pm (-1 lines)
Lines 17-23 package Koha::Subscription::Frequency; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Subscription/Histories.pm (-1 lines)
Lines 19-25 package Koha::Subscription::Histories; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Subscription/History.pm (-1 lines)
Lines 19-25 package Koha::Subscription::History; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Subscription/Routinglist.pm (-1 lines)
Lines 18-24 package Koha::Subscription::Routinglist; Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use Carp;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
use Koha::Subscriptions;
23
use Koha::Subscriptions;
(-)a/Koha/Subscription/Routinglists.pm (-1 lines)
Lines 18-24 package Koha::Subscription::Routinglists; Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use Carp;
22
21
23
use Koha::Database;
22
use Koha::Database;
24
use Koha::Subscription::Routinglist;
23
use Koha::Subscription::Routinglist;
(-)a/Koha/Subscriptions.pm (-1 lines)
Lines 19-25 package Koha::Subscriptions; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Suggestion.pm (-2 / +1 lines)
Lines 19-28 package Koha::Suggestion; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::DateUtils qw(dt_from_string);
24
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Patrons;
25
use Koha::Patrons;
27
26
28
use base qw(Koha::Object);
27
use base qw(Koha::Object);
(-)a/Koha/SuggestionEngine.pm (-1 / +1 lines)
Lines 53-59 B<new ()> - create a new plugin object Link Here
53
53
54
use strict;
54
use strict;
55
use warnings;
55
use warnings;
56
use Module::Load::Conditional qw(can_load);
56
use Module::Load::Conditional qw( can_load );
57
use Module::Pluggable::Object;
57
use Module::Pluggable::Object;
58
58
59
use base qw(Class::Accessor);
59
use base qw(Class::Accessor);
(-)a/Koha/SuggestionEngine/Plugin/AuthorityFile.pm (-1 lines)
Lines 31-37 Plugin to get suggestions from Koha's authority file Link Here
31
=cut
31
=cut
32
32
33
use Modern::Perl;
33
use Modern::Perl;
34
use Carp;
35
34
36
use base qw(Koha::SuggestionEngine::Base);
35
use base qw(Koha::SuggestionEngine::Base);
37
36
(-)a/Koha/SuggestionEngine/Plugin/ExplodedTerms.pm (-1 lines)
Lines 32-38 subjects to subject searches. Link Here
32
=cut
32
=cut
33
33
34
use Modern::Perl;
34
use Modern::Perl;
35
use Carp;
36
use C4::Templates qw(gettemplate); # This is necessary for translatability
35
use C4::Templates qw(gettemplate); # This is necessary for translatability
37
36
38
use base qw(Koha::SuggestionEngine::Base);
37
use base qw(Koha::SuggestionEngine::Base);
(-)a/Koha/SuggestionEngine/Plugin/LibrisSpellcheck.pm (-1 / +1 lines)
Lines 18-24 package Koha::SuggestionEngine::Plugin::LibrisSpellcheck; Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use LWP::UserAgent;
20
use LWP::UserAgent;
21
use XML::Simple qw(XMLin);
21
use XML::Simple qw( XMLin );
22
use C4::Context;
22
use C4::Context;
23
use base qw(Koha::SuggestionEngine::Base);
23
use base qw(Koha::SuggestionEngine::Base);
24
24
(-)a/Koha/SuggestionEngine/Plugin/Null.pm (-1 lines)
Lines 33-39 SuggestionEngine. Link Here
33
33
34
use strict;
34
use strict;
35
use warnings;
35
use warnings;
36
use Carp;
37
36
38
use base qw(Koha::SuggestionEngine::Base);
37
use base qw(Koha::SuggestionEngine::Base);
39
38
(-)a/Koha/Suggestions.pm (-1 lines)
Lines 19-25 package Koha::Suggestions; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
24
(-)a/Koha/Tag.pm (-1 lines)
Lines 17-23 package Koha::Tag; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use base qw(Koha::Object);
21
use base qw(Koha::Object);
23
22
(-)a/Koha/Tags.pm (-1 lines)
Lines 17-23 package Koha::Tags; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Tag;
21
use Koha::Tag;
23
22
(-)a/Koha/Tags/Approval.pm (-1 lines)
Lines 17-23 package Koha::Tags::Approval; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use base qw(Koha::Object);
21
use base qw(Koha::Object);
23
22
(-)a/Koha/Tags/Approvals.pm (-1 lines)
Lines 17-23 package Koha::Tags::Approvals; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Tags::Approval;
21
use Koha::Tags::Approval;
23
22
(-)a/Koha/Tags/Index.pm (-1 lines)
Lines 17-23 package Koha::Tags::Index; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use base qw(Koha::Object);
21
use base qw(Koha::Object);
23
22
(-)a/Koha/Tags/Indexes.pm (-1 lines)
Lines 17-23 package Koha::Tags::Indexes; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Tags::Index;
21
use Koha::Tags::Index;
23
22
(-)a/Koha/Template/Plugin/Asset.pm (-1 / +1 lines)
Lines 45-51 use Modern::Perl; Link Here
45
use Template::Plugin;
45
use Template::Plugin;
46
use base qw( Template::Plugin );
46
use base qw( Template::Plugin );
47
47
48
use File::Basename;
48
use File::Basename qw( fileparse );
49
use File::Spec;
49
use File::Spec;
50
use C4::Context;
50
use C4::Context;
51
use Koha;
51
use Koha;
(-)a/Koha/Template/Plugin/AudioAlerts.pm (-2 / +1 lines)
Lines 19-26 package Koha::Template::Plugin::AudioAlerts; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Encode qw( encode );
22
use JSON qw( encode_json );
23
use JSON;
24
23
25
use base qw( Template::Plugin );
24
use base qw( Template::Plugin );
26
25
(-)a/Koha/Template/Plugin/AuthorisedValues.pm (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
use Template::Plugin;
21
use Template::Plugin;
22
use base qw( Template::Plugin );
22
use base qw( Template::Plugin );
23
23
24
use C4::Koha;
24
use C4::Koha qw( GetAuthorisedValues );
25
use Koha::AuthorisedValues;
25
use Koha::AuthorisedValues;
26
26
27
sub GetByCode {
27
sub GetByCode {
(-)a/Koha/Template/Plugin/Categories.pm (-1 / +1 lines)
Lines 20-26 use Modern::Perl; Link Here
20
use Template::Plugin;
20
use Template::Plugin;
21
use base qw( Template::Plugin );
21
use base qw( Template::Plugin );
22
22
23
use List::Util qw(any);
23
use List::Util qw( any );
24
use Koha::Patron::Categories;
24
use Koha::Patron::Categories;
25
25
26
sub all {
26
sub all {
(-)a/Koha/Template/Plugin/I18N.pm (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use base qw( Template::Plugin );
22
use base qw( Template::Plugin );
23
23
24
use C4::Context;
24
use C4::Context;
25
use Koha::I18N;
25
use Koha::I18N qw( __ __n __np __npx __nx __p __px __x __xn );
26
26
27
=head1 NAME
27
=head1 NAME
28
28
(-)a/Koha/Template/Plugin/KohaDates.pm (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use Template::Plugin::Filter;
22
use Template::Plugin::Filter;
23
use base qw( Template::Plugin::Filter );
23
use base qw( Template::Plugin::Filter );
24
24
25
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string output_pref );
26
use C4::Context;
26
use C4::Context;
27
our $DYNAMIC = 1;
27
our $DYNAMIC = 1;
28
28
(-)a/Koha/Template/Plugin/KohaPlugins.pm (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use base qw( Template::Plugin );
22
use base qw( Template::Plugin );
23
23
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
use Koha::Plugins;
26
use Koha::Plugins;
27
27
(-)a/Koha/Template/Plugin/To.pm (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use Template::Plugin::Filter;
22
use Template::Plugin::Filter;
23
use base qw( Template::Plugin::Filter );
23
use base qw( Template::Plugin::Filter );
24
24
25
use JSON qw( to_json );
25
use JSON;
26
our $DYNAMIC = 1;
26
our $DYNAMIC = 1;
27
27
28
sub json {
28
sub json {
(-)a/Koha/Token.pm (-5 / +5 lines)
Lines 49-59 Koha::Token - Tokenizer Link Here
49
=cut
49
=cut
50
50
51
use Modern::Perl;
51
use Modern::Perl;
52
use Bytes::Random::Secure ();
52
use Bytes::Random::Secure;
53
use String::Random ();
53
use String::Random;
54
use WWW::CSRF ();
54
use WWW::CSRF;
55
use Digest::MD5 qw(md5_base64);
55
use Digest::MD5 qw( md5_base64 );
56
use Encode qw( encode );
56
use Encode;
57
use Koha::Exceptions::Token;
57
use Koha::Exceptions::Token;
58
use base qw(Class::Accessor);
58
use base qw(Class::Accessor);
59
use constant HMAC_SHA1_LENGTH => 20;
59
use constant HMAC_SHA1_LENGTH => 20;
(-)a/Koha/UploadedFiles.pm (-2 / +2 lines)
Lines 19-27 package Koha::UploadedFiles; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Koha;
22
use C4::Koha qw( GetAuthorisedValues );
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
25
use Koha::UploadedFile;
25
use Koha::UploadedFile;
26
26
27
use parent qw(Koha::Objects);
27
use parent qw(Koha::Objects);
(-)a/Koha/Uploader.pm (-1 lines)
Lines 69-75 use Modern::Perl; Link Here
69
use CGI; # no utf8 flag, since it may interfere with binary uploads
69
use CGI; # no utf8 flag, since it may interfere with binary uploads
70
use Digest::MD5;
70
use Digest::MD5;
71
use Encode;
71
use Encode;
72
use File::Spec;
73
use IO::File;
72
use IO::File;
74
use Time::HiRes;
73
use Time::HiRes;
75
74
(-)a/Koha/Util/FrameworkPlugin.pm (-2 / +1 lines)
Lines 22-32 package Koha::Util::FrameworkPlugin; Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
our ( @ISA, @EXPORT, @EXPORT_OK );
25
our ( @ISA, @EXPORT_OK );
26
BEGIN {
26
BEGIN {
27
    require Exporter;
27
    require Exporter;
28
    @ISA = qw( Exporter );
28
    @ISA = qw( Exporter );
29
    @EXPORT = qw( );
30
    @EXPORT_OK = qw( wrapper date_entered );
29
    @EXPORT_OK = qw( wrapper date_entered );
31
}
30
}
32
31
(-)a/Koha/Util/MARC.pm (-1 lines)
Lines 18-24 package Koha::Util::MARC; Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use MARC::Record;
22
21
23
=head1 NAME
22
=head1 NAME
24
23
(-)a/Koha/Util/OpenDocument.pm (-3 / +1 lines)
Lines 19-28 package Koha::Util::OpenDocument; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Encode qw( decode );
23
use File::Temp;
24
use File::Basename qw( dirname );
22
use File::Basename qw( dirname );
25
use OpenOffice::OODoc;
23
use OpenOffice::OODoc qw( odfDocument odfWorkingDirectory );
26
24
27
use parent qw( Exporter );
25
use parent qw( Exporter );
28
26
(-)a/Koha/Virtualshelf.pm (-2 / +1 lines)
Lines 17-25 package Koha::Virtualshelf; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use C4::Auth;
21
use C4::Auth qw( haspermission );
23
22
24
use Koha::Patrons;
23
use Koha::Patrons;
25
use Koha::Database;
24
use Koha::Database;
(-)a/Koha/Virtualshelfcontent.pm (-1 lines)
Lines 17-23 package Koha::Virtualshelfcontent; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
use Koha::Exceptions;
22
use Koha::Exceptions;
(-)a/Koha/Virtualshelfcontents.pm (-1 lines)
Lines 17-23 package Koha::Virtualshelfcontents; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Virtualshelfshare.pm (-2 / +1 lines)
Lines 17-28 package Koha::Virtualshelfshare; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
use DateTime;
20
use DateTime;
22
use DateTime::Duration;
21
use DateTime::Duration;
23
22
24
use Koha::Database;
23
use Koha::Database;
25
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Exceptions;
25
use Koha::Exceptions;
27
26
28
use base qw(Koha::Object);
27
use base qw(Koha::Object);
(-)a/Koha/Virtualshelfshares.pm (-1 lines)
Lines 17-23 package Koha::Virtualshelfshares; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Virtualshelves.pm (-1 lines)
Lines 17-23 package Koha::Virtualshelves; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/XSLT/Security.pm (-1 lines)
Lines 36-42 Koha::XSLT::Security - Add security features to Koha::XSLT::Base Link Here
36
=cut
36
=cut
37
37
38
use Modern::Perl;
38
use Modern::Perl;
39
use Data::Dumper qw/Dumper/;
40
use XML::LibXSLT;
39
use XML::LibXSLT;
41
use C4::Context;
40
use C4::Context;
42
41
(-)a/Koha/Z3950Responder/Session.pm (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use C4::Circulation qw( GetTransfers );
22
use C4::Circulation qw( GetTransfers );
23
use C4::Context;
23
use C4::Context;
24
use C4::Reserves qw( GetReserveStatus );
24
use C4::Reserves qw( GetReserveStatus );
25
use C4::Search qw();
25
use C4::Search qw( new_record_from_zebra );
26
26
27
use Koha::Items;
27
use Koha::Items;
28
use Koha::Logger;
28
use Koha::Logger;
(-)a/Koha/Z3950Server.pm (-1 lines)
Lines 17-23 package Koha::Z3950Server; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/Z3950Servers.pm (-1 lines)
Lines 17-23 package Koha::Z3950Servers; Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Carp;
21
20
22
use Koha::Database;
21
use Koha::Database;
23
22
(-)a/Koha/pdfformat/layout2pages.pm (-2 / +1 lines)
Lines 22-33 package Koha::pdfformat::layout2pages; Link Here
22
22
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
use vars qw(@ISA @EXPORT);
24
use vars qw(@ISA @EXPORT);
25
use MIME::Base64;
26
use Modern::Perl;
25
use Modern::Perl;
27
use utf8;
26
use utf8;
28
27
29
use Koha::Number::Price;
28
use Koha::Number::Price;
30
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::Libraries;
30
use Koha::Libraries;
32
31
33
BEGIN {
32
BEGIN {
(-)a/Koha/pdfformat/layout2pagesde.pm (-7 / +5 lines)
Lines 21-40 package Koha::pdfformat::layout2pagesde; Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
use vars qw(@ISA @EXPORT);
25
use MIME::Base64;
26
use Modern::Perl;
24
use Modern::Perl;
27
use utf8;
25
use utf8;
28
26
29
use Koha::Number::Price;
27
use Koha::Number::Price;
30
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::Libraries;
29
use Koha::Libraries;
32
30
31
our (@ISA, @EXPORT_OK);
33
BEGIN {
32
BEGIN {
34
         use Exporter   ();
33
    require Exporter;
35
         our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
34
    @ISA    = qw(Exporter);
36
	@ISA    = qw(Exporter);
35
    @EXPORT_OK = qw(printpdf);
37
	@EXPORT = qw(printpdf);
38
}
36
}
39
37
40
38
(-)a/Koha/pdfformat/layout3pages.pm (-4 / +3 lines)
Lines 22-35 package Koha::pdfformat::layout3pages; Link Here
22
22
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
23
#you can use any PDF::API2 module, all you need to do is return the stringifyed pdf object from the printpdf sub.
24
use vars qw(@ISA @EXPORT);
24
use vars qw(@ISA @EXPORT);
25
use MIME::Base64;
25
use List::MoreUtils qw( uniq );
26
use List::MoreUtils qw/uniq/;
27
use Modern::Perl;
26
use Modern::Perl;
28
use utf8;
27
use utf8;
29
28
30
use C4::Acquisition;
29
use C4::Acquisition qw( get_rounded_price );
31
use Koha::Number::Price;
30
use Koha::Number::Price;
32
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::Libraries;
32
use Koha::Libraries;
34
33
35
BEGIN {
34
BEGIN {
(-)a/Koha/pdfformat/layout3pagesfr.pm (-1 / +1 lines)
Lines 23-29 package Koha::pdfformat::layout3pagesfr; Link Here
23
23
24
use vars qw(@ISA @EXPORT);
24
use vars qw(@ISA @EXPORT);
25
use MIME::Base64;
25
use MIME::Base64;
26
use List::MoreUtils qw/uniq/;
26
use List::MoreUtils qw( uniq );
27
use Modern::Perl;
27
use Modern::Perl;
28
use utf8;
28
use utf8;
29
29
(-)a/about.pl (-11 / +8 lines)
Lines 24-48 use Modern::Perl; Link Here
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use DateTime::TimeZone;
26
use DateTime::TimeZone;
27
use File::Spec;
27
use File::Slurp qw( read_file );
28
use File::Slurp;
28
use List::MoreUtils qw( any );
29
use List::MoreUtils qw/ any /;
29
use Module::Load::Conditional qw( can_load );
30
use LWP::Simple;
30
use Config qw( %Config );
31
use Module::Load::Conditional qw(can_load);
32
use XML::Simple;
33
use Config;
34
use Search::Elasticsearch;
31
use Search::Elasticsearch;
35
use Try::Tiny;
32
use Try::Tiny qw( catch try );
36
use YAML::XS;
33
use YAML::XS;
37
use Encode;
34
use Encode;
38
35
39
use C4::Output;
36
use C4::Output qw( output_html_with_http_headers );
40
use C4::Auth;
37
use C4::Auth qw( get_template_and_user get_user_subpermissions );
41
use C4::Context;
38
use C4::Context;
42
use C4::Installer::PerlModules;
39
use C4::Installer::PerlModules;
43
40
44
use Koha;
41
use Koha;
45
use Koha::DateUtils qw(dt_from_string output_pref);
42
use Koha::DateUtils qw( dt_from_string output_pref );
46
use Koha::Acquisition::Currencies;
43
use Koha::Acquisition::Currencies;
47
use Koha::BackgroundJob;
44
use Koha::BackgroundJob;
48
use Koha::BiblioFrameworks;
45
use Koha::BiblioFrameworks;
(-)a/acqui/acqui-home.pl (-4 / +3 lines)
Lines 29-38 this script is the main page for acqui Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::Acquisition;
34
use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
35
use C4::Budgets;
36
use C4::Members;
35
use C4::Members;
37
use Koha::Acquisition::Currencies;
36
use Koha::Acquisition::Currencies;
38
use Koha::Patrons;
37
use Koha::Patrons;
(-)a/acqui/add_user_search.pl (-3 / +3 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Members;
25
use C4::Members;
26
26
27
use Koha::Patron::Categories;
27
use Koha::Patron::Categories ;
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
30
30
(-)a/acqui/addorder.pl (-10 / +15 lines)
Lines 119-134 if it is an order from an existing suggestion : the id of this suggestion. Link Here
119
119
120
use Modern::Perl;
120
use Modern::Perl;
121
use CGI qw ( -utf8 );
121
use CGI qw ( -utf8 );
122
use JSON qw ( to_json );
122
use JSON qw( to_json );
123
use C4::Auth;           # get_template_and_user
123
use C4::Auth qw( get_template_and_user );
124
use C4::Acquisition;    # ModOrder
124
use C4::Acquisition qw( FillWithDefaultValues populate_order_with_prices ModOrder ModOrderUsers );
125
use C4::Suggestions;    # ModStatus
125
use C4::Suggestions qw( ModSuggestion );
126
use C4::Biblio;         # AddBiblio TransformKohaToMarc
126
use C4::Biblio qw(
127
use C4::Budgets;
127
    AddBiblio
128
use C4::Items;
128
    GetMarcFromKohaField
129
use C4::Output;
129
    TransformHtmlToXml
130
use C4::Log qw(logaction);
130
    TransformKohaToMarc
131
use Koha::Acquisition::Currencies;
131
);
132
use C4::Budgets qw( GetBudget GetBudgetSpent GetBudgetOrdered );
133
use C4::Items qw( AddItemFromMarc );
134
use C4::Output qw( output_html_with_http_headers );
135
use C4::Log qw( logaction );
136
use Koha::Acquisition::Currencies qw( get_active );
132
use Koha::Acquisition::Orders;
137
use Koha::Acquisition::Orders;
133
use Koha::Acquisition::Baskets;
138
use Koha::Acquisition::Baskets;
134
use C4::Barcodes;
139
use C4::Barcodes;
(-)a/acqui/addorderiso2709.pl (-12 / +16 lines)
Lines 23-45 Link Here
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use Carp;
27
use YAML::XS;
26
use YAML::XS;
28
use List::MoreUtils qw/uniq/;
27
use List::MoreUtils;
29
use Encode;
28
use Encode;
30
29
31
use C4::Context;
30
use C4::Context;
32
use C4::Auth;
31
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
32
use C4::Output qw( output_html_with_http_headers );
34
use C4::ImportBatch;
33
use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches sub SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction );
35
use C4::Matcher;
34
use C4::Matcher;
36
use C4::Search qw/FindDuplicate/;
35
use C4::Search qw( FindDuplicate );
37
use C4::Acquisition;
36
use C4::Acquisition qw( populate_order_with_prices );
38
use C4::Biblio;
37
use C4::Biblio qw(
39
use C4::Items;
38
    AddBiblio
40
use C4::Koha;
39
    GetMarcFromKohaField
41
use C4::Budgets;
40
    GetMarcPrice
42
use C4::Acquisition;
41
    GetMarcQuantity
42
    TransformHtmlToXml
43
);
44
use C4::Items qw( PrepareItemrecordDisplay sub AddItemFromMarc );
45
use C4::Budgets qw( GetBudget GetBudgets GetBudgetHierarchy CanUserUseBudget GetBudgetByCode );
46
use C4::Acquisition qw( populate_order_with_prices );
43
use C4::Suggestions;    # GetSuggestion
47
use C4::Suggestions;    # GetSuggestion
44
use C4::Members;
48
use C4::Members;
45
49
(-)a/acqui/ajax-getauthvaluedropbox.pl (-2 / +2 lines)
Lines 48-55 Default value for the dropbox. Link Here
48
use Modern::Perl;
48
use Modern::Perl;
49
49
50
use CGI qw ( -utf8 );
50
use CGI qw ( -utf8 );
51
use C4::Charset;
51
use C4::Charset qw( NormalizeString );
52
use C4::Auth qw/check_api_auth/;
52
use C4::Auth qw( check_api_auth );
53
use Koha::AuthorisedValues;
53
use Koha::AuthorisedValues;
54
54
55
my $query = CGI->new();
55
my $query = CGI->new();
(-)a/acqui/basket.pl (-12 / +9 lines)
Lines 21-45 Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user haspermission );
25
use C4::Koha;
25
use C4::Output qw( output_html_with_http_headers output_and_exit );
26
use C4::Output;
27
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
28
use C4::Acquisition;
27
use C4::Acquisition qw( GetBasket CanUserManageBasket GetBasketAsCSV NewBasket NewBasketgroup ModBasket ReopenBasket ModBasketUsers GetBasketgroup GetBasketgroups GetBasketUsers GetOrders GetOrder get_rounded_price );
29
use C4::Budgets;
28
use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
30
use C4::Contract;
29
use C4::Contract qw( GetContract );
31
use C4::Biblio;
30
use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo );
32
use C4::Items;
33
use C4::Suggestions;
34
use Koha::Biblios;
31
use Koha::Biblios;
35
use Koha::Acquisition::Baskets;
32
use Koha::Acquisition::Baskets;
36
use Koha::Acquisition::Booksellers;
33
use Koha::Acquisition::Booksellers;
37
use Koha::Acquisition::Orders;
34
use Koha::Acquisition::Orders;
38
use Koha::Libraries;
35
use Koha::Libraries;
39
use C4::Letters qw/SendAlerts/;
36
use C4::Letters qw( SendAlerts );
40
use Date::Calc qw/Add_Delta_Days/;
37
use Date::Calc qw( Add_Delta_Days );
41
use Koha::Database;
38
use Koha::Database;
42
use Koha::EDI qw( create_edi_order get_edifact_ean );
39
use Koha::EDI qw( create_edi_order );
43
use Koha::CsvProfiles;
40
use Koha::CsvProfiles;
44
use Koha::Patrons;
41
use Koha::Patrons;
45
42
(-)a/acqui/basketgroup.pl (-5 / +5 lines)
Lines 44-58 The bookseller who we want to display the baskets (and basketgroups) of. Link Here
44
=cut
44
=cut
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
use Carp;
47
use Carp qw( croak );
48
48
49
use C4::Auth;
49
use C4::Auth qw( get_template_and_user );
50
use C4::Output;
50
use C4::Output qw( output_html_with_http_headers );
51
use CGI qw ( -utf8 );
51
use CGI qw ( -utf8 );
52
use File::Spec;
52
use File::Spec;
53
53
54
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV get_rounded_price/;
54
use C4::Acquisition qw( GetOrders GetOrder get_rounded_price GetBasket GetBasketgroup GetBasketsByBasketgroup GetBasketgroups GetBasketsByBookseller ModBasket CloseBasketgroup GetBasketGroupAsCSV DelBasketgroup ReOpenBasketgroup ModBasketgroup NewBasket NewBasketgroup );
55
use Koha::EDI qw/create_edi_order get_edifact_ean/;
55
use Koha::EDI qw( get_edifact_ean create_edi_order );
56
56
57
use Koha::Biblioitems;
57
use Koha::Biblioitems;
58
use Koha::Acquisition::Booksellers;
58
use Koha::Acquisition::Booksellers;
(-)a/acqui/basketheader.pl (-4 / +4 lines)
Lines 48-57 If it exists, C<$basketno> is the basket we edit Link Here
48
use Modern::Perl;
48
use Modern::Perl;
49
use CGI qw ( -utf8 );
49
use CGI qw ( -utf8 );
50
use C4::Context;
50
use C4::Context;
51
use C4::Auth;
51
use C4::Auth qw( get_template_and_user );
52
use C4::Output;
52
use C4::Output qw( output_html_with_http_headers );
53
use C4::Acquisition qw/GetBasket NewBasket ModBasketHeader/;
53
use C4::Acquisition qw( GetBasket ModBasket ModBasketHeader NewBasket );
54
use C4::Contract qw/GetContracts/;
54
use C4::Contract qw( GetContracts GetContract );
55
55
56
use Koha::Acquisition::Booksellers;
56
use Koha::Acquisition::Booksellers;
57
use Koha::Acquisition::Baskets;
57
use Koha::Acquisition::Baskets;
(-)a/acqui/booksellers.pl (-5 / +4 lines)
Lines 52-64 The id of the supplier whose baskets we will display Link Here
52
=cut
52
=cut
53
53
54
use Modern::Perl;
54
use Modern::Perl;
55
use C4::Auth;
55
use C4::Auth qw( get_template_and_user );
56
use C4::Biblio;
56
use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
57
use C4::Budgets;
57
use C4::Output qw( output_html_with_http_headers );
58
use C4::Output;
59
use CGI qw ( -utf8 );
58
use CGI qw ( -utf8 );
60
59
61
use C4::Acquisition qw/ GetBasketsInfosByBookseller CanUserManageBasket /;
60
use C4::Acquisition qw( GetBasket GetBasketsInfosByBookseller CanUserManageBasket GetBasketgroup );
62
use C4::Context;
61
use C4::Context;
63
62
64
use Koha::Acquisition::Booksellers;
63
use Koha::Acquisition::Booksellers;
(-)a/acqui/cancelorder.pl (-3 / +2 lines)
Lines 32-40 and add possibility to indicate a reason for cancellation Link Here
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI;
34
use CGI;
35
use C4::Auth;
35
use C4::Auth qw( get_template_and_user );
36
use C4::Output;
36
use C4::Output qw( output_html_with_http_headers );
37
use C4::Acquisition;
38
use Koha::Acquisition::Baskets;
37
use Koha::Acquisition::Baskets;
39
38
40
my $input = CGI->new;
39
my $input = CGI->new;
(-)a/acqui/check_budget_total.pl (-3 / +3 lines)
Lines 20-28 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Budgets;
25
use C4::Budgets qw( GetBudget );
26
26
27
=head1 DESCRIPTION
27
=head1 DESCRIPTION
28
28
(-)a/acqui/check_uniqueness.pl (-3 / +3 lines)
Lines 32-40 Link Here
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
35
use JSON;
35
use JSON qw( to_json );
36
use C4::Output;
36
use C4::Output qw( output_with_http_headers );
37
use C4::Items;
37
use C4::Items qw( SearchItems );
38
38
39
my $input = CGI->new;
39
my $input = CGI->new;
40
my @field = $input->multi_param('field[]');
40
my @field = $input->multi_param('field[]');
(-)a/acqui/duplicate_orders.pl (-5 / +5 lines)
Lines 21-34 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_and_exit output_html_with_http_headers );
26
use C4::Acquisition qw(GetHistory);
26
use C4::Acquisition qw( GetHistory );
27
use C4::Budgets qw(GetBudgetPeriods GetBudgetHierarchy CanUserUseBudget);
27
use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget GetBudgetPeriods GetBudgetPeriod );
28
use Koha::Acquisition::Baskets;
28
use Koha::Acquisition::Baskets;
29
use Koha::Acquisition::Currencies;
29
use Koha::Acquisition::Currencies;
30
use Koha::Acquisition::Orders;
30
use Koha::Acquisition::Orders;
31
use Koha::DateUtils qw(dt_from_string output_pref);
31
use Koha::DateUtils qw( dt_from_string output_pref );
32
32
33
my $input    = CGI->new;
33
my $input    = CGI->new;
34
my $basketno = $input->param('basketno');
34
my $basketno = $input->param('basketno');
(-)a/acqui/edi_ean.pl (-3 / +2 lines)
Lines 23-31 Link Here
23
#
23
#
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Koha;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output;
29
use Koha::Database;
28
use Koha::Database;
30
use CGI;
29
use CGI;
31
my $schema = Koha::Database->new()->schema();
30
my $schema = Koha::Database->new()->schema();
(-)a/acqui/edifactmsgs.pl (-4 / +3 lines)
Lines 20-30 use Modern::Perl; Link Here
20
20
21
use CGI;
21
use CGI;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output;
26
use Koha::Database;
25
use Koha::Database;
27
use Koha::EDI qw(process_invoice);
26
use Koha::EDI qw( process_invoice );
28
27
29
my $q = CGI->new;
28
my $q = CGI->new;
30
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
29
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
(-)a/acqui/edimsg.pl (-3 / +3 lines)
Lines 19-28 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI;
21
use CGI;
22
use Koha::Database;
22
use Koha::Databas;
23
use C4::Koha;
23
use C4::Koha;
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
my $q = CGI->new;
27
my $q = CGI->new;
28
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
28
my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user(
(-)a/acqui/finishreceive.pl (-5 / +4 lines)
Lines 22-40 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth qw( checkauth );
26
use C4::Output;
26
use C4::Output;
27
use C4::Context;
27
use C4::Context;
28
use C4::Acquisition;
28
use C4::Acquisition qw( GetInvoice GetOrder populate_order_with_prices ModReceiveOrder );
29
use C4::Biblio;
29
use C4::Biblio qw( GetFrameworkCode GetMarcFromKohaField TransformHtmlToXml );
30
use C4::Items;
30
use C4::Items qw( GetMarcItem ModItemFromMarc AddItemFromMarc );
31
use C4::Search;
31
use C4::Search;
32
32
33
use Koha::Number::Price;
33
use Koha::Number::Price;
34
use Koha::Acquisition::Booksellers;
34
use Koha::Acquisition::Booksellers;
35
use Koha::Acquisition::Orders;
35
use Koha::Acquisition::Orders;
36
36
37
use List::MoreUtils qw/any/;
38
37
39
my $input=CGI->new;
38
my $input=CGI->new;
40
my $flagsrequired = {acquisition => 'order_receive'};
39
my $flagsrequired = {acquisition => 'order_receive'};
(-)a/acqui/histsearch.pl (-5 / +4 lines)
Lines 51-62 to filter on ended date. Link Here
51
51
52
use Modern::Perl;
52
use Modern::Perl;
53
use CGI qw ( -utf8 );
53
use CGI qw ( -utf8 );
54
use C4::Auth;    # get_template_and_user
54
use C4::Auth qw( get_template_and_user );
55
use C4::Output;
55
use C4::Output qw( output_html_with_http_headers );
56
use C4::Acquisition;
56
use C4::Acquisition qw( GetHistory );
57
use C4::Koha;
58
use Koha::AdditionalFields;
57
use Koha::AdditionalFields;
59
use Koha::DateUtils;
58
use Koha::DateUtils qw( dt_from_string output_pref );
60
59
61
my $input = CGI->new;
60
my $input = CGI->new;
62
my $do_search               = $input->param('do_search') || 0;
61
my $do_search               = $input->param('do_search') || 0;
(-)a/acqui/invoice-files.pl (-3 / +3 lines)
Lines 30-38 Manage files associated with invoice Link Here
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI;
32
use CGI;
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Acquisition;
35
use C4::Acquisition qw( GetInvoice GetInvoiceDetails );
36
use Koha::Misc::Files;
36
use Koha::Misc::Files;
37
37
38
my $input = CGI->new;
38
my $input = CGI->new;
(-)a/acqui/invoice.pl (-6 / +6 lines)
Lines 29-42 Invoice details Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_and_exit output_html_with_http_headers );
34
use C4::Acquisition;
34
use C4::Acquisition qw( CloseInvoice ReopenInvoice ModInvoice MergeInvoices DelInvoice GetInvoice GetInvoiceDetails get_rounded_price );
35
use C4::Budgets;
35
use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
36
36
37
use Koha::Acquisition::Booksellers;
37
use Koha::Acquisition::Booksellers;
38
use Koha::Acquisition::Currencies;
38
use Koha::Acquisition::Currencies qw( get_active );
39
use Koha::DateUtils;
39
use Koha::DateUtils qw( output_pref );
40
use Koha::Misc::Files;
40
use Koha::Misc::Files;
41
use Koha::Acquisition::Invoice::Adjustments;
41
use Koha::Acquisition::Invoice::Adjustments;
42
42
(-)a/acqui/invoices.pl (-5 / +5 lines)
Lines 29-40 Search for invoices Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers );
34
34
35
use C4::Acquisition qw/GetInvoices/;
35
use C4::Acquisition qw( GetInvoices GetInvoice );
36
use C4::Budgets;
36
use C4::Budgets qw( GetBudget GetBudgets CanUserUseBudget );
37
use Koha::DateUtils;
37
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::Acquisition::Booksellers;
38
use Koha::Acquisition::Booksellers;
39
39
40
my $input = CGI->new;
40
my $input = CGI->new;
(-)a/acqui/lateorders-export.pl (-2 / +2 lines)
Lines 19-26 use Modern::Perl; Link Here
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use Encode;
20
use Encode;
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Acquisition;
23
use C4::Acquisition qw( GetOrder );
24
use C4::Output;
24
use C4::Output;
25
use C4::Context;
25
use C4::Context;
26
26
(-)a/acqui/lateorders.pl (-7 / +5 lines)
Lines 45-58 To know on which branch this script have to display late order. Link Here
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
48
use C4::Auth;
48
use C4::Auth qw( get_template_and_user );
49
use C4::Koha;
49
use C4::Output qw( output_html_with_http_headers );
50
use C4::Output;
51
use C4::Context;
50
use C4::Context;
52
use C4::Acquisition;
51
use C4::Letters qw( SendAlerts GetLetters );
53
use C4::Letters;
52
use Koha::DateUtils qw( dt_from_string output_pref );
54
use Koha::DateUtils;
53
use Koha::Acquisition::Orders qw( filter_by_lates );
55
use Koha::Acquisition::Orders;
56
use Koha::CsvProfiles;
54
use Koha::CsvProfiles;
57
55
58
my $input = CGI->new;
56
my $input = CGI->new;
(-)a/acqui/modordernotes.pl (-3 / +3 lines)
Lines 29-37 Modify just notes when basket is closed. Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::Acquisition;
34
use C4::Acquisition qw( GetOrder GetBasket ModOrder );
35
35
36
use Koha::Acquisition::Booksellers;
36
use Koha::Acquisition::Booksellers;
37
37
(-)a/acqui/neworderempty.pl (-13 / +19 lines)
Lines 68-91 use Modern::Perl; Link Here
68
use CGI qw ( -utf8 );
68
use CGI qw ( -utf8 );
69
use C4::Context;
69
use C4::Context;
70
70
71
use C4::Auth;
71
use C4::Auth qw( get_template_and_user );
72
use C4::Budgets;
72
use C4::Budgets qw( GetBudget GetBudgetHierarchy CanUserUseBudget );
73
73
74
use C4::Acquisition;
74
use C4::Acquisition qw( GetOrder GetBasket FillWithDefaultValues GetOrderUsers );
75
use C4::Contract;
75
use C4::Contract qw( GetContract );
76
use C4::Suggestions;	# GetSuggestion
76
use C4::Suggestions qw( GetSuggestion GetSuggestionInfo );
77
use C4::Biblio;			# GetBiblioData GetMarcPrice
77
use C4::Biblio qw(
78
use C4::Items; #PrepareItemRecord
78
    AddBiblio
79
use C4::Output;
79
    GetBiblioData
80
use C4::Koha;
80
    GetMarcBiblio
81
    GetMarcFromKohaField
82
    GetMarcPrice
83
    GetMarcStructure
84
    IsMarcStructureInternal
85
);
86
use C4::Output qw( output_and_exit output_html_with_http_headers );
81
use C4::Members;
87
use C4::Members;
82
use C4::Search qw/FindDuplicate/;
88
use C4::Search qw( FindDuplicate );
83
89
84
#needed for z3950 import:
90
#needed for z3950 import:
85
use C4::ImportBatch qw/GetImportRecordMarc SetImportRecordStatus SetMatchedBiblionumber/;
91
use C4::ImportBatch qw( SetImportRecordStatus SetMatchedBiblionumber GetImportRecordMarc );
86
92
87
use Koha::Acquisition::Booksellers;
93
use Koha::Acquisition::Booksellers;
88
use Koha::Acquisition::Currencies;
94
use Koha::Acquisition::Currencies qw( get_active );
89
use Koha::BiblioFrameworks;
95
use Koha::BiblioFrameworks;
90
use Koha::DateUtils qw( dt_from_string );
96
use Koha::DateUtils qw( dt_from_string );
91
use Koha::MarcSubfieldStructures;
97
use Koha::MarcSubfieldStructures;
(-)a/acqui/newordersubscription.pl (-4 / +4 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Acquisition;
22
use C4::Acquisition qw( GetBasket );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Serials;
26
use C4::Serials qw( SearchSubscriptions subscriptionCurrentlyOnOrder check_routing );
27
27
28
use Koha::Acquisition::Booksellers;
28
use Koha::Acquisition::Booksellers;
29
29
(-)a/acqui/newordersuggestion.pl (-4 / +3 lines)
Lines 91-100 can be equal to Link Here
91
use Modern::Perl;
91
use Modern::Perl;
92
92
93
use CGI qw ( -utf8 );
93
use CGI qw ( -utf8 );
94
use C4::Auth;    # get_template_and_user
94
use C4::Auth qw( get_template_and_user );
95
use C4::Output;
95
use C4::Output qw( output_html_with_http_headers );
96
use C4::Suggestions;
96
use C4::Suggestions qw( ConnectSuggestionAndBiblio SearchSuggestion );
97
use C4::Biblio;
98
use C4::Budgets;
97
use C4::Budgets;
99
98
100
use Koha::Acquisition::Booksellers;
99
use Koha::Acquisition::Booksellers;
(-)a/acqui/ordered.pl (-3 / +3 lines)
Lines 30-39 this script is to show orders ordered but not yet received Link Here
30
use C4::Context;
30
use C4::Context;
31
use Modern::Perl;
31
use Modern::Perl;
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
use Koha::Acquisition::Invoice::Adjustments;
35
use Koha::Acquisition::Invoice::Adjustments;
36
use C4::Acquisition;
36
use C4::Acquisition qw( get_rounded_price );
37
37
38
my $dbh     = C4::Context->dbh;
38
my $dbh     = C4::Context->dbh;
39
my $input   = CGI->new;
39
my $input   = CGI->new;
(-)a/acqui/orderreceive.pl (-9 / +7 lines)
Lines 62-79 use Modern::Perl; Link Here
62
62
63
use CGI qw ( -utf8 );
63
use CGI qw ( -utf8 );
64
use C4::Context;
64
use C4::Context;
65
use C4::Acquisition;
65
use C4::Acquisition qw( GetInvoice );
66
use C4::Auth;
66
use C4::Auth qw( get_template_and_user );
67
use C4::Output;
67
use C4::Output qw( output_html_with_http_headers );
68
use C4::Budgets qw/ GetBudget GetBudgetHierarchy CanUserUseBudget GetBudgetPeriods /;
68
use C4::Budgets qw( GetBudget GetBudgetPeriods GetBudgetPeriod GetBudgetHierarchy CanUserUseBudget );
69
use C4::Members;
69
use C4::Members;
70
use C4::Items;
70
use C4::Biblio qw( GetMarcStructure );
71
use C4::Biblio;
71
use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo );
72
use C4::Suggestions;
73
use C4::Koha;
74
72
75
use Koha::Acquisition::Booksellers;
73
use Koha::Acquisition::Booksellers;
76
use Koha::Acquisition::Currencies;
74
use Koha::Acquisition::Currencies qw( get_active );
77
use Koha::Acquisition::Orders;
75
use Koha::Acquisition::Orders;
78
use Koha::DateUtils qw( dt_from_string );
76
use Koha::DateUtils qw( dt_from_string );
79
use Koha::ItemTypes;
77
use Koha::ItemTypes;
(-)a/acqui/parcel.pl (-10 / +5 lines)
Lines 56-78 To filter the results list on this given date. Link Here
56
56
57
use Modern::Perl;
57
use Modern::Perl;
58
58
59
use C4::Auth;
59
use C4::Auth qw( get_template_and_user );
60
use C4::Acquisition;
60
use C4::Acquisition qw( CancelReceipt GetInvoice GetInvoiceDetails get_rounded_price );
61
use C4::Budgets;
61
use C4::Budgets qw( _round GetBudget GetBudgetByOrderNumber GetBudgetName );
62
use C4::Biblio;
63
use C4::Items;
64
use CGI qw ( -utf8 );
62
use CGI qw ( -utf8 );
65
use C4::Output;
63
use C4::Output qw( output_html_with_http_headers );
66
use C4::Suggestions;
64
use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo );
67
65
68
use Koha::Acquisition::Baskets;
66
use Koha::Acquisition::Baskets;
69
use Koha::Acquisition::Bookseller;
67
use Koha::Acquisition::Bookseller;
70
use Koha::Acquisition::Orders;
68
use Koha::Acquisition::Orders;
71
use Koha::Biblios;
69
use Koha::Biblios;
72
use Koha::DateUtils;
73
use Koha::Biblios;
74
70
75
use JSON;
76
71
77
my $input = CGI->new;
72
my $input = CGI->new;
78
73
(-)a/acqui/parcels.pl (-4 / +4 lines)
Lines 68-78 To know how many results have to be display / page. Link Here
68
68
69
use Modern::Perl;
69
use Modern::Perl;
70
use CGI qw ( -utf8 );
70
use CGI qw ( -utf8 );
71
use C4::Auth;
71
use C4::Auth qw( get_template_and_user );
72
use C4::Output;
72
use C4::Output qw( output_html_with_http_headers );
73
73
74
use C4::Acquisition;
74
use C4::Acquisition qw( GetInvoices GetInvoice AddInvoice );
75
use C4::Budgets;
75
use C4::Budgets qw( GetBudgetHierarchy GetBudget CanUserUseBudget );
76
76
77
use Koha::Acquisition::Booksellers;
77
use Koha::Acquisition::Booksellers;
78
use Koha::DateUtils qw( output_pref dt_from_string );
78
use Koha::DateUtils qw( output_pref dt_from_string );
(-)a/acqui/showorder.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
20
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
23
24
use Koha::Acquisition::Orders;
24
use Koha::Acquisition::Orders;
25
use Koha::Patrons;
25
use Koha::Patrons;
(-)a/acqui/spent.pl (-3 / +3 lines)
Lines 30-40 this script is designed to show the spent amount in budgets Link Here
30
=cut
30
=cut
31
31
32
use C4::Context;
32
use C4::Context;
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
use Modern::Perl;
35
use Modern::Perl;
36
use CGI qw ( -utf8 );
36
use CGI qw ( -utf8 );
37
use C4::Acquisition;
37
use C4::Acquisition qw( get_rounded_price );
38
use Koha::Acquisition::Invoice::Adjustments;
38
use Koha::Acquisition::Invoice::Adjustments;
39
39
40
my $dbh      = C4::Context->dbh;
40
my $dbh      = C4::Context->dbh;
(-)a/acqui/supplier.pl (-4 / +3 lines)
Lines 41-50 To know the bookseller this script has to display details. Link Here
41
=cut
41
=cut
42
42
43
use Modern::Perl;
43
use Modern::Perl;
44
use C4::Auth;
44
use C4::Auth qw( get_template_and_user );
45
use C4::Contract;
45
use C4::Contract qw( GetContracts GetContract );
46
use C4::Biblio;
46
use C4::Output qw( output_html_with_http_headers );
47
use C4::Output;
48
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
49
48
50
use C4::Budgets;
49
use C4::Budgets;
(-)a/acqui/transferorder.pl (-3 / +3 lines)
Lines 22-31 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
27
use C4::Context;
28
use C4::Acquisition;
28
use C4::Acquisition qw( GetOrder GetBasket TransferOrder GetBasketsByBookseller SearchOrders );
29
use Koha::Acquisition::Booksellers;
29
use Koha::Acquisition::Booksellers;
30
30
31
my $input = CGI->new;
31
my $input = CGI->new;
(-)a/acqui/uncertainprice.pl (-4 / +3 lines)
Lines 45-56 The bookseller who we want to display the orders of. Link Here
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
47
48
use C4::Auth;
48
use C4::Auth qw( get_template_and_user );
49
use C4::Output;
49
use C4::Output qw( output_html_with_http_headers );
50
use CGI qw ( -utf8 );
50
use CGI qw ( -utf8 );
51
51
52
use C4::Acquisition qw/SearchOrders GetOrder ModOrder/;
52
use C4::Acquisition qw( SearchOrders GetOrder ModOrder );
53
use C4::Biblio qw/GetBiblioData/;
54
53
55
use Koha::Acquisition::Booksellers;
54
use Koha::Acquisition::Booksellers;
56
use Koha::Acquisition::Baskets;
55
use Koha::Acquisition::Baskets;
(-)a/acqui/updatesupplier.pl (-3 / +1 lines)
Lines 47-57 contact_serialsprimary. Link Here
47
=cut
47
=cut
48
48
49
use Modern::Perl;
49
use Modern::Perl;
50
use List::Util;
51
use C4::Context;
50
use C4::Context;
52
use C4::Auth;
51
use C4::Auth qw( checkauth );
53
52
54
use C4::Biblio;
55
use C4::Output;
53
use C4::Output;
56
54
57
use Koha::Acquisition::Bookseller::Contacts;
55
use Koha::Acquisition::Bookseller::Contacts;
(-)a/acqui/z3950_search.pl (-4 / +3 lines)
Lines 22-32 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw/-utf8/;
23
use CGI qw/-utf8/;
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
27
use C4::Context;
28
use C4::Breeding;
28
use C4::Breeding qw( Z3950Search );
29
use C4::Koha;
30
29
31
use Koha::Acquisition::Booksellers;
30
use Koha::Acquisition::Booksellers;
32
use Koha::BiblioFrameworks;
31
use Koha::BiblioFrameworks;
(-)a/admin/add_user_search.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Members;
25
use C4::Members;
26
26
27
use Koha::Patron::Categories;
27
use Koha::Patron::Categories;
(-)a/admin/additional-fields.pl (-3 / +2 lines)
Lines 18-26 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI;
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Koha;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Output;
24
use Koha::AdditionalFields;
23
use Koha::AdditionalFields;
25
24
26
my $input = CGI->new;
25
my $input = CGI->new;
(-)a/admin/admin-home.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use Koha::Plugins;
23
use Koha::Plugins;
24
24
25
my $query = CGI->new;
25
my $query = CGI->new;
(-)a/admin/adveditorshortcuts.pl (-4 / +2 lines)
Lines 34-46 This script allows the user to redefine the keyboard shortcuts for the advacned Link Here
34
=cut
34
=cut
35
35
36
use Modern::Perl;
36
use Modern::Perl;
37
use Encode;
38
37
39
use C4::Auth;
38
use C4::Auth qw( get_template_and_user );
40
use C4::Context;
39
use C4::Context;
41
use C4::Output;
40
use C4::Output qw( output_html_with_http_headers );
42
use CGI qw ( -utf8 );
41
use CGI qw ( -utf8 );
43
use C4::Koha;
44
use Koha::KeyboardShortcuts;
42
use Koha::KeyboardShortcuts;
45
43
46
my $input            = CGI->new;
44
my $input            = CGI->new;
(-)a/admin/aqbudgetperiods.pl (-8 / +7 lines)
Lines 47-61 script to administer the budget periods table Link Here
47
use Modern::Perl;
47
use Modern::Perl;
48
48
49
use CGI qw ( -utf8 );
49
use CGI qw ( -utf8 );
50
use List::Util qw/min/;
50
use Koha::DateUtils qw( dt_from_string );
51
use Koha::DateUtils;
52
use Koha::Database;
51
use Koha::Database;
53
use C4::Koha;
52
use C4::Koha;
54
use C4::Context;
53
use C4::Context;
55
use C4::Auth;
54
use C4::Auth qw( get_template_and_user );
56
use C4::Output;
55
use C4::Output qw( output_html_with_http_headers );
57
use C4::Acquisition;
56
use C4::Acquisition;
58
use C4::Budgets;
57
use C4::Budgets qw( GetBudgetPeriod GetBudgetPeriods ModBudgetPeriod AddBudgetPeriod GetBudgets DelBudgetPeriod CloneBudgetPeriod MoveOrders );
59
use Koha::Acquisition::Currencies;
58
use Koha::Acquisition::Currencies;
60
59
61
my $dbh = C4::Context->dbh;
60
my $dbh = C4::Context->dbh;
Lines 176-182 elsif ( $op eq 'duplicate_budget' ){ Link Here
176
    my $mark_original_budget_as_inactive = $input->param('mark_original_budget_as_inactive');
175
    my $mark_original_budget_as_inactive = $input->param('mark_original_budget_as_inactive');
177
    my $reset_all_budgets = $input->param('reset_all_budgets');
176
    my $reset_all_budgets = $input->param('reset_all_budgets');
178
177
179
    my $new_budget_period_id = C4::Budgets::CloneBudgetPeriod(
178
    my $new_budget_period_id = CloneBudgetPeriod(
180
        {
179
        {
181
            budget_period_id        => $budget_period_id,
180
            budget_period_id        => $budget_period_id,
182
            budget_period_startdate => $budget_period_startdate,
181
            budget_period_startdate => $budget_period_startdate,
Lines 198-204 elsif ( $op eq 'close_form' ) { Link Here
198
    my $budget_period = GetBudgetPeriod($budget_period_id);
197
    my $budget_period = GetBudgetPeriod($budget_period_id);
199
198
200
    my $active_budget_periods =
199
    my $active_budget_periods =
201
      C4::Budgets::GetBudgetPeriods( { budget_period_active => 1 } );
200
      GetBudgetPeriods( { budget_period_active => 1 } );
202
201
203
    # Remove the budget period from the list
202
    # Remove the budget period from the list
204
    $active_budget_periods =
203
    $active_budget_periods =
Lines 235-241 elsif ( $op eq 'close_form' ) { Link Here
235
elsif ( $op eq 'close_confirmed' ) {
234
elsif ( $op eq 'close_confirmed' ) {
236
    my $to_budget_period_id    = $input->param('to_budget_period_id');
235
    my $to_budget_period_id    = $input->param('to_budget_period_id');
237
    my $move_remaining_unspent = $input->param('move_remaining_unspent');
236
    my $move_remaining_unspent = $input->param('move_remaining_unspent');
238
    my $report                 = C4::Budgets::MoveOrders(
237
    my $report                 = MoveOrders(
239
        {
238
        {
240
            from_budget_period_id  => $budget_period_id,
239
            from_budget_period_id  => $budget_period_id,
241
            to_budget_period_id    => $to_budget_period_id,
240
            to_budget_period_id    => $to_budget_period_id,
(-)a/admin/aqbudgets.pl (-7 / +17 lines)
Lines 22-37 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use List::Util qw/min/;
26
25
27
use Koha::Database;
26
use Koha::Database;
28
use C4::Auth qw/get_user_subpermissions/;
27
use C4::Auth qw( get_template_and_user );
29
use C4::Auth;
28
use C4::Budgets qw(
30
use C4::Acquisition;
29
    AddBudget
31
use C4::Budgets;
30
    BudgetHasChildren
31
    CanUserModifyBudget
32
    CanUserUseBudget
33
    DelBudget
34
    GetBudget
35
    GetBudgetAuthCats
36
    GetBudgetHierarchy
37
    GetBudgetPeriod
38
    GetBudgetPeriods
39
    GetBudgetUsers
40
    ModBudget
41
    ModBudgetUsers
42
);
32
use C4::Context;
43
use C4::Context;
33
use C4::Output;
44
use C4::Output qw( output_html_with_http_headers output_and_exit );
34
use C4::Koha;
35
use Koha::Acquisition::Currencies;
45
use Koha::Acquisition::Currencies;
36
use Koha::Patrons;
46
use Koha::Patrons;
37
47
(-)a/admin/aqcontract.pl (-4 / +10 lines)
Lines 23-32 Link Here
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Contract;
28
use C4::Contract qw(
29
use Koha::DateUtils;
29
    AddContract
30
    DelContract
31
    GetContract
32
    GetContracts
33
    ModContract
34
);
35
use Koha::DateUtils qw( dt_from_string output_pref );
30
36
31
use Koha::Acquisition::Booksellers;
37
use Koha::Acquisition::Booksellers;
32
38
(-)a/admin/aqplan.pl (-8 / +15 lines)
Lines 22-38 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use List::Util qw/min/;
25
use Date::Calc qw( Delta_YMD );
26
use Date::Calc qw/Delta_YMD Easter_Sunday Today Decode_Date_EU/;
26
use Date::Manip qw( DateCalc UnixDate );
27
use Date::Manip qw/ ParseDate UnixDate DateCalc/;
28
use Text::CSV_XS;
27
use Text::CSV_XS;
29
28
30
use C4::Acquisition;
29
use C4::Budgets qw(
31
use C4::Budgets;
30
    CanUserUseBudget
31
    GetBudgetAuthCats
32
    GetBudgetHierarchy
33
    GetBudgetPeriod
34
    GetBudgetsPlanCell
35
    GetCols
36
    GetPeriodsCount
37
    HideCols
38
    ModBudgetPlan
39
);
32
use C4::Context;
40
use C4::Context;
33
use C4::Output;
41
use C4::Output qw( output_html_with_http_headers );
34
use C4::Koha;
42
use C4::Auth qw( get_template_and_user );
35
use C4::Auth;
36
use Koha::Acquisition::Currencies;
43
use Koha::Acquisition::Currencies;
37
44
38
our $input = CGI->new;
45
our $input = CGI->new;
(-)a/admin/audio_alerts.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::AudioAlert;
25
use Koha::AudioAlert;
26
use Koha::AudioAlerts;
26
use Koha::AudioAlerts;
27
27
(-)a/admin/auth_subfields_structure.pl (-3 / +2 lines)
Lines 18-28 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Output;
21
use C4::Output qw( output_html_with_http_headers );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Koha;
26
25
27
use Koha::Authority::Types;
26
use Koha::Authority::Types;
28
use Koha::AuthorisedValues;
27
use Koha::AuthorisedValues;
(-)a/admin/auth_tag_structure.pl (-3 / +2 lines)
Lines 20-29 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
25
use C4::Context;
24
use C4::Context;
26
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
26
use C4::Context;
28
27
29
use Koha::Authority::Types;
28
use Koha::Authority::Types;
(-)a/admin/authorised_values.pl (-4 / +4 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use List::MoreUtils qw(any);
23
use List::MoreUtils qw( any );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Koha;
27
use C4::Koha qw( getitemtypeimagelocation );
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
31
use Koha::AuthorisedValueCategories;
31
use Koha::AuthorisedValueCategories;
(-)a/admin/authtypes.pl (-2 / +2 lines)
Lines 22-29 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
use Koha::Authorities;
28
use Koha::Authorities;
29
use Koha::Authority::Types;
29
use Koha::Authority::Types;
(-)a/admin/background_jobs.pl (-4 / +2 lines)
Lines 17-28 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use JSON qw( decode_json );
21
use Try::Tiny;
22
20
23
use C4::Context;
21
use C4::Context;
24
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
26
24
27
use Koha::BackgroundJobs;
25
use Koha::BackgroundJobs;
28
use Koha::Virtualshelves;
26
use Koha::Virtualshelves;
(-)a/admin/biblio_framework.pl (-2 / +2 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Biblios;
26
use Koha::Biblios;
27
use Koha::BiblioFramework;
27
use Koha::BiblioFramework;
28
use Koha::BiblioFrameworks;
28
use Koha::BiblioFrameworks;
(-)a/admin/branch_transfer_limits.pl (-4 / +3 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
27
use C4::Circulation qw( DeleteBranchTransferLimits CreateBranchTransferLimit IsBranchTransferAllowed );
28
use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
29
28
30
my $input = CGI->new;
29
my $input = CGI->new;
31
30
(-)a/admin/branches.pl (-3 / +3 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Context;
27
use C4::Context;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Koha;
29
use C4::Koha;
30
30
31
use Koha::Database;
31
use Koha::Database;
(-)a/admin/cash_registers.pl (-3 / +3 lines)
Lines 21-33 use strict; Link Here
21
use warnings;
21
use warnings;
22
22
23
use CGI;
23
use CGI;
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use Koha::Libraries;
27
use Koha::Libraries;
28
use C4::Koha;
28
use C4::Koha;
29
use C4::Context;
29
use C4::Context;
30
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
31
use Koha::Cash::Registers;
31
use Koha::Cash::Registers;
32
32
33
my $cgi = CGI->new();
33
my $cgi = CGI->new();
(-)a/admin/categories.pl (-3 / +3 lines)
Lines 22-33 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Form::MessagingPreferences;
27
use C4::Form::MessagingPreferences;
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
32
use Koha::Libraries;
32
use Koha::Libraries;
33
33
(-)a/admin/check_budget_parent.pl (-3 / +3 lines)
Lines 20-28 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Budgets;
25
use C4::Budgets qw( CheckBudgetParent GetBudget );
26
26
27
=head1 DESCRIPTION
27
=head1 DESCRIPTION
28
28
(-)a/admin/check_parent_total.pl (-3 / +3 lines)
Lines 20-28 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Budgets;
25
use C4::Budgets qw( GetBudget GetBudgetPeriod );
26
26
27
=head1 DESCRIPTION
27
=head1 DESCRIPTION
28
28
(-)a/admin/checkmarc.pl (-3 / +2 lines)
Lines 19-29 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Biblio;
27
26
28
27
29
my $input = CGI->new;
28
my $input = CGI->new;
(-)a/admin/cities.pl (-2 / +2 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::Cities;
27
use Koha::Cities;
28
28
(-)a/admin/classsources.pl (-5 / +4 lines)
Lines 21-32 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
27
use C4::ClassSortRoutine qw( GetSortRoutineNames );
28
use C4::ClassSortRoutine;
28
use C4::ClassSplitRoutine qw( GetSplitRoutineNames );
29
use C4::ClassSplitRoutine;
30
use Koha::ClassSources;
29
use Koha::ClassSources;
31
use Koha::ClassSortRules;
30
use Koha::ClassSortRules;
32
use Koha::ClassSplitRules;
31
use Koha::ClassSplitRules;
(-)a/admin/clone-rules.pl (-3 / +2 lines)
Lines 28-36 Link Here
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use C4::Context;
30
use C4::Context;
31
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Koha;
34
use Koha::CirculationRules;
33
use Koha::CirculationRules;
35
34
36
my $input = CGI->new;
35
my $input = CGI->new;
(-)a/admin/columns_settings.pl (-2 / +2 lines)
Lines 2-10 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI;
4
use CGI;
5
use C4::Auth;
5
use C4::Auth qw( get_template_and_user );
6
use C4::Context;
6
use C4::Context;
7
use C4::Output;
7
use C4::Output qw( output_html_with_http_headers );
8
use C4::Utils::DataTables::TablesSettings qw( get_modules );
8
use C4::Utils::DataTables::TablesSettings qw( get_modules );
9
my $input = CGI->new;
9
my $input = CGI->new;
10
10
(-)a/admin/credit_types.pl (-3 / +3 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
use Koha::Account::CreditType;
28
use Koha::Account::CreditType;
29
use Koha::Account::CreditTypes;
29
use Koha::Account::CreditTypes;
(-)a/admin/currency.pl (-2 / +2 lines)
Lines 21-29 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
use Koha::Acquisition::Booksellers;
28
use Koha::Acquisition::Booksellers;
29
use Koha::Acquisition::Currencies;
29
use Koha::Acquisition::Currencies;
(-)a/admin/debit_types.pl (-3 / +3 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
use Koha::Account::DebitType;
28
use Koha::Account::DebitType;
29
use Koha::Account::DebitTypes;
29
use Koha::Account::DebitTypes;
(-)a/admin/desks.pl (-2 / +2 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::Desks;
27
use Koha::Desks;
28
28
(-)a/admin/didyoumean.pl (-4 / +4 lines)
Lines 3-13 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI qw ( -utf8 );
4
use CGI qw ( -utf8 );
5
use C4::Context;
5
use C4::Context;
6
use C4::Auth;
6
use C4::Auth qw( get_template_and_user );
7
use C4::Output;
7
use C4::Output qw( output_html_with_http_headers );
8
use Koha::SuggestionEngine;
8
use Koha::SuggestionEngine;
9
use Module::Load::Conditional qw(can_load);
9
use Module::Load::Conditional qw( can_load );
10
use JSON;
10
use JSON qw( from_json );
11
11
12
my $input = CGI->new;
12
my $input = CGI->new;
13
13
(-)a/admin/edi_accounts.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::Plugins;
25
use Koha::Plugins;
26
26
(-)a/admin/edi_ean_accounts.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use Koha::Database;
24
use Koha::Database;
25
25
26
my $input = CGI->new();
26
my $input = CGI->new();
(-)a/admin/import_export_framework.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use CGI::Cookie;
23
use CGI::Cookie;
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth qw/check_cookie_auth/;
25
use C4::Auth qw( check_cookie_auth );
26
use C4::ImportExportFramework;
26
use C4::ImportExportFramework qw( createODS ExportFramework ImportFramework );
27
27
28
my %cookies = CGI::Cookie->fetch();
28
my %cookies = CGI::Cookie->fetch();
29
my $authenticated = 0;
29
my $authenticated = 0;
(-)a/admin/item_circulation_alerts.pl (-5 / +3 lines)
Lines 18-32 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use File::Basename;
21
use JSON qw( encode_json );
22
use Encode;
23
use JSON;
24
#use Data::Dump 'pp';
22
#use Data::Dump 'pp';
25
23
26
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
27
use C4::Context;
25
use C4::Context;
28
use C4::ItemCirculationAlertPreference;
26
use C4::ItemCirculationAlertPreference;
29
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
30
28
31
use Koha::ItemTypes;
29
use Koha::ItemTypes;
32
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
(-)a/admin/items_search_field.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI;
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
24
25
use Koha::Item::Search::Field qw(GetItemSearchField ModItemSearchField);
25
use Koha::Item::Search::Field qw(GetItemSearchField ModItemSearchField);
26
26
(-)a/admin/items_search_fields.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI;
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
24
25
use Koha::Item::Search::Field qw(AddItemSearchField GetItemSearchFields DelItemSearchField);
25
use Koha::Item::Search::Field qw(AddItemSearchField GetItemSearchFields DelItemSearchField);
26
26
(-)a/admin/itemtypes.pl (-4 / +3 lines)
Lines 25-36 Link Here
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
27
28
use File::Spec;
29
28
30
use C4::Koha;
29
use C4::Koha qw( getImageSets GetAuthorisedValues );
31
use C4::Context;
30
use C4::Context;
32
use C4::Auth;
31
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
32
use C4::Output qw( output_html_with_http_headers );
34
use Koha::ItemTypes;
33
use Koha::ItemTypes;
35
use Koha::ItemType;
34
use Koha::ItemType;
36
use Koha::Localizations;
35
use Koha::Localizations;
(-)a/admin/koha2marclinks.pl (-3 / +2 lines)
Lines 22-30 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use Koha::Database;
24
use Koha::Database;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Output;
28
use Koha::BiblioFrameworks;
27
use Koha::BiblioFrameworks;
29
use Koha::Caches;
28
use Koha::Caches;
30
use Koha::MarcSubfieldStructures;
29
use Koha::MarcSubfieldStructures;
(-)a/admin/library_groups.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use Koha::Libraries;
26
use Koha::Libraries;
27
use Koha::Library::Group;
27
use Koha::Library::Group;
(-)a/admin/localization.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
23
24
use Koha::Localization;
24
use Koha::Localization;
25
use Koha::Localizations;
25
use Koha::Localizations;
(-)a/admin/marc_subfields_structure.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Output;
21
use C4::Output qw( output_html_with_http_headers );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
25
(-)a/admin/marctagstructure.pl (-3 / +2 lines)
Lines 20-29 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
25
use C4::Context;
24
use C4::Context;
26
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
26
use C4::Context;
28
27
29
use Koha::Caches;
28
use Koha::Caches;
(-)a/admin/matching-rules.pl (-3 / +2 lines)
Lines 21-30 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
use C4::Matcher qw/valid_normalization_routines/;
27
use C4::Matcher qw/valid_normalization_routines/;
29
28
30
my $script_name = "/cgi-bin/koha/admin/matching-rules.pl";
29
my $script_name = "/cgi-bin/koha/admin/matching-rules.pl";
(-)a/admin/oai_set_mappings.pl (-4 / +3 lines)
Lines 33-43 the OR operator will be applied. Link Here
33
use Modern::Perl;
33
use Modern::Perl;
34
34
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use C4::Auth;
36
use C4::Auth qw( get_template_and_user );
37
use C4::Output;
37
use C4::Output qw( output_html_with_http_headers );
38
use C4::OAI::Sets;
38
use C4::OAI::Sets qw( GetOAISet GetOAISetMappings ModOAISetMappings );
39
39
40
use Data::Dumper;
41
40
42
my $input = CGI->new;
41
my $input = CGI->new;
43
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/admin/oai_sets.pl (-4 / +3 lines)
Lines 29-39 Admin page to describe OAI SETs Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::OAI::Sets;
34
use C4::OAI::Sets qw( AddOAISet DelOAISet GetOAISet GetOAISets ModOAISet );
35
35
36
use Data::Dumper;
37
36
38
my $input = CGI->new;
37
my $input = CGI->new;
39
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
38
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/admin/overdrive.pl (-2 / +2 lines)
Lines 19-27 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use Koha::Libraries;
26
use Koha::Libraries;
27
use Koha::Library::OverDriveInfos;
27
use Koha::Library::OverDriveInfos;
(-)a/admin/patron-attr-types.pl (-4 / +3 lines)
Lines 22-33 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use List::MoreUtils qw/uniq/;
25
use List::MoreUtils qw( uniq );
26
26
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Context;
28
use C4::Context;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
use C4::Koha;
31
use Koha::Patron::Attribute::Types;
30
use Koha::Patron::Attribute::Types;
32
31
33
use Koha::AuthorisedValues;
32
use Koha::AuthorisedValues;
(-)a/admin/preferences.pl (-8 / +6 lines)
Lines 20-39 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Koha;
25
use C4::Koha qw( getallthemes );
26
use C4::Languages qw(getTranslatedLanguages);
26
use C4::Languages qw( getTranslatedLanguages );
27
use C4::ClassSource;
27
use C4::ClassSource qw( GetClassSources GetClassSource );
28
use C4::Log;
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output;
30
use C4::Templates;
29
use C4::Templates;
31
use Koha::Acquisition::Currencies;
30
use Koha::Acquisition::Currencies;
32
use File::Spec;
33
use IO::File;
31
use IO::File;
34
use YAML::XS;
32
use YAML::XS;
35
use Encode;
33
use Encode;
36
use List::MoreUtils qw(any);
34
use List::MoreUtils qw( any );
37
35
38
# use Smart::Comments;
36
# use Smart::Comments;
39
#
37
#
(-)a/admin/searchengine/elasticsearch/mappings.pl (-4 / +3 lines)
Lines 17-25 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI;
19
use CGI;
20
use Scalar::Util qw(looks_like_number);
20
use Scalar::Util qw( looks_like_number );
21
use List::Util qw( first );
21
use List::Util qw( first );
22
use C4::Koha;
23
use C4::Output;
22
use C4::Output;
24
use C4::Auth;
23
use C4::Auth;
25
use C4::Log;
24
use C4::Log;
Lines 30-37 use Koha::SearchMarcMaps; Link Here
30
use Koha::SearchFields;
29
use Koha::SearchFields;
31
use Koha::Caches;
30
use Koha::Caches;
32
31
33
use Try::Tiny;
32
use Try::Tiny qw( catch try );
34
use Module::Load::Conditional qw(can_load);
33
use Module::Load::Conditional qw( can_load );
35
34
36
35
37
my $input = CGI->new;
36
my $input = CGI->new;
(-)a/admin/share_content.pl (-3 / +3 lines)
Lines 18-28 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use JSON;
21
use JSON qw( to_json );
22
use HTTP::Request;
22
use HTTP::Request;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::SharedContent;
27
use Koha::SharedContent;
28
28
(-)a/admin/smart-rules.pl (-4 / +3 lines)
Lines 20-29 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use Koha::DateUtils qw( dt_from_string output_pref );
26
use Koha::DateUtils;
27
use Koha::Database;
26
use Koha::Database;
28
use Koha::Logger;
27
use Koha::Logger;
29
use Koha::Libraries;
28
use Koha::Libraries;
(-)a/admin/sms_providers.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use CGI;
22
use CGI;
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
use Koha::SMS::Provider;
28
use Koha::SMS::Provider;
29
use Koha::SMS::Providers;
29
use Koha::SMS::Providers;
(-)a/admin/smtp_servers.pl (-4 / +4 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Scalar::Util qw(blessed);
23
use Scalar::Util qw( blessed );
24
use Try::Tiny;
24
use Try::Tiny qw( catch try );
25
25
26
use C4::Auth qw(get_template_and_user);
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw(output_html_with_http_headers);
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
use Koha::Libraries;
29
use Koha::Libraries;
30
use Koha::SMTP::Servers;
30
use Koha::SMTP::Servers;
(-)a/admin/sru_modmapping.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
24
25
# Initialize CGI, template
25
# Initialize CGI, template
26
26
(-)a/admin/systempreferences.pl (-6 / +6 lines)
Lines 43-55 ALSO : Link Here
43
use Modern::Perl;
43
use Modern::Perl;
44
44
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MIME::Base64;
46
use MIME::Base64 qw( encode_base64 );
47
use C4::Auth;
47
use C4::Auth qw( get_template_and_user );
48
use C4::Context;
48
use C4::Context;
49
use C4::Koha;
49
use C4::Koha qw( getallthemes );
50
use C4::Languages qw(getTranslatedLanguages);
50
use C4::Languages qw( getTranslatedLanguages );
51
use C4::ClassSource;
51
use C4::ClassSource qw( GetClassSources GetClassSource );
52
use C4::Output;
52
use C4::Output qw( output_html_with_http_headers );
53
use YAML::XS;
53
use YAML::XS;
54
54
55
my %tabsysprefs; #we do no longer need to keep track of a tab per pref (yaml)
55
my %tabsysprefs; #we do no longer need to keep track of a tab per pref (yaml)
(-)a/admin/transfer_limits.pl (-6 / +2 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output;
26
use C4::Koha;
27
use C4::Circulation
28
  qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
29
25
30
my $input = CGI->new;
26
my $input = CGI->new;
31
27
(-)a/admin/transport-cost-matrix.pl (-5 / +3 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use C4::HoldsQueue qw( TransportCostMatrix UpdateTransportCostMatrix );
26
use C4::HoldsQueue qw(TransportCostMatrix UpdateTransportCostMatrix);
27
26
28
use Koha::Libraries;
27
use Koha::Libraries;
29
28
30
use Data::Dumper;
31
29
32
my $input = CGI->new;
30
my $input = CGI->new;
33
31
(-)a/admin/usage_statistics.pl (-3 / +3 lines)
Lines 18-26 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use Koha::DateUtils qw( dt_from_string output_pref );
23
use Koha::DateUtils qw( output_pref );
24
use Koha::Libraries;
24
use Koha::Libraries;
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
(-)a/admin/z3950servers.pl (-2 / +2 lines)
Lines 27-34 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
32
use Koha::Database;
32
use Koha::Database;
33
use Koha::Z3950Servers;
33
use Koha::Z3950Servers;
34
34
(-)a/api/v1/app.pl (-1 / +1 lines)
Lines 17-21 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
require Mojolicious::Commands;
20
use Mojolicious::Commands;
21
Mojolicious::Commands->start_app('Koha::REST::V1');
21
Mojolicious::Commands->start_app('Koha::REST::V1');
(-)a/authorities/auth_finder.pl (-4 / +2 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Acquisition;
28
use C4::Koha;
29
use Koha::SearchEngine::Search;
27
use Koha::SearchEngine::Search;
30
use Koha::SearchEngine::QueryBuilder;
28
use Koha::SearchEngine::QueryBuilder;
31
29
(-)a/authorities/authorities-home.pl (-7 / +4 lines)
Lines 20-35 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use URI::Escape;
23
use URI::Escape qw( uri_escape_utf8 );
24
use POSIX qw( ceil );
24
use POSIX qw( ceil );
25
25
26
use C4::Context;
26
use C4::Context;
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output;
28
use C4::Output qw( output_and_exit pagination_bar output_html_with_http_headers );
29
use C4::AuthoritiesMarc;
29
use C4::AuthoritiesMarc qw( DelAuthority );
30
use C4::Acquisition;
31
use C4::Koha;
32
use C4::Biblio;
33
use C4::Search::History;
30
use C4::Search::History;
34
31
35
use Koha::Authority::Types;
32
use Koha::Authority::Types;
(-)a/authorities/authorities.pl (-7 / +6 lines)
Lines 21-36 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::AuthoritiesMarc;
26
use C4::AuthoritiesMarc qw( GetAuthority );
27
use C4::ImportBatch; #GetImportRecordMarc
27
use C4::ImportBatch qw( GetImportRecordMarc );
28
use C4::Context;
28
use C4::Context;
29
use C4::Koha;
29
use Date::Calc qw( Today );
30
use Date::Calc qw(Today);
31
use MARC::File::USMARC;
30
use MARC::File::USMARC;
32
use MARC::File::XML;
31
use MARC::File::XML;
33
use C4::Biblio;
32
use C4::Biblio qw( TransformHtmlToMarc );
34
use Koha::Authority::Types;
33
use Koha::Authority::Types;
35
use Koha::ItemTypes;
34
use Koha::ItemTypes;
36
use vars qw( $tagslib);
35
use vars qw( $tagslib);
(-)a/authorities/blinddetail-biblio-search.pl (-5 / +3 lines)
Lines 38-50 parameters tables. Link Here
38
38
39
use Modern::Perl;
39
use Modern::Perl;
40
40
41
use C4::AuthoritiesMarc;
41
use C4::Auth qw( get_template_and_user );
42
use C4::Auth;
42
use C4::AuthoritiesMarc qw( GetAuthority );
43
use C4::Context;
43
use C4::Context;
44
use C4::Output;
44
use C4::Output qw( output_html_with_http_headers );
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MARC::Record;
47
use C4::Koha;
48
46
49
use Koha::Authorities;
47
use Koha::Authorities;
50
use Koha::Authority::Types;
48
use Koha::Authority::Types;
(-)a/authorities/detail-biblio-search.pl (-5 / +3 lines)
Lines 38-50 parameters tables. Link Here
38
38
39
use Modern::Perl;
39
use Modern::Perl;
40
40
41
use C4::AuthoritiesMarc;
41
use C4::Auth qw( get_template_and_user );
42
use C4::Auth;
42
use C4::AuthoritiesMarc qw( GetAuthority );
43
use C4::Context;
43
use C4::Context;
44
use C4::Output;
44
use C4::Output qw( output_html_with_http_headers );
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MARC::Record;
47
use C4::Koha;
48
# use C4::Biblio;
46
# use C4::Biblio;
49
# use C4::Catalogue;
47
# use C4::Catalogue;
50
48
(-)a/authorities/detail.pl (-4 / +3 lines)
Lines 38-49 parameters tables. Link Here
38
38
39
use Modern::Perl;
39
use Modern::Perl;
40
40
41
use C4::AuthoritiesMarc;
41
use C4::Auth qw( get_template_and_user );
42
use C4::Auth;
42
use C4::AuthoritiesMarc qw( GetAuthority GenerateHierarchy );
43
use C4::Context;
43
use C4::Context;
44
use C4::Output;
44
use C4::Output qw( output_html_with_http_headers );
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use MARC::Record;
47
use C4::Koha;
46
use C4::Koha;
48
use Koha::Authorities;
47
use Koha::Authorities;
49
48
(-)a/authorities/export.pl (-2 / +2 lines)
Lines 2-10 Link Here
2
use Modern::Perl;
2
use Modern::Perl;
3
3
4
use C4::Record;
4
use C4::Record;
5
use C4::Auth;
5
use C4::Auth qw( get_template_and_user );
6
use C4::Output;
6
use C4::Output;
7
use C4::AuthoritiesMarc;
7
use C4::AuthoritiesMarc qw( GetAuthority );
8
use CGI qw ( -utf8 );
8
use CGI qw ( -utf8 );
9
9
10
my $query = CGI->new;
10
my $query = CGI->new;
(-)a/authorities/merge.pl (-5 / +4 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::AuthoritiesMarc;
24
use C4::AuthoritiesMarc qw( GetAuthority ModAuthority DelAuthority );
25
use C4::Koha;
25
use C4::Biblio qw( TransformHtmlToMarc );
26
use C4::Biblio;
27
26
28
use Koha::Authority::MergeRequests;
27
use Koha::Authority::MergeRequests;
29
use Koha::Authority::Types;
28
use Koha::Authority::Types;
(-)a/authorities/merge_ajax.pl (-3 / +3 lines)
Lines 4-14 use Modern::Perl; Link Here
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
7
use JSON;
7
use JSON qw( encode_json );
8
8
9
use C4::Context;
9
use C4::Context;
10
use C4::Auth qw/check_cookie_auth/;
10
use C4::Auth qw( check_cookie_auth );
11
use C4::AuthoritiesMarc;
11
use C4::AuthoritiesMarc qw( GetTagsLabels );
12
12
13
my %cookies = CGI::Cookie->fetch;
13
my %cookies = CGI::Cookie->fetch;
14
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
14
my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
(-)a/authorities/ysearch.pl (-4 / +4 lines)
Lines 29-40 This script allows ajax call for dynamic authorities search Link Here
29
29
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use Modern::Perl;
31
use Modern::Perl;
32
use JSON;
32
use JSON qw( to_json );
33
33
34
use C4::Context;
34
use C4::Context;
35
use C4::Charset;
35
use C4::Charset qw( nsb_clean );
36
use C4::Auth qw/check_cookie_auth/;
36
use C4::Auth qw( check_cookie_auth );
37
use C4::Output;
37
use C4::Output qw( output_with_http_headers );
38
use Koha::SearchEngine::Search;
38
use Koha::SearchEngine::Search;
39
use Koha::SearchEngine::QueryBuilder;
39
use Koha::SearchEngine::QueryBuilder;
40
40
(-)a/basket/basket.pl (-4 / +11 lines)
Lines 19-28 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Koha;
21
use C4::Koha;
22
use C4::Biblio;
22
use C4::Biblio qw(
23
use C4::Items;
23
    GetBiblioData
24
use C4::Auth;
24
    GetMarcAuthors
25
use C4::Output;
25
    GetMarcBiblio
26
    GetMarcSeries
27
    GetMarcSubjects
28
    GetMarcUrls
29
);
30
use C4::Items qw( GetItemsInfo );
31
use C4::Auth qw( get_template_and_user );
32
use C4::Output qw( output_html_with_http_headers );
26
33
27
use Koha::AuthorisedValues;
34
use Koha::AuthorisedValues;
28
use Koha::Biblios;
35
use Koha::Biblios;
(-)a/basket/downloadcart.pl (-6 / +5 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
23
use Encode qw( encode );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
26
use C4::Biblio qw( GetMarcBiblio );
27
use C4::Items;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output;
29
use C4::Record;
28
use C4::Record;
30
use C4::Ris;
29
use C4::Ris qw( marc2ris );
31
30
32
use Koha::CsvProfiles;
31
use Koha::CsvProfiles;
33
32
(-)a/basket/sendbasket.pl (-9 / +14 lines)
Lines 18-32 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Encode qw(encode);
21
use Encode;
22
use Carp;
22
use Carp qw( carp );
23
use Try::Tiny;
23
use Try::Tiny qw( catch try );
24
24
25
use C4::Biblio;
25
use C4::Biblio qw(
26
use C4::Items;
26
    GetBiblioData
27
use C4::Auth;
27
    GetMarcAuthors
28
use C4::Output;
28
    GetMarcBiblio
29
use C4::Templates ();
29
    GetMarcSubjects
30
);
31
use C4::Items qw( GetItemsInfo );
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output qw( output_and_exit output_html_with_http_headers );
34
use C4::Templates;
30
use Koha::Email;
35
use Koha::Email;
31
use Koha::Token;
36
use Koha::Token;
32
37
(-)a/catalogue/ISBDdetail.pl (-7 / +5 lines)
Lines 36-50 This script needs a biblionumber as parameter Link Here
36
use Modern::Perl;
36
use Modern::Perl;
37
37
38
use HTML::Entities;
38
use HTML::Entities;
39
use C4::Auth;
39
use C4::Auth qw( get_template_and_user );
40
use C4::Context;
40
use C4::Context;
41
use C4::Output;
41
use C4::Output qw( output_html_with_http_headers );
42
use CGI qw ( -utf8 );
42
use CGI qw ( -utf8 );
43
use C4::Koha;
43
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetISBDView GetMarcBiblio );
44
use C4::Biblio;
44
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
45
use C4::Items;
45
use C4::Search qw( z3950_search_args enabled_staff_search_views );
46
use C4::Serials;    # CountSubscriptionFromBiblionumber
47
use C4::Search;		# enabled_staff_search_views
48
46
49
use Koha::Biblios;
47
use Koha::Biblios;
50
use Koha::Patrons;
48
use Koha::Patrons;
(-)a/catalogue/MARCdetail.pl (-9 / +13 lines)
Lines 47-67 use Modern::Perl; Link Here
47
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
48
use HTML::Entities;
48
use HTML::Entities;
49
49
50
use C4::Auth;
50
use C4::Auth qw( get_template_and_user );
51
use C4::Context;
51
use C4::Context;
52
use C4::Output;
52
use C4::Output qw( output_html_with_http_headers );
53
use C4::Koha;
53
use C4::Koha;
54
use MARC::Record;
54
use C4::Biblio qw(
55
use C4::Biblio;
55
    GetAuthorisedValueDesc
56
use C4::Items;
56
    GetBiblioData
57
use C4::Acquisition;
57
    GetFrameworkCode
58
use C4::Serials;    #uses getsubscriptionsfrombiblionumber GetSubscriptionsFromBiblionumber
58
    GetMarcBiblio
59
use C4::Search;		# enabled_staff_search_views
59
    GetMarcFromKohaField
60
    GetMarcStructure
61
);
62
use C4::Serials qw( CountSubscriptionFromBiblionumber GetSubscription GetSubscriptionsFromBiblionumber );
63
use C4::Search qw( z3950_search_args enabled_staff_search_views );
60
64
61
use Koha::Biblios;
65
use Koha::Biblios;
62
use Koha::BiblioFrameworks;
66
use Koha::BiblioFrameworks;
63
use Koha::Patrons;
67
use Koha::Patrons;
64
use Koha::DateUtils;
68
use Koha::DateUtils qw( output_pref );
65
use Koha::Virtualshelves;
69
use Koha::Virtualshelves;
66
70
67
use List::MoreUtils qw( uniq );
71
use List::MoreUtils qw( uniq );
(-)a/catalogue/detail.pl (-17 / +22 lines)
Lines 20-45 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use HTML::Entities;
22
use HTML::Entities;
23
use Try::Tiny;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Auth;
25
use C4::Context;
24
use C4::Context;
26
use C4::Koha;
25
use C4::Koha qw(
27
use C4::Serials;    #uses getsubscriptionfrom biblionumber
26
    GetAuthorisedValues
28
use C4::Output;
27
    getitemtypeimagelocation
29
use C4::Biblio;
28
    GetNormalizedEAN
30
use C4::Items;
29
    GetNormalizedISBN
31
use C4::Circulation;
30
    GetNormalizedOCLCNumber
31
    GetNormalizedUPC
32
);
33
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
36
use C4::Items qw( GetAnalyticsCount GetHostItemsInfo GetItemsInfo );
37
use C4::Circulation qw( GetTransfers );
32
use C4::Reserves;
38
use C4::Reserves;
33
use C4::Serials;
39
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
34
use C4::XISBN qw(get_xisbns);
40
use C4::XISBN qw( get_xisbns );
35
use C4::External::Amazon;
41
use C4::External::Amazon qw( get_amazon_tld );
36
use C4::Search;        # enabled_staff_search_views
42
use C4::Search qw( z3950_search_args enabled_staff_search_views );
37
use C4::Tags qw(get_tags);
43
use C4::Tags qw( get_tags );
38
use C4::XSLT;
44
use C4::XSLT qw( XSLTParse4Display );
39
use Koha::DateUtils;
45
use Koha::DateUtils qw( format_sqldatetime );
40
use C4::HTML5Media;
46
use C4::HTML5Media;
41
use C4::CourseReserves qw(GetItemCourseReservesInfo);
47
use C4::CourseReserves qw( GetItemCourseReservesInfo );
42
use C4::Acquisition qw(GetOrdersByBiblionumber);
43
use Koha::AuthorisedValues;
48
use Koha::AuthorisedValues;
44
use Koha::Biblios;
49
use Koha::Biblios;
45
use Koha::CoverImages;
50
use Koha::CoverImages;
(-)a/catalogue/export.pl (-3 / +3 lines)
Lines 2-12 Link Here
2
use Modern::Perl;
2
use Modern::Perl;
3
3
4
use C4::Record;
4
use C4::Record;
5
use C4::Auth;
5
use C4::Auth qw( get_template_and_user );
6
use C4::Output;
6
use C4::Output;
7
use C4::Biblio;
7
use C4::Biblio qw( GetMarcBiblio GetMarcControlnumber );
8
use CGI qw ( -utf8 );
8
use CGI qw ( -utf8 );
9
use C4::Ris;
9
use C4::Ris qw( marc2ris );
10
10
11
11
12
12
(-)a/catalogue/getitem-ajax.pl (-6 / +4 lines)
Lines 19-31 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use JSON;
22
use JSON qw( to_json );
23
23
24
use C4::Auth;
24
use C4::Auth qw( check_api_auth );
25
use C4::Biblio;
25
use C4::Biblio qw( GetMarcStructure );
26
use C4::Items;
26
use C4::Output qw( output_with_http_headers );
27
use C4::Koha;
28
use C4::Output;
29
use Koha::Libraries;
27
use Koha::Libraries;
30
28
31
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
(-)a/catalogue/imageviewer.pl (-5 / +4 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Biblio;
24
use C4::Items qw( GetItemsInfo );
25
use C4::Items;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output;
26
use C4::Search qw( enabled_staff_search_views );
27
use C4::Search;
28
27
29
use Koha::Biblios;
28
use Koha::Biblios;
30
use Koha::Items;
29
use Koha::Items;
(-)a/catalogue/issuehistory.pl (-5 / +4 lines)
Lines 19-30 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
24
25
use C4::Biblio;    # GetBiblio
25
use C4::Search qw( enabled_staff_search_views );
26
use C4::Search;		# enabled_staff_search_views
26
use C4::Serials qw( CountSubscriptionFromBiblionumber );
27
use C4::Serials;
28
use Koha::Checkouts;
27
use Koha::Checkouts;
29
use Koha::Old::Checkouts;
28
use Koha::Old::Checkouts;
30
29
(-)a/catalogue/item-export.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
26
26
27
my $cgi = CGI->new;
27
my $cgi = CGI->new;
(-)a/catalogue/itemsearch.pl (-6 / +5 lines)
Lines 19-31 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI;
20
use CGI;
21
21
22
use JSON;
22
use JSON qw( to_json );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_with_http_headers output_html_with_http_headers );
26
use C4::Items;
26
use C4::Items qw( SearchItems );
27
use C4::Biblio;
27
use C4::Koha qw( GetAuthorisedValues );
28
use C4::Koha;
29
28
30
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
31
use Koha::Biblios;
30
use Koha::Biblios;
(-)a/catalogue/labeledMARCdetail.pl (-7 / +10 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 ); 
21
use CGI qw ( -utf8 ); 
22
use HTML::Entities;
22
use HTML::Entities;
23
use MARC::Record;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Auth;
25
use C4::Context;
24
use C4::Context;
26
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio;
26
use C4::Biblio qw(
28
use C4::Items;
27
    GetBiblioData
29
use C4::Search;		# enabled_staff_search_views
28
    GetFrameworkCode
30
use C4::Serials;
29
    GetMarcBiblio
30
    GetMarcStructure
31
);
32
use C4::Search qw( z3950_search_args enabled_staff_search_views );
33
use C4::Serials qw( CountSubscriptionFromBiblionumber );
31
34
32
use Koha::Biblios;
35
use Koha::Biblios;
33
use Koha::BiblioFrameworks;
36
use Koha::BiblioFrameworks;
(-)a/catalogue/moredetail.pl (-9 / +8 lines)
Lines 20-40 Link Here
20
20
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Koha;
23
use C4::Koha qw( GetAuthorisedValues );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use HTML::Entities;
25
use HTML::Entities;
26
use C4::Biblio;
26
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
27
use C4::Items;
27
use C4::Items qw( GetHostItemsInfo GetItemsInfo );
28
use C4::Acquisition;
28
use C4::Acquisition qw( GetOrderFromItemnumber GetBasket GetInvoice );
29
use C4::Output;
29
use C4::Output qw( output_and_exit output_html_with_http_headers );
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Serials;
31
use C4::Serials qw( CountSubscriptionFromBiblionumber );
32
use C4::Search;		# enabled_staff_search_views
32
use C4::Search qw( enabled_staff_search_views z3950_search_args );
33
33
34
use Koha::Acquisition::Booksellers;
34
use Koha::Acquisition::Booksellers;
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::Biblios;
36
use Koha::Biblios;
37
use Koha::DateUtils;
38
use Koha::Items;
37
use Koha::Items;
39
use Koha::Patrons;
38
use Koha::Patrons;
40
39
(-)a/catalogue/search-history.pl (-2 / +2 lines)
Lines 21-29 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Search::History;
25
use C4::Search::History;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/catalogue/search.pl (-6 / +6 lines)
Lines 140-153 use Modern::Perl; Link Here
140
140
141
## load Koha modules
141
## load Koha modules
142
use C4::Context;
142
use C4::Context;
143
use C4::Output;
143
use C4::Output qw( output_html_with_http_headers pagination_bar );
144
use C4::Auth qw(:DEFAULT get_session);
144
use C4::Auth qw( get_template_and_user );
145
use C4::Search;
145
use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
146
use C4::Languages qw(getLanguages);
146
use C4::Languages qw( getlanguage getLanguages );
147
use C4::Koha;
147
use C4::Koha qw( getitemtypeimagelocation GetAuthorisedValues );
148
use URI::Escape;
148
use URI::Escape;
149
use POSIX qw(ceil floor);
149
use POSIX qw(ceil floor);
150
use C4::Search::History;
150
use C4::Search qw( searchResults enabled_staff_search_views z3950_search_args new_record_from_zebra );
151
151
152
use Koha::ItemTypes;
152
use Koha::ItemTypes;
153
use Koha::Library::Groups;
153
use Koha::Library::Groups;
(-)a/catalogue/showmarc.pl (-6 / +5 lines)
Lines 24-39 use Modern::Perl; Link Here
24
24
25
# standard or CPAN modules used
25
# standard or CPAN modules used
26
use CGI qw(:standard -utf8);
26
use CGI qw(:standard -utf8);
27
use DBI;
28
use Encode;
27
use Encode;
29
28
30
# Koha modules used
29
# Koha modules used
31
use C4::Context;
30
use C4::Context;
32
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
33
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
34
use C4::Biblio;
33
use C4::Biblio qw( GetMarcBiblio GetXmlBiblio );
35
use C4::ImportBatch;
34
use C4::ImportBatch qw( GetRecordFromImportBiblio );
36
use C4::XSLT ();
35
use C4::XSLT;
37
36
38
my $input= CGI->new;
37
my $input= CGI->new;
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
38
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/catalogue/stockrotation.pl (-5 / +5 lines)
Lines 27-42 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI;
28
use CGI;
29
29
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
32
use C4::Search;
32
use C4::Search qw( enabled_staff_search_views );
33
use C4::Serials;
33
use C4::Serials qw( CountSubscriptionFromBiblionumber );
34
34
35
use Koha::Biblio;
35
use Koha::Biblio;
36
use Koha::Item;
36
use Koha::Item;
37
use Koha::StockRotationRotas;
37
use Koha::StockRotationRotas;
38
use Koha::StockRotationStages;
38
use Koha::StockRotationStages;
39
use Koha::Util::StockRotation qw(:ALL);
39
use Koha::Util::StockRotation qw( get_stages get_branches toggle_indemand remove_from_stage move_to_next_stage );
40
40
41
my $input = CGI->new;
41
my $input = CGI->new;
42
42
(-)a/catalogue/updateitem.pl (-4 / +2 lines)
Lines 19-30 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( checkauth );
23
use C4::Context;
23
use C4::Context;
24
use C4::Biblio;
25
use C4::Items;
26
use C4::Output;
24
use C4::Output;
27
use C4::Circulation;
25
use C4::Circulation qw( LostItem );
28
use C4::Reserves;
26
use C4::Reserves;
29
27
30
my $cgi= CGI->new;
28
my $cgi= CGI->new;
(-)a/cataloguing/addbiblio.pl (-14 / +23 lines)
Lines 21-51 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI q(-utf8);
24
use CGI;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user haspermission );
27
use C4::Biblio;
27
use C4::Biblio qw(
28
use C4::Search;
28
    AddBiblio
29
use C4::AuthoritiesMarc;
29
    DelBiblio
30
    GetFrameworkCode
31
    GetMarcBiblio
32
    GetMarcFromKohaField
33
    GetMarcStructure
34
    GetUsedMarcStructure
35
    ModBiblio
36
    prepare_host_field
37
    PrepHostMarcField
38
    TransformHtmlToMarc
39
);
40
use C4::Search qw( FindDuplicate enabled_staff_search_views );
41
use C4::Auth qw( get_template_and_user haspermission );
30
use C4::Context;
42
use C4::Context;
31
use MARC::Record;
43
use MARC::Record;
32
use C4::Log;
44
use C4::ClassSource qw( GetClassSources );
33
use C4::Koha;
45
use C4::ImportBatch qw( GetImportRecordMarc );
34
use C4::ClassSource;
46
use C4::Charset qw( SetMarcUnicodeFlag );
35
use C4::ImportBatch;
36
use C4::Charset;
37
use Koha::BiblioFrameworks;
47
use Koha::BiblioFrameworks;
38
use Koha::DateUtils;
48
use Koha::DateUtils qw( dt_from_string );
39
49
40
use Koha::ItemTypes;
50
use Koha::ItemTypes;
41
use Koha::Libraries;
51
use Koha::Libraries;
42
52
43
use Koha::BiblioFrameworks;
53
use Koha::BiblioFrameworks;
44
54
45
use Date::Calc qw(Today);
46
use MARC::File::USMARC;
55
use MARC::File::USMARC;
47
use MARC::File::XML;
56
use MARC::File::XML;
48
use URI::Escape;
57
use URI::Escape qw( uri_escape_utf8 );
49
58
50
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
59
if ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
51
    MARC::File::XML->default_record_format('UNIMARC');
60
    MARC::File::XML->default_record_format('UNIMARC');
(-)a/cataloguing/addbooks.pl (-8 / +6 lines)
Lines 27-40 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
28
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use URI::Escape;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Auth;
31
use C4::Breeding qw( BreedingSearch );
32
use C4::Biblio;
32
use C4::Output qw( output_html_with_http_headers pagination_bar );
33
use C4::Breeding;
33
use C4::Koha qw( getnbpages );
34
use C4::Output;
34
use C4::Languages;
35
use C4::Koha;
35
use C4::Search qw( searchResults z3950_search_args );
36
use C4::Languages qw(getlanguage);
37
use C4::Search;
38
36
39
use Koha::BiblioFrameworks;
37
use Koha::BiblioFrameworks;
40
use Koha::SearchEngine::Search;
38
use Koha::SearchEngine::Search;
(-)a/cataloguing/additem.pl (-14 / +24 lines)
Lines 22-50 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user haspermission );
26
use C4::Output;
26
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
27
use C4::Biblio;
27
use C4::Biblio qw(
28
use C4::Items;
28
    GetAuthorisedValueDesc
29
    GetFrameworkCode
30
    GetMarcBiblio
31
    GetMarcFromKohaField
32
    GetMarcStructure
33
    IsMarcStructureInternal
34
    ModBiblio
35
    TransformHtmlToXml
36
    TransformMarcToKoha
37
);
38
use C4::Items qw( AddItemFromMarc ModItemFromMarc );
29
use C4::Context;
39
use C4::Context;
30
use C4::Circulation;
40
use C4::Circulation qw( LostItem );
31
use C4::Koha;
41
use C4::Koha qw( GetAuthorisedValues );
32
use C4::ClassSource;
42
use C4::ClassSource qw( GetClassSources GetClassSource );
33
use Koha::DateUtils;
43
use Koha::DateUtils qw( dt_from_string );
34
use Koha::Items;
44
use Koha::Items;
35
use Koha::ItemTypes;
45
use Koha::ItemTypes;
36
use Koha::Libraries;
46
use Koha::Libraries;
37
use Koha::Patrons;
47
use Koha::Patrons;
38
use Koha::SearchEngine::Indexer;
48
use Koha::SearchEngine::Indexer;
39
use List::MoreUtils qw/any/;
49
use List::MoreUtils qw( any );
40
use C4::Search;
50
use C4::Search qw( enabled_staff_search_views );
41
use Storable qw(thaw freeze);
51
use Storable qw( freeze thaw );
42
use URI::Escape;
52
use URI::Escape qw( uri_escape_utf8 );
43
use C4::Members;
53
use C4::Members;
44
54
45
use MARC::File::XML;
55
use MARC::File::XML;
46
use URI::Escape;
56
use URI::Escape qw( uri_escape_utf8 );
47
use MIME::Base64 qw(decode_base64url encode_base64url);
57
use MIME::Base64 qw( decode_base64url encode_base64url );
48
58
49
our $dbh = C4::Context->dbh;
59
our $dbh = C4::Context->dbh;
50
60
(-)a/cataloguing/editor.pl (-4 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI;
23
use CGI;
24
use MARC::Record;
25
24
26
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
27
use C4::Biblio;
28
use C4::Context;
26
use C4::Context;
29
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
30
use DBIx::Class::ResultClass::HashRefInflator;
28
use DBIx::Class::ResultClass::HashRefInflator;
31
use Koha::Database;
29
use Koha::Database;
32
use Koha::MarcSubfieldStructures;
30
use Koha::MarcSubfieldStructures;
(-)a/cataloguing/linkitem.pl (-5 / +3 lines)
Lines 22-33 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio;
27
use C4::Biblio qw( GetMarcBiblio ModBiblio PrepHostMarcField );
28
use C4::Items;
29
use C4::Context;
28
use C4::Context;
30
use C4::Koha;
31
29
32
30
33
my $query = CGI->new;
31
my $query = CGI->new;
(-)a/cataloguing/merge.pl (-8 / +16 lines)
Lines 21-34 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Items;
26
use C4::Items qw( MoveItemFromBiblio );
27
use C4::Biblio;
27
use C4::Biblio qw(
28
use C4::Serials;
28
    DelBiblio
29
use C4::Koha;
29
    GetBiblioData
30
use C4::Reserves qw/MergeHolds/;
30
    GetFrameworkCode
31
use C4::Acquisition qw/ModOrder GetOrdersByBiblionumber/;
31
    GetMarcBiblio
32
    GetMarcFromKohaField
33
    GetMarcStructure
34
    ModBiblio
35
    TransformHtmlToMarc
36
);
37
use C4::Serials qw( CountSubscriptionFromBiblionumber );
38
use C4::Reserves qw( MergeHolds );
39
use C4::Acquisition qw( ModOrder GetOrdersByBiblionumber );
32
40
33
use Koha::BiblioFrameworks;
41
use Koha::BiblioFrameworks;
34
use Koha::Items;
42
use Koha::Items;
(-)a/cataloguing/merge_ajax.pl (-3 / +3 lines)
Lines 4-14 use Modern::Perl; Link Here
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
6
use CGI::Cookie; # need to check cookies before CGI parses the POST request
7
use JSON;
7
use JSON qw( encode_json );
8
8
9
use C4::Context;
9
use C4::Context;
10
use C4::Biblio;
10
use C4::Biblio qw( GetMarcStructure );
11
use C4::Auth qw/check_cookie_auth/;
11
use C4::Auth qw( check_cookie_auth );
12
12
13
my %cookies = CGI::Cookie->fetch;
13
my %cookies = CGI::Cookie->fetch;
14
my ( $auth_status, $sessionID ) = check_cookie_auth(
14
my ( $auth_status, $sessionID ) = check_cookie_auth(
(-)a/cataloguing/moveitem.pl (-6 / +3 lines)
Lines 22-39 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio;
27
use C4::Items qw( MoveItemFromBiblio );
28
use C4::Items;
29
use C4::Context;
28
use C4::Context;
30
use C4::Koha;
31
use C4::ClassSource;
29
use C4::ClassSource;
32
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/;
30
use C4::Acquisition qw/GetOrderFromItemnumber ModOrder GetOrder/;
33
31
34
use Koha::Biblios;
32
use Koha::Biblios;
35
33
36
use Date::Calc qw(Today);
37
34
38
use MARC::File::XML;
35
use MARC::File::XML;
39
36
(-)a/cataloguing/value_builder/EXAMPLE.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
24
25
# Example of framework plugin new style.
25
# Example of framework plugin new style.
26
# It should define and return at least one and normally two anynomous
26
# It should define and return at least one and normally two anynomous
(-)a/cataloguing/value_builder/barcode.pl (-3 / +3 lines)
Lines 24-33 use Modern::Perl; Link Here
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Barcodes::ValueBuilder;
26
use C4::Barcodes::ValueBuilder;
27
use C4::Biblio qw/GetMarcFromKohaField/;
27
use C4::Biblio qw( GetMarcFromKohaField );
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
29
30
use Algorithm::CheckDigits;
30
use Algorithm::CheckDigits qw( CheckDigits );
31
31
32
my $builder = sub {
32
my $builder = sub {
33
    my ( $params ) = @_;
33
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/barcode_manual.pl (-2 / +2 lines)
Lines 24-31 use Modern::Perl; Link Here
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Barcodes::ValueBuilder;
26
use C4::Barcodes::ValueBuilder;
27
use C4::Biblio qw/GetMarcFromKohaField/;
27
use C4::Biblio qw( GetMarcFromKohaField );
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
29
30
my $builder = sub {
30
my $builder = sub {
31
    my ( $params ) = @_;
31
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/callnumber-KU.pl (-2 / +2 lines)
Lines 22-30 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
=head1 DESCRIPTION
29
=head1 DESCRIPTION
30
30
(-)a/cataloguing/value_builder/callnumber.pl (-2 / +2 lines)
Lines 22-30 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
=head1 DESCRIPTION
29
=head1 DESCRIPTION
30
30
(-)a/cataloguing/value_builder/cn_browser.pl (-4 / +3 lines)
Lines 20-30 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI;
24
23
25
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
26
use C4::ClassSource;
25
use C4::ClassSource qw( GetClassSort );
27
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
28
27
29
use Koha::ClassSources;
28
use Koha::ClassSources;
30
29
(-)a/cataloguing/value_builder/dateaccessioned.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
# along with Koha; if not, see <http://www.gnu.org/licenses>.
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string output_pref );
25
25
26
my $builder = sub {
26
my $builder = sub {
27
    my ( $params ) = @_;
27
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/macles.pl (-2 / +2 lines)
Lines 23-30 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
28
29
my $builder = sub {
29
my $builder = sub {
30
    my ( $params ) = @_;
30
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/marc21_field_006.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
use XML::LibXML;
30
use XML::LibXML;
31
31
(-)a/cataloguing/value_builder/marc21_field_007.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
my $builder = sub {
31
my $builder = sub {
32
    my ( $params ) = @_;
32
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/marc21_field_008.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
use XML::LibXML;
30
use XML::LibXML;
31
use Koha::Util::FrameworkPlugin qw|date_entered|;
31
use Koha::Util::FrameworkPlugin qw|date_entered|;
(-)a/cataloguing/value_builder/marc21_field_008_authorities.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
use Koha::Util::FrameworkPlugin qw|date_entered|;
29
use Koha::Util::FrameworkPlugin qw|date_entered|;
30
30
31
use constant FIXLEN_DATA_ELTS => '|| aca||aabn           | a|a     d';
31
use constant FIXLEN_DATA_ELTS => '|| aca||aabn           | a|a     d';
(-)a/cataloguing/value_builder/marc21_field_008_classifications.pl (-2 / +2 lines)
Lines 16-27 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use C4::Auth;
19
use C4::Auth qw( get_template_and_user );
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Context;
21
use C4::Context;
22
22
23
use C4::Search;
23
use C4::Search;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::Util::FrameworkPlugin qw|date_entered|;
25
use Koha::Util::FrameworkPlugin qw|date_entered|;
26
26
27
use constant FIXLEN_DATA_ELTS => 'baaaaaaa';
27
use constant FIXLEN_DATA_ELTS => 'baaaaaaa';
(-)a/cataloguing/value_builder/marc21_leader.pl (-2 / +2 lines)
Lines 22-30 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
my $builder = sub {
29
my $builder = sub {
30
    my ( $params ) = @_;
30
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/marc21_leader_authorities.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
my $builder = sub {
31
my $builder = sub {
32
    my ( $params ) = @_;
32
    my ( $params ) = @_;
(-)a/cataloguing/value_builder/marc21_linking_section.pl (-7 / +5 lines)
Lines 22-36 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Context;
26
use C4::Context;
27
use C4::Search;
27
use C4::Search qw( new_record_from_zebra );
28
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
use C4::Biblio;
31
use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
32
use C4::Koha;
33
use MARC::Record;
34
32
35
use Koha::ItemTypes;
33
use Koha::ItemTypes;
36
34
(-)a/cataloguing/value_builder/normarc_field_007.pl (-2 / +2 lines)
Lines 18-29 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
24
25
use C4::Search;
25
use C4::Search;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
sub plugin_javascript {
28
sub plugin_javascript {
29
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
29
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/normarc_field_008.pl (-2 / +2 lines)
Lines 18-29 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
24
25
use C4::Search;
25
use C4::Search;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
# find today's date
28
# find today's date
29
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
29
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
(-)a/cataloguing/value_builder/normarc_leader.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/stocknumberAV.pl (-2 / +2 lines)
Lines 22-29 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use Koha::AuthorisedValues;
27
use Koha::AuthorisedValues;
28
28
29
=head1 DESCRIPTION
29
=head1 DESCRIPTION
(-)a/cataloguing/value_builder/stocknumberam123.pl (-2 / +2 lines)
Lines 22-30 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
=head1 DESCRIPTION
29
=head1 DESCRIPTION
30
30
(-)a/cataloguing/value_builder/unimarc_field_010.pl (-2 / +2 lines)
Lines 19-28 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
27
28
sub plugin_javascript {
28
sub plugin_javascript {
(-)a/cataloguing/value_builder/unimarc_field_100.pl (-3 / +3 lines)
Lines 20-32 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Date::Calc qw( Today );
23
use Date::Calc;
24
24
25
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use Koha::Util::FrameworkPlugin qw(wrapper);
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use CGI qw ( -utf8 );
27
use CGI qw ( -utf8 );
28
use C4::Context;
28
use C4::Context;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
31
32
sub plugin_javascript {
32
sub plugin_javascript {
(-)a/cataloguing/value_builder/unimarc_field_100_authorities.pl (-2 / +2 lines)
Lines 20-29 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Koha::Util::FrameworkPlugin qw(wrapper);
22
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
28
29
sub plugin_javascript {
29
sub plugin_javascript {
(-)a/cataloguing/value_builder/unimarc_field_105.pl (-2 / +2 lines)
Lines 22-33 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
31
31
32
sub plugin_javascript {
32
sub plugin_javascript {
33
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_106.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_110.pl (-2 / +2 lines)
Lines 22-33 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
31
31
32
sub plugin_javascript {
32
sub plugin_javascript {
33
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
    my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_115a.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
(-)a/cataloguing/value_builder/unimarc_field_115b.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
(-)a/cataloguing/value_builder/unimarc_field_116.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
(-)a/cataloguing/value_builder/unimarc_field_117.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_120.pl (-2 / +2 lines)
Lines 22-33 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
31
31
32
sub plugin_javascript {
32
sub plugin_javascript {
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_121a.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_121b.pl (-2 / +2 lines)
Lines 19-30 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
25
26
use C4::Search;
26
use C4::Search;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
sub plugin_javascript {
29
sub plugin_javascript {
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_122.pl (-2 / +2 lines)
Lines 19-30 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
25
26
use C4::Search;
26
use C4::Search;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
sub plugin_javascript {
29
sub plugin_javascript {
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_123a.pl (-2 / +2 lines)
Lines 19-30 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
25
26
use C4::Search;
26
use C4::Search;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
sub plugin_javascript {
29
sub plugin_javascript {
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_123d.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_123e.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_123f.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_123g.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_123i.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_123j.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124a.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124b.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124c.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124d.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124e.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124f.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_124g.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_125.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
=head1 DESCRIPTION
30
=head1 DESCRIPTION
31
31
(-)a/cataloguing/value_builder/unimarc_field_125a.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_125b.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_126.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_126a.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_126b.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_127.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_128a.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_128b.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_128c.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_130.pl (-2 / +2 lines)
Lines 22-33 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
31
31
32
sub plugin_javascript {
32
sub plugin_javascript {
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_135a.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_140.pl (-2 / +2 lines)
Lines 22-33 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
23
24
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use Koha::Util::FrameworkPlugin qw(wrapper);
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Context;
27
use C4::Context;
28
28
29
use C4::Search;
29
use C4::Search;
30
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
31
31
32
sub plugin_javascript {
32
sub plugin_javascript {
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
33
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_141.pl (-2 / +2 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::Search;
27
use C4::Search;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
sub plugin_javascript {
30
sub plugin_javascript {
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
31
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_210c.pl (-5 / +4 lines)
Lines 19-32 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::AuthoritiesMarc;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( pagination_bar output_html_with_http_headers );
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Search;
27
use C4::Search;
28
use MARC::Record;
28
use C4::Koha qw( getnbpages );
29
use C4::Koha;
30
29
31
###TODO To rewrite in order to use SearchAuthorities
30
###TODO To rewrite in order to use SearchAuthorities
32
31
(-)a/cataloguing/value_builder/unimarc_field_210c_bis.pl (-3 / +3 lines)
Lines 40-51 It need : Link Here
40
40
41
use Modern::Perl;
41
use Modern::Perl;
42
42
43
use C4::Auth;
43
use C4::Auth qw( get_template_and_user );
44
use CGI qw ( -utf8 );
44
use CGI qw ( -utf8 );
45
use C4::Context;
45
use C4::Context;
46
46
47
use C4::AuthoritiesMarc;
47
use C4::Auth qw( get_template_and_user );
48
use C4::Output;
48
use C4::Output qw( output_html_with_http_headers );
49
49
50
sub plugin_javascript {
50
sub plugin_javascript {
51
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
51
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
(-)a/cataloguing/value_builder/unimarc_field_225a.pl (-3 / +4 lines)
Lines 41-52 It need : Link Here
41
41
42
use strict;
42
use strict;
43
#use warnings; FIXME - Bug 2505
43
#use warnings; FIXME - Bug 2505
44
use C4::Auth;
44
use C4::Auth qw( get_template_and_user );
45
use CGI qw ( -utf8 );
45
use CGI qw ( -utf8 );
46
use C4::Context;
46
use C4::Context;
47
47
48
use C4::AuthoritiesMarc;
48
use C4::Auth qw( get_template_and_user );
49
use C4::Output;
49
use C4::Output qw( output_html_with_http_headers );
50
use C4::AuthoritiesMarc qw( SearchAuthorities GetAuthority );
50
51
51
=head1 DESCRIPTION
52
=head1 DESCRIPTION
52
53
(-)a/cataloguing/value_builder/unimarc_field_225a_bis.pl (-2 / +2 lines)
Lines 24-34 biblioitems.collectiontitle Link Here
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
26
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use CGI qw( -utf8 );
28
use CGI qw( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
30
31
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
32
32
33
sub plugin_javascript {
33
sub plugin_javascript {
34
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
34
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-7 / +5 lines)
Lines 22-36 use strict; Link Here
22
#use warnings; FIXME - Bug 2505
22
#use warnings; FIXME - Bug 2505
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Context;
26
use C4::Context;
27
use C4::Search;
27
use C4::Search qw( new_record_from_zebra );
28
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
use C4::Biblio;
31
use C4::Biblio qw( GetMarcBiblio TransformMarcToKoha );
32
use C4::Koha;
33
use MARC::Record;
34
32
35
use Koha::ItemTypes;
33
use Koha::ItemTypes;
36
34
(-)a/cataloguing/value_builder/unimarc_field_686a.pl (-2 / +2 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
25
26
use C4::Search;
26
use C4::Search;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
sub plugin_javascript {
29
sub plugin_javascript {
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
30
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_field_700-4.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
32
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
(-)a/cataloguing/value_builder/unimarc_leader.pl (-2 / +2 lines)
Lines 21-32 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Util::FrameworkPlugin qw(wrapper);
23
use Koha::Util::FrameworkPlugin qw(wrapper);
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Context;
26
use C4::Context;
27
27
28
use C4::Search;
28
use C4::Search;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
30
31
sub plugin_javascript {
31
sub plugin_javascript {
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
32
    my ( $dbh, $record, $tagslib, $field_number, $tabloop ) = @_;
(-)a/cataloguing/ysearch.pl (-3 / +3 lines)
Lines 27-35 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use C4::Charset;
30
use C4::Charset qw( nsb_clean );
31
use C4::Auth qw/check_cookie_auth/;
31
use C4::Auth qw( check_cookie_auth );
32
use JSON qw/ to_json /;
32
use JSON qw( to_json );
33
33
34
my $input = CGI->new;
34
my $input = CGI->new;
35
my $query = $input->param('term');
35
my $query = $input->param('term');
(-)a/cataloguing/z3950_auth_search.pl (-4 / +3 lines)
Lines 20-30 use Modern::Perl; Link Here
20
20
21
use CGI qw / -utf8 /;
21
use CGI qw / -utf8 /;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Breeding;
26
use C4::Breeding qw( Z3950Search Z3950SearchAuth );
27
use C4::Koha;
28
27
29
my $input        = CGI->new;
28
my $input        = CGI->new;
30
my $dbh          = C4::Context->dbh;
29
my $dbh          = C4::Context->dbh;
(-)a/cataloguing/z3950_search.pl (-4 / +3 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Context;
26
use C4::Context;
27
use C4::Breeding;
27
use C4::Breeding qw( Z3950Search );
28
use C4::Koha;
29
28
30
my $input        = CGI->new;
29
my $input        = CGI->new;
31
my $error         = $input->param('error');
30
my $error         = $input->param('error');
(-)a/circ/add_message.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
26
use Koha::Patron::Message;
26
use Koha::Patron::Message;
27
27
(-)a/circ/article-request-slip.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use CGI qw( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Letters;
27
use C4::Letters;
28
use Koha::ArticleRequests;
28
use Koha::ArticleRequests;
29
use Koha::Patrons;
29
use Koha::Patrons;
(-)a/circ/article-requests.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::ArticleRequests;
26
use Koha::ArticleRequests;
27
27
28
my $query = CGI->new;
28
my $query = CGI->new;
(-)a/circ/bookcount.pl (-5 / +2 lines)
Lines 23-34 Link Here
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Circulation;
26
use C4::Output qw( output_and_exit output_html_with_http_headers );
27
use C4::Output;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Koha;
29
use C4::Auth;
30
use Koha::Biblios;
28
use Koha::Biblios;
31
use Koha::DateUtils;
32
use Koha::Libraries;
29
use Koha::Libraries;
33
30
34
my $input        = CGI->new;
31
my $input        = CGI->new;
(-)a/circ/branchoverdues.pl (-7 / +6 lines)
Lines 19-32 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use C4::Context;
20
use C4::Context;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Overdues;
24
use C4::Overdues qw( GetOverduesForBranch );
25
use C4::Biblio;
25
use C4::Biblio qw( GetMarcFromKohaField GetMarcStructure );
26
use C4::Koha;
26
use C4::Koha qw( GetAuthorisedValues );
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Koha::BiblioFrameworks;
28
use Koha::BiblioFrameworks;
29
use Data::Dumper;
30
29
31
=head1 branchoverdues.pl
30
=head1 branchoverdues.pl
32
31
(-)a/circ/branchtransfers.pl (-7 / +4 lines)
Lines 22-34 Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Circulation;
25
use C4::Circulation qw( transferbook );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Reserves;
27
use C4::Reserves qw( ModReserve ModReserveAffect );
28
use C4::Biblio;
28
use C4::Auth qw( get_session get_template_and_user );
29
use C4::Items;
30
use C4::Auth qw/:DEFAULT get_session/;
31
use C4::Koha;
32
use C4::Members;
29
use C4::Members;
33
use Koha::BiblioFrameworks;
30
use Koha::BiblioFrameworks;
34
use Koha::AuthorisedValues;
31
use Koha::AuthorisedValues;
(-)a/circ/checkout-notes.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use Koha::Checkouts;
26
use Koha::Checkouts;
27
27
28
my $query = CGI->new;
28
my $query = CGI->new;
(-)a/circ/circulation-home.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use Koha::BiblioFrameworks;
24
use Koha::BiblioFrameworks;
25
use Koha::Checkouts;
25
use Koha::Checkouts;
(-)a/circ/circulation.pl (-14 / +8 lines)
Lines 29-43 use CGI qw ( -utf8 ); Link Here
29
use DateTime;
29
use DateTime;
30
use DateTime::Duration;
30
use DateTime::Duration;
31
use Scalar::Util qw( looks_like_number );
31
use Scalar::Util qw( looks_like_number );
32
use C4::Output;
32
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
33
use C4::Auth qw/:DEFAULT get_session haspermission/;
33
use C4::Auth qw( get_session get_template_and_user );
34
use C4::Koha;
34
use C4::Koha;
35
use C4::Circulation;
35
use C4::Circulation qw( barcodedecode CanBookBeIssued AddIssue );
36
use C4::Utils::DataTables::Members;
36
use C4::Utils::DataTables::Members;
37
use C4::Members;
37
use C4::Members;
38
use C4::Biblio;
38
use C4::Biblio qw( TransformMarcToKoha );
39
use C4::Search;
39
use C4::Search qw( new_record_from_zebra );
40
use MARC::Record;
41
use C4::Reserves;
40
use C4::Reserves;
42
use Koha::Holds;
41
use Koha::Holds;
43
use C4::Context;
42
use C4::Context;
Lines 45-52 use CGI::Session; Link Here
45
use Koha::AuthorisedValues;
44
use Koha::AuthorisedValues;
46
use Koha::CsvProfiles;
45
use Koha::CsvProfiles;
47
use Koha::Patrons;
46
use Koha::Patrons;
48
use Koha::Patron::Debarments qw(GetDebarments);
47
use Koha::Patron::Debarments qw( GetDebarments );
49
use Koha::DateUtils;
48
use Koha::DateUtils qw( dt_from_string output_pref );
50
use Koha::Database;
49
use Koha::Database;
51
use Koha::BiblioFrameworks;
50
use Koha::BiblioFrameworks;
52
use Koha::Items;
51
use Koha::Items;
Lines 55-66 use Koha::SearchEngine; Link Here
55
use Koha::SearchEngine::Search;
54
use Koha::SearchEngine::Search;
56
use Koha::Patron::Modifications;
55
use Koha::Patron::Modifications;
57
56
58
use Date::Calc qw(
57
use List::MoreUtils qw( uniq );
59
  Today
60
  Add_Delta_Days
61
  Date_to_Days
62
);
63
use List::MoreUtils qw/uniq/;
64
58
65
#
59
#
66
# PARAMETERS READING
60
# PARAMETERS READING
(-)a/circ/del_message.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
26
use Koha::Patron::Messages;
26
use Koha::Patron::Messages;
27
27
(-)a/circ/hold-transfer-slip.pl (-3 / +3 lines)
Lines 20-29 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Context;
22
use C4::Context;
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth qw/:DEFAULT get_session/;
25
use C4::Auth qw( get_session get_template_and_user );
26
use C4::Reserves;
26
use C4::Reserves qw( ReserveSlip );
27
27
28
my $input = CGI->new;
28
my $input = CGI->new;
29
my $sessionID = $input->cookie("CGISESSID");
29
my $sessionID = $input->cookie("CGISESSID");
(-)a/circ/offline-mf.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
22
23
my $query = CGI->new;
23
my $query = CGI->new;
24
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
24
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
(-)a/circ/offline.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
24
25
my $query = CGI->new;
25
my $query = CGI->new;
(-)a/circ/on-site_checkouts.pl (-3 / +2 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Circulation qw( GetPendingOnSiteCheckouts );
22
use C4::Circulation qw( GetPendingOnSiteCheckouts );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Koha;
25
use Koha::BiblioFrameworks;
24
use Koha::BiblioFrameworks;
26
25
27
my $cgi = CGI->new;
26
my $cgi = CGI->new;
(-)a/circ/overdue.pl (-3 / +3 lines)
Lines 21-31 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use CGI qw(-oldstyle_urls -utf8);
25
use CGI qw(-oldstyle_urls -utf8);
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use Text::CSV_XS;
27
use Text::CSV_XS;
28
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
use DateTime;
29
use DateTime;
30
use DateTime::Format::MySQL;
30
use DateTime::Format::MySQL;
31
31
(-)a/circ/pendingreserves.pl (-4 / +4 lines)
Lines 25-37 use YAML::XS; Link Here
25
use Encode;
25
use Encode;
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Items qw( ModItemTransfer );
31
use C4::Items;
32
use C4::Reserves qw( ModReserveCancelAll );
32
use C4::Reserves qw( ModReserveCancelAll );
33
use Koha::Biblios;
33
use Koha::Biblios;
34
use Koha::DateUtils;
34
use Koha::DateUtils qw( dt_from_string );
35
use Koha::Holds;
35
use Koha::Holds;
36
use DateTime::Duration;
36
use DateTime::Duration;
37
37
(-)a/circ/renew.pl (-5 / +4 lines)
Lines 21-31 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Auth qw/:DEFAULT get_session/;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Circulation;
26
use C4::Circulation qw( barcodedecode CanBookBeRenewed GetSoonestRenewDate GetLatestAutoRenewDate AddRenewal );
27
use C4::Koha;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Koha::DateUtils;
29
use Koha::Database;
28
use Koha::Database;
30
use Koha::BiblioFrameworks;
29
use Koha::BiblioFrameworks;
31
30
(-)a/circ/request-article.pl (-4 / +4 lines)
Lines 19-29 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Output;
22
use C4::Output qw( output_and_exit output_html_with_http_headers );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Utils::DataTables::Members;
24
use C4::Utils::DataTables::Members;
25
use C4::Search;
25
use C4::Search qw( enabled_staff_search_views );
26
use C4::Serials;
26
use C4::Serials qw( CountSubscriptionFromBiblionumber );
27
use Koha::Biblios;
27
use Koha::Biblios;
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Koha::ArticleRequests;
29
use Koha::ArticleRequests;
(-)a/circ/reserveratios.pl (-4 / +3 lines)
Lines 21-34 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Date::Calc qw/Today Add_Delta_YM/;
25
use POSIX qw( ceil );
24
use POSIX qw( ceil );
26
25
27
use C4::Context;
26
use C4::Context;
28
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
30
use C4::Acquisition qw/GetOrdersByBiblionumber/;
29
use C4::Acquisition qw/GetOrdersByBiblionumber/;
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Acquisition::Baskets;
31
use Koha::Acquisition::Baskets;
33
32
34
my $input = CGI->new;
33
my $input = CGI->new;
(-)a/circ/returns.pl (-11 / +9 lines)
Lines 34-58 use Modern::Perl; Link Here
34
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
35
use DateTime;
35
use DateTime;
36
36
37
use C4::Auth qw/:DEFAULT get_session/;
37
use C4::Auth qw( get_template_and_user get_session haspermission );
38
use C4::Output;
38
use C4::Output qw( output_html_with_http_headers );
39
use C4::Circulation;
39
use C4::Circulation qw( barcodedecode GetBranchItemRule AddReturn updateWrongTransfer LostItem );
40
use C4::Reserves;
40
use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves );
41
use C4::Biblio;
41
use C4::Circulation qw( barcodedecode GetBranchItemRule AddReturn updateWrongTransfer LostItem );
42
use C4::Circulation;
43
use C4::Context;
42
use C4::Context;
44
use C4::Items;
43
use C4::Items qw( ModItemTransfer );
45
use C4::Koha;   # FIXME : is it still useful ?
46
use C4::Members::Messaging;
44
use C4::Members::Messaging;
47
use C4::Members;
45
use C4::Members;
48
use C4::Output;
46
use C4::Output qw( output_html_with_http_headers );
49
use C4::Reserves;
47
use C4::Reserves qw( ModReserve ModReserveAffect GetOtherReserves );
50
use C4::RotatingCollections;
48
use C4::RotatingCollections;
51
use Koha::AuthorisedValues;
49
use Koha::AuthorisedValues;
52
use Koha::BiblioFrameworks;
50
use Koha::BiblioFrameworks;
53
use Koha::Calendar;
51
use Koha::Calendar;
54
use Koha::Checkouts;
52
use Koha::Checkouts;
55
use Koha::DateUtils;
53
use Koha::DateUtils qw( dt_from_string output_pref );
56
use Koha::Holds;
54
use Koha::Holds;
57
use Koha::Items;
55
use Koha::Items;
58
use Koha::Item::Transfers;
56
use Koha::Item::Transfers;
(-)a/circ/set-library.pl (-3 / +2 lines)
Lines 21-29 use Modern::Perl; Link Here
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw/:DEFAULT get_session/;
25
use C4::Auth qw( get_template_and_user get_session );
26
use C4::Koha;
27
use Koha::BiblioFrameworks;
26
use Koha::BiblioFrameworks;
28
use Koha::Cash::Registers;
27
use Koha::Cash::Registers;
29
use Koha::Libraries;
28
use Koha::Libraries;
(-)a/circ/transfer-slip.pl (-3 / +3 lines)
Lines 21-30 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Auth qw/:DEFAULT get_session/;
26
use C4::Auth qw( get_session get_template_and_user );
27
use C4::Circulation;
27
use C4::Circulation qw( TransferSlip );
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
30
my $sessionID = $input->cookie("CGISESSID");
30
my $sessionID = $input->cookie("CGISESSID");
(-)a/circ/transfers_to_send.pl (-3 / +3 lines)
Lines 20-29 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
27
27
28
my $input      = CGI->new;
28
my $input      = CGI->new;
29
my $itemnumber = $input->param('itemnumber');
29
my $itemnumber = $input->param('itemnumber');
(-)a/circ/transferstoreceive.pl (-11 / +5 lines)
Lines 21-43 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
26
use C4::Circulation qw( GetTransfers GetTransfersFromTo );
27
use C4::Circulation;
28
use C4::Members;
27
use C4::Members;
29
use Date::Calc qw(
28
use Date::Calc qw( Add_Delta_Days Date_to_Days Today );
30
  Today
31
  Add_Delta_Days
32
  Date_to_Days
33
);
34
29
35
use C4::Koha;
36
use C4::Reserves;
30
use C4::Reserves;
37
use Koha::Items;
31
use Koha::Items;
38
use Koha::ItemTypes;
32
use Koha::ItemTypes;
39
use Koha::Libraries;
33
use Koha::Libraries;
40
use Koha::DateUtils;
34
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::BiblioFrameworks;
35
use Koha::BiblioFrameworks;
42
use Koha::Patrons;
36
use Koha::Patrons;
43
37
(-)a/circ/view_holdsqueue.pl (-5 / +3 lines)
Lines 24-34 This script displays items in the tmp_holdsqueue table Link Here
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Biblio;
29
use C4::HoldsQueue qw( GetHoldsQueueItems );
30
use C4::Items;
31
use C4::HoldsQueue qw(GetHoldsQueueItems);
32
use Koha::BiblioFrameworks;
30
use Koha::BiblioFrameworks;
33
use Koha::ItemTypes;
31
use Koha::ItemTypes;
34
32
(-)a/circ/waitingreserves.pl (-14 / +6 lines)
Lines 21-40 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Circulation;
26
use C4::Items qw( ModItemTransfer );
27
use C4::Members;
27
use Date::Calc qw( Date_to_Days Today );
28
use C4::Biblio;
28
use C4::Reserves qw( ModReserve ModReserveCancelAll );
29
use C4::Items;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Date::Calc qw(
31
  Today
32
  Add_Delta_Days
33
  Date_to_Days
34
);
35
use C4::Reserves;
36
use C4::Koha;
37
use Koha::DateUtils;
38
use Koha::BiblioFrameworks;
30
use Koha::BiblioFrameworks;
39
use Koha::Items;
31
use Koha::Items;
40
use Koha::ItemTypes;
32
use Koha::ItemTypes;
(-)a/circ/ysearch.pl (-2 / +2 lines)
Lines 27-35 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use C4::Context;
29
use C4::Context;
30
use C4::Auth qw/check_cookie_auth/;
30
use C4::Auth qw( check_cookie_auth );
31
use Koha::Patrons;
31
use Koha::Patrons;
32
use Koha::DateUtils qw/format_sqldatetime/;
32
use Koha::DateUtils qw( format_sqldatetime );
33
33
34
use JSON qw( to_json );
34
use JSON qw( to_json );
35
35
(-)a/clubs/club-enrollments.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Clubs;
26
use Koha::Clubs;
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/clubs/clubs-add-modify.pl (-3 / +3 lines)
Lines 21-30 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils qw(dt_from_string);
27
use Koha::DateUtils qw( dt_from_string );
28
use Koha::Clubs;
28
use Koha::Clubs;
29
use Koha::Club::Fields;
29
use Koha::Club::Fields;
30
30
(-)a/clubs/clubs.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::Clubs;
27
use Koha::Clubs;
28
use Koha::Club::Templates;
28
use Koha::Club::Templates;
(-)a/clubs/patron-clubs-tab.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::Patrons;
27
use Koha::Patrons;
28
use Koha::Club::Enrollments;
28
use Koha::Club::Enrollments;
(-)a/clubs/patron-enroll.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Clubs;
26
use Koha::Clubs;
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/clubs/templates-add-modify.pl (-3 / +3 lines)
Lines 21-30 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::DateUtils qw(dt_from_string);
27
use Koha::DateUtils qw( dt_from_string );
28
use Koha::Club::Templates;
28
use Koha::Club::Templates;
29
use Koha::Club::Template::Fields;
29
use Koha::Club::Template::Fields;
30
use Koha::Club::Template::EnrollmentFields;
30
use Koha::Club::Template::EnrollmentFields;
(-)a/course_reserves/add_items.pl (-5 / +4 lines)
Lines 22-34 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
27
use C4::Koha qw( GetAuthorisedValues );
28
use C4::Biblio;
29
use Koha::Items;
28
use Koha::Items;
30
29
31
use C4::CourseReserves qw(GetCourse GetCourseItem GetCourseReserve ModCourseItem ModCourseReserve);
30
use C4::CourseReserves qw( GetCourse GetCourseReserve ModCourse ModCourseItem ModCourseReserve );
32
31
33
use Koha::Items;
32
use Koha::Items;
34
use Koha::ItemTypes;
33
use Koha::ItemTypes;
(-)a/course_reserves/batch_add_items.pl (-3 / +3 lines)
Lines 23-31 use Modern::Perl; Link Here
23
use CGI qw( -utf8 );
23
use CGI qw( -utf8 );
24
use List::MoreUtils qw( uniq );
24
use List::MoreUtils qw( uniq );
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::CourseReserves qw(ModCourseItem ModCourseReserve GetCourse);
28
use C4::CourseReserves qw( GetCourse ModCourse ModCourseItem ModCourseReserve );
29
29
30
use Koha::Items;
30
use Koha::Items;
31
31
(-)a/course_reserves/batch_rm_items.pl (-3 / +3 lines)
Lines 22-30 use Modern::Perl; Link Here
22
use CGI qw( -utf8 );
22
use CGI qw( -utf8 );
23
use List::MoreUtils qw( uniq );
23
use List::MoreUtils qw( uniq );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::CourseReserves qw(GetItemCourseReservesInfo DelCourseReserve GetCourseItem);
27
use C4::CourseReserves qw( GetCourse GetCourseItem GetItemCourseReservesInfo DelCourse DelCourseReserve );
28
28
29
use Koha::Items;
29
use Koha::Items;
30
30
(-)a/course_reserves/course-details.pl (-4 / +3 lines)
Lines 22-32 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
27
29
use C4::CourseReserves qw(DelCourseReserve GetCourse GetCourseReserves);
28
use C4::CourseReserves qw( DelCourse DelCourseReserve GetCourse GetCourseReserve GetCourseReserves );
30
29
31
my $cgi = CGI->new;
30
my $cgi = CGI->new;
32
31
(-)a/course_reserves/course-reserves.pl (-3 / +3 lines)
Lines 22-31 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
use C4::CourseReserves qw(GetCourses);
28
use C4::CourseReserves qw( GetCourse GetCourses );
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
31
31
(-)a/course_reserves/course.pl (-4 / +4 lines)
Lines 22-32 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
27
use C4::Koha qw( GetAuthorisedValues );
28
28
29
use C4::CourseReserves qw(GetCourse);
29
use C4::CourseReserves qw( GetCourse );
30
30
31
my $cgi = CGI->new;
31
my $cgi = CGI->new;
32
32
(-)a/course_reserves/mod_course.pl (-2 / +2 lines)
Lines 23-31 use CGI qw ( -utf8 ); Link Here
23
23
24
use C4::Output;
24
use C4::Output;
25
use C4::Reserves;
25
use C4::Reserves;
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
27
28
use C4::CourseReserves qw(DelCourse ModCourse ModCourseInstructors);
28
use C4::CourseReserves qw( DelCourse ModCourse ModCourseInstructors );
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
31
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
31
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl (-1 / +1 lines)
Lines 28-34 Link Here
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use Authen::CAS::Client;
30
use Authen::CAS::Client;
31
use Storable qw(nstore_fd);
31
use Storable qw( nstore_fd );
32
32
33
my $casServerUrl = 'https://localhost:8443/cas/';
33
my $casServerUrl = 'https://localhost:8443/cas/';
34
my $cas = Authen::CAS::Client->new($casServerUrl);
34
my $cas = Authen::CAS::Client->new($casServerUrl);
(-)a/docs/CAS/CASProxy/examples/proxy_cas_data.pl (-3 / +2 lines)
Lines 33-41 This PGTIOU will allow us to retrive the matching PGTID Link Here
33
use Modern::Perl;
33
use Modern::Perl;
34
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
35
use Authen::CAS::Client;
35
use Authen::CAS::Client;
36
use Storable qw(fd_retrieve);
36
use Storable qw( fd_retrieve );
37
use LWP::Simple;
37
use LWP::Simple qw( get );
38
use URI::Escape;
39
38
40
my $casServerUrl = 'https://localhost:8443/cas/';
39
my $casServerUrl = 'https://localhost:8443/cas/';
41
my $cas = Authen::CAS::Client->new($casServerUrl);
40
my $cas = Authen::CAS::Client->new($casServerUrl);
(-)a/errors/400.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/401.pl (-3 / +3 lines)
Lines 17-26 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use C4::Auth;
20
use C4::Auth qw( get_template_and_user );
21
use C4::Output;
21
use C4::Output qw( output_with_http_headers );
22
use C4::Context;
22
use C4::Context;
23
use List::MoreUtils qw(any);
23
use List::MoreUtils qw( any );
24
24
25
my $query = CGI->new;
25
my $query = CGI->new;
26
my $admin = C4::Context->preference('KohaAdminEmailAddress');
26
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/402.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/403.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/404.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/errors/500.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/help.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use Koha::Manual;
25
use Koha::Manual;
26
26
(-)a/ill/ill-requests.pl (-5 / +5 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Notice::Templates;
26
use Koha::Notice::Templates;
27
use Koha::AuthorisedValues;
27
use Koha::AuthorisedValues;
28
use Koha::Illcomment;
28
use Koha::Illcomment;
Lines 31-39 use Koha::Illrequest::Availability; Link Here
31
use Koha::Libraries;
31
use Koha::Libraries;
32
use Koha::Token;
32
use Koha::Token;
33
33
34
use Try::Tiny;
34
use Try::Tiny qw( catch try );
35
use URI::Escape;
35
use URI::Escape qw( uri_escape_utf8 );
36
use JSON;
36
use JSON qw( encode_json );
37
37
38
our $cgi = CGI->new;
38
our $cgi = CGI->new;
39
my $illRequests = Koha::Illrequests->new;
39
my $illRequests = Koha::Illrequests->new;
(-)a/installer/data/mysql/backfill_statistics.pl (-4 lines)
Lines 6-18 Link Here
6
use Modern::Perl;
6
use Modern::Perl;
7
7
8
# CPAN modules
8
# CPAN modules
9
use DBI;
10
use Getopt::Long;
11
9
12
# Koha modules
10
# Koha modules
13
use C4::Context;
11
use C4::Context;
14
use C4::Items;
15
use Data::Dumper;
16
12
17
my $dbh = C4::Context->dbh;
13
my $dbh = C4::Context->dbh;
18
14
(-)a/installer/data/mysql/fix_unclosed_nonaccruing_fines_bug17135.pl (-3 / +3 lines)
Lines 22-32 use Modern::Perl; Link Here
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Overdues qw/CalcFine/;
24
use C4::Overdues qw/CalcFine/;
25
use C4::Log qw/logaction/;
25
use C4::Log qw( logaction );
26
26
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
30
30
31
my ($help, $verbose, $confirm, $log, $stdout_log);
31
my ($help, $verbose, $confirm, $log, $stdout_log);
32
32
(-)a/installer/data/mysql/update22to30.pl (-3 / +1 lines)
Lines 14-25 Link Here
14
use strict;
14
use strict;
15
15
16
# CPAN modules
16
# CPAN modules
17
use DBI;
17
use Getopt::Long qw( GetOptions );
18
use Getopt::Long;
19
# Koha modules
18
# Koha modules
20
use C4::Context;
19
use C4::Context;
21
20
22
use MARC::Record;
23
use MARC::File::XML ( BinaryEncoding => 'utf8' );
21
use MARC::File::XML ( BinaryEncoding => 'utf8' );
24
 
22
 
25
# FIXME - The user might be installing a new database, so can't rely
23
# FIXME - The user might be installing a new database, so can't rely
(-)a/installer/html-template-to-template-toolkit.pl (-5 / +3 lines)
Lines 1-12 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Carp;
4
use Carp qw( croak );
5
use Data::Dumper;
6
5
7
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
8
use File::Basename;
7
use File::Copy qw( copy );
9
use File::Copy;
10
8
11
my $help_msg = <<EOH;
9
my $help_msg = <<EOH;
12
This script does a first-cut conversion of koha HTML::Template template files (.tmpl).
10
This script does a first-cut conversion of koha HTML::Template template files (.tmpl).
(-)a/installer/install.pl (-4 / +4 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use diagnostics;
21
use diagnostics;
22
22
23
use C4::InstallAuth;
23
use C4::InstallAuth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use POSIX qw(strftime);
25
use POSIX;
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Templates;
29
use C4::Templates;
30
use C4::Languages qw(getAllLanguages getTranslatedLanguages);
30
use C4::Languages qw( getAllLanguages getTranslatedLanguages );
31
use C4::Installer;
31
use C4::Installer;
32
use C4::Installer::PerlModules;
32
use C4::Installer::PerlModules;
33
33
(-)a/installer/onboarding.pl (-4 / +4 lines)
Lines 19-32 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Context;
21
use C4::Context;
22
use C4::InstallAuth;
22
use C4::InstallAuth qw( checkauth get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Members qw(checkcardnumber);
25
use C4::Members qw( checkcardnumber );
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::Libraries;
27
use Koha::Libraries;
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::Patrons;
30
use Koha::Patrons;
31
use Koha::Patron::Categories;
31
use Koha::Patron::Categories;
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
(-)a/koha_perl_deps.pl (-3 / +3 lines)
Lines 1-8 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Getopt::Long;
3
use Getopt::Long qw( GetOptions );
4
use Pod::Usage;
4
use Pod::Usage qw( pod2usage );
5
use Term::ANSIColor;
5
use Term::ANSIColor qw( color );
6
use FindBin; # we need to enforce which C4::Installer is used in case more than one is installed
6
use FindBin; # we need to enforce which C4::Installer is used in case more than one is installed
7
7
8
use lib $FindBin::Bin;
8
use lib $FindBin::Bin;
(-)a/labels/label-create-csv.pl (-2 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Text::CSV_XS;
24
use Text::CSV_XS;
25
use Data::Dumper;
26
25
27
use C4::Creators;
28
use C4::Labels;
26
use C4::Labels;
29
27
30
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/labels/label-create-pdf.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Creators;
25
use C4::Creators;
26
use C4::Labels;
26
use C4::Labels;
27
27
(-)a/labels/label-create-xml.pl (-2 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use XML::Simple;
24
use XML::Simple;
25
use Data::Dumper;
26
25
27
use C4::Creators;
28
use C4::Labels;
26
use C4::Labels;
29
27
30
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/labels/label-edit-batch.pl (-3 / +3 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators;
27
use C4::Creators qw( get_label_summary html_table );
28
use C4::Labels;
28
use C4::Labels;
29
29
30
use Koha::Items;
30
use Koha::Items;
(-)a/labels/label-edit-layout.pl (-4 / +9 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use POSIX;
24
use POSIX qw( exit sprintf );
25
25
26
use C4::Auth qw(get_template_and_user);
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw(output_html_with_http_headers);
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators;
28
use C4::Creators qw(
29
    get_barcode_types
30
    get_font_types
31
    get_label_types
32
    get_text_justification_types
33
);
29
use C4::Labels;
34
use C4::Labels;
30
35
31
my $cgi = CGI->new;
36
my $cgi = CGI->new;
(-)a/labels/label-edit-profile.pl (-3 / +3 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators;
27
use C4::Creators qw( get_all_templates get_unit_values );
28
use C4::Labels;
28
use C4::Labels;
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/labels/label-edit-range.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth qw(get_template_and_user);
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output qw(output_html_with_http_headers);
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
my $cgi = CGI->new;
27
my $cgi = CGI->new;
28
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
28
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/labels/label-edit-template.pl (-3 / +3 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators;
27
use C4::Creators qw( get_all_profiles get_unit_values );
28
use C4::Labels;
28
use C4::Labels;
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/labels/label-home.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
29
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/labels/label-item-search.pl (-8 / +7 lines)
Lines 20-37 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use List::Util qw( max min );
23
use POSIX qw( ceil );
24
use POSIX qw(ceil);
25
24
26
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Context;
27
use C4::Context;
29
use C4::Search qw(SimpleSearch);
28
use C4::Search qw( new_record_from_zebra );
30
use C4::Biblio qw(TransformMarcToKoha);
29
use C4::Biblio qw( TransformMarcToKoha );
31
use C4::Creators::Lib qw(html_table);
30
use C4::Creators::Lib qw( html_table );
32
31
33
use Koha::Logger;
32
use Koha::Logger;
34
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string output_pref );
35
use Koha::Items;
34
use Koha::Items;
36
use Koha::ItemTypes;
35
use Koha::ItemTypes;
37
use Koha::SearchEngine::Search;
36
use Koha::SearchEngine::Search;
(-)a/labels/label-manage.pl (-4 / +9 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Data::Dumper;
25
24
26
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators;
27
use C4::Creators qw(
28
    get_all_layouts
29
    get_all_profiles
30
    get_all_templates
31
    get_batch_summary
32
    html_table
33
);
29
use C4::Labels;
34
use C4::Labels;
30
35
31
my $cgi = CGI->new;
36
my $cgi = CGI->new;
(-)a/labels/label-print.pl (-4 / +7 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Data::Dumper;
24
23
25
use C4::Context;
24
use C4::Context;
26
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators::Lib qw(get_all_templates get_all_layouts get_output_formats);
27
use C4::Creators::Lib qw(
28
    get_all_layouts
29
    get_all_templates
30
    get_output_formats
31
);
29
use C4::Labels::Batch;
32
use C4::Labels::Batch;
30
33
31
my $cgi = CGI->new;
34
my $cgi = CGI->new;
(-)a/labels/spinelabel-home.pl (-2 / +2 lines)
Lines 17-24 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use C4::Auth;
20
use C4::Auth qw( get_template_and_user );
21
use C4::Output;
21
use C4::Output qw( output_html_with_http_headers );
22
use C4::Context;
22
use C4::Context;
23
23
24
# use Smart::Comments;
24
# use Smart::Comments;
(-)a/labels/spinelabel-print.pl (-2 / +2 lines)
Lines 17-24 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use C4::Auth;
20
use C4::Auth qw( get_template_and_user );
21
use C4::Output;
21
use C4::Output qw( output_html_with_http_headers );
22
22
23
my $scheme = C4::Context->preference('SpineLabelFormat');
23
my $scheme = C4::Context->preference('SpineLabelFormat');
24
my $query  = CGI->new;
24
my $query  = CGI->new;
(-)a/lib/CGI/Session/Serialize/yamlxs.pm (-1 / +1 lines)
Lines 4-10 use strict; Link Here
4
use warnings;
4
use warnings;
5
5
6
use CGI::Session::ErrorHandler;
6
use CGI::Session::ErrorHandler;
7
use YAML::XS ();
7
use YAML::XS;
8
8
9
$CGI::Session::Serialize::yamlxs::VERSION = '0.1';
9
$CGI::Session::Serialize::yamlxs::VERSION = '0.1';
10
@CGI::Session::Serialize::yamlxs::ISA     = ( "CGI::Session::ErrorHandler" );
10
@CGI::Session::Serialize::yamlxs::ISA     = ( "CGI::Session::ErrorHandler" );
(-)a/mainpage.pl (-3 / +3 lines)
Lines 21-30 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Tags qw/get_count_by_tag_status/;
27
use C4::Tags qw( get_count_by_tag_status );
28
use Koha::News;
28
use Koha::News;
29
use Koha::Patron::Modifications;
29
use Koha::Patron::Modifications;
30
use Koha::Patron::Discharge;
30
use Koha::Patron::Discharge;
(-)a/members/accountline-details.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
(-)a/members/apikeys.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_and_exit output_html_with_http_headers );
26
26
27
use Koha::ApiKeys;
27
use Koha::ApiKeys;
28
use Koha::Patrons;
28
use Koha::Patrons;
(-)a/members/boraccount.pl (-3 / +3 lines)
Lines 23-32 Link Here
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use URI::Escape;
26
use URI::Escape qw( uri_unescape );
27
27
28
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
29
use C4::Output;
29
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use C4::Members;
31
use C4::Members;
32
use C4::Accounts;
32
use C4::Accounts;
(-)a/members/cancel-charge.pl (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use CGI;
20
use CGI;
21
21
22
use C4::Auth;
22
use C4::Auth qw( checkauth );
23
use Koha::Token;
23
use Koha::Token;
24
24
25
my $cgi = CGI->new;
25
my $cgi = CGI->new;
(-)a/members/deletemem.pl (-5 / +4 lines)
Lines 25-37 use Modern::Perl; Link Here
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
27
28
use Try::Tiny;
28
use Try::Tiny qw( catch try );
29
29
30
use C4::Context;
30
use C4::Context;
31
use C4::Output;
31
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Members;
33
use C4::Suggestions;
34
use C4::Suggestions qw( SearchSuggestion );
35
use Koha::Patrons;
34
use Koha::Patrons;
36
use Koha::Token;
35
use Koha::Token;
37
use Koha::Patron::Categories;
36
use Koha::Patron::Categories;
(-)a/members/discharge.pl (-4 / +3 lines)
Lines 28-45 Allows librarian to edit and/or manage borrowers' discharges Link Here
28
=cut
28
=cut
29
29
30
use Modern::Perl;
30
use Modern::Perl;
31
use Carp;
31
use Carp qw( carp );
32
32
33
use CGI qw( -utf8 );
33
use CGI qw( -utf8 );
34
use C4::Auth;
34
use C4::Auth qw( get_template_and_user );
35
use C4::Output;
35
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
36
use C4::Members;
36
use C4::Members;
37
use C4::Reserves;
37
use C4::Reserves;
38
use C4::Letters;
38
use C4::Letters;
39
use Koha::Patron::Discharge;
39
use Koha::Patron::Discharge;
40
use Koha::Patrons;
40
use Koha::Patrons;
41
41
42
use Koha::DateUtils;
43
42
44
my $input = CGI->new;
43
my $input = CGI->new;
45
44
(-)a/members/discharges.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use Koha::Patron::Discharge;
26
use Koha::Patron::Discharge;
27
27
(-)a/members/files.pl (-3 / +2 lines)
Lines 21-31 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
26
use C4::Members;
26
use C4::Members;
27
27
28
use Koha::DateUtils;
29
use Koha::Patrons;
28
use Koha::Patrons;
30
use Koha::Patron::Files;
29
use Koha::Patron::Files;
31
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
(-)a/members/guarantor_search.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Members;
25
use C4::Members;
26
26
27
use Koha::Patron::Categories;
27
use Koha::Patron::Categories;
(-)a/members/holdshistory.pl (-2 / +2 lines)
Lines 19-26 use Modern::Perl; Link Here
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
24
25
use Koha::Patrons;
25
use Koha::Patrons;
26
26
(-)a/members/housebound.pl (-3 / +3 lines)
Lines 26-36 Link Here
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI;
28
use CGI;
29
use C4::Auth;
29
use C4::Auth qw( get_template_and_user );
30
use C4::Context;
30
use C4::Context;
31
use C4::Output;
31
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
32
use DateTime;
32
use DateTime;
33
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string );
34
use Koha::Libraries;
34
use Koha::Libraries;
35
use Koha::Patrons;
35
use Koha::Patrons;
36
use Koha::Patron::Categories;
36
use Koha::Patron::Categories;
(-)a/members/ill-requests.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use Koha::Patrons;
25
use Koha::Patrons;
26
26
27
my $input = CGI->new;
27
my $input = CGI->new;
(-)a/members/mancredit.pl (-3 / +2 lines)
Lines 23-35 Link Here
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output;
27
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
29
30
use C4::Members;
30
use C4::Members;
31
use C4::Accounts;
31
use C4::Accounts;
32
use C4::Items;
33
32
34
use Koha::Items;
33
use Koha::Items;
35
use Koha::Patrons;
34
use Koha::Patrons;
(-)a/members/maninvoice.pl (-5 / +4 lines)
Lines 23-37 Link Here
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
23
# along with Koha; if not, see <http://www.gnu.org/licenses>.
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use Try::Tiny;
26
use Try::Tiny qw( catch try );
27
use URI::Escape;
27
use URI::Escape qw( uri_escape_utf8 );
28
28
29
use C4::Auth;
29
use C4::Auth qw( get_template_and_user );
30
use C4::Output;
30
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Members;
32
use C4::Members;
33
use C4::Accounts;
33
use C4::Accounts;
34
use C4::Items;
35
use Koha::Token;
34
use Koha::Token;
36
35
37
use Koha::Patrons;
36
use Koha::Patrons;
(-)a/members/member-flags.pl (-5 / +3 lines)
Lines 7-22 Link Here
7
use Modern::Perl;
7
use Modern::Perl;
8
8
9
use CGI qw ( -utf8 );
9
use CGI qw ( -utf8 );
10
use C4::Output;
10
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
11
use C4::Auth qw(:DEFAULT :EditPermissions);
11
use C4::Auth qw( get_template_and_user get_all_subpermissions get_user_subpermissions );
12
use C4::Context;
12
use C4::Context;
13
use C4::Members;
14
#use C4::Acquisitions;
15
13
16
use Koha::Patron::Categories;
14
use Koha::Patron::Categories;
17
use Koha::Patrons;
15
use Koha::Patrons;
18
16
19
use C4::Output;
17
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
20
use Koha::Token;
18
use Koha::Token;
21
19
22
my $input = CGI->new;
20
my $input = CGI->new;
(-)a/members/member-password.pl (-7 / +3 lines)
Lines 6-25 Link Here
6
6
7
use Modern::Perl;
7
use Modern::Perl;
8
8
9
use C4::Auth;
9
use C4::Auth qw( get_template_and_user );
10
use Koha::AuthUtils;
10
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
11
use C4::Output;
12
use C4::Context;
11
use C4::Context;
13
use C4::Members;
14
use C4::Circulation;
15
use CGI qw ( -utf8 );
12
use CGI qw ( -utf8 );
16
use Koha::AuthUtils;
17
use Koha::Token;
13
use Koha::Token;
18
14
19
use Koha::Patrons;
15
use Koha::Patrons;
20
use Koha::Patron::Categories;
16
use Koha::Patron::Categories;
21
17
22
use Try::Tiny;
18
use Try::Tiny qw( catch try );
23
19
24
my $input = CGI->new;
20
my $input = CGI->new;
25
21
(-)a/members/member.pl (-4 / +3 lines)
Lines 24-34 Link Here
24
# along with Koha; if not, see <http://www.gnu.org/licenses>.
24
# along with Koha; if not, see <http://www.gnu.org/licenses>.
25
25
26
use Modern::Perl;
26
use Modern::Perl;
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
use CGI qw( -utf8 );
29
use CGI qw( -utf8 );
30
use Koha::DateUtils;
30
use Koha::List::Patron qw( GetPatronLists );
31
use Koha::List::Patron;
32
use Koha::Patrons;
31
use Koha::Patrons;
33
32
34
my $input = CGI->new;
33
my $input = CGI->new;
(-)a/members/memberentry.pl (-9 / +7 lines)
Lines 23-44 use Modern::Perl; Link Here
23
23
24
# external modules
24
# external modules
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use List::MoreUtils qw/uniq/;
27
26
28
# internal modules
27
# internal modules
29
use C4::Auth;
28
use C4::Auth qw( get_template_and_user haspermission );
30
use C4::Context;
29
use C4::Context;
31
use C4::Output;
30
use C4::Output qw( output_and_exit output_and_exit_if_error output_html_with_http_headers );
32
use C4::Members;
31
use C4::Members qw( checkcardnumber get_cardnumber_length );
33
use C4::Koha;
32
use C4::Koha qw( GetAuthorisedValues );
34
use C4::Log;
33
use C4::Letters qw( SendAlerts );
35
use C4::Letters;
36
use C4::Form::MessagingPreferences;
34
use C4::Form::MessagingPreferences;
37
use Koha::AuthUtils;
35
use Koha::AuthUtils;
38
use Koha::AuthorisedValues;
36
use Koha::AuthorisedValues;
39
use Koha::Patron::Debarments;
37
use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
40
use Koha::Cities;
38
use Koha::Cities;
41
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
42
use Koha::Libraries;
40
use Koha::Libraries;
43
use Koha::Patrons;
41
use Koha::Patrons;
44
use Koha::Patron::Attribute::Types;
42
use Koha::Patron::Attribute::Types;
(-)a/members/members-home.pl (-3 / +3 lines)
Lines 19-31 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
25
use C4::Members;
25
use C4::Members;
26
use Koha::Patron::Modifications;
26
use Koha::Patron::Modifications;
27
use Koha::Libraries;
27
use Koha::Libraries;
28
use Koha::List::Patron;
28
use Koha::List::Patron qw( GetPatronLists );
29
use Koha::Patron::Categories;
29
use Koha::Patron::Categories;
30
30
31
my $query = CGI->new;
31
my $query = CGI->new;
(-)a/members/members-update-do.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output;
24
use C4::Context;
24
use C4::Context;
25
use Koha::Patrons;
25
use Koha::Patrons;
(-)a/members/members-update.pl (-2 / +2 lines)
Lines 20-27 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Members;
26
use C4::Members;
27
use Koha::Patron::Attribute::Types;
27
use Koha::Patron::Attribute::Types;
(-)a/members/merge-patrons.pl (-3 / +3 lines)
Lines 19-28 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Context;
26
use C4::Context;
27
use Koha::Patrons;
27
use Koha::Patrons;
28
28
(-)a/members/mod_debarment.pl (-3 / +3 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( checkauth );
25
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Patron::Debarments;
26
use Koha::Patron::Debarments qw( AddDebarment DelDebarment );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/members/moremember.pl (-5 / +4 lines)
Lines 30-44 Link Here
30
use Modern::Perl;
30
use Modern::Perl;
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use C4::Context;
32
use C4::Context;
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
35
use C4::Form::MessagingPreferences;
35
use C4::Form::MessagingPreferences;
36
use List::MoreUtils qw/uniq/;
36
use List::MoreUtils qw( uniq );
37
use Scalar::Util qw( looks_like_number );
37
use Scalar::Util qw( looks_like_number );
38
use Koha::Patron::Attribute::Types;
38
use Koha::Patron::Attribute::Types;
39
use Koha::Patron::Debarments qw(GetDebarments);
39
use Koha::Patron::Debarments qw( GetDebarments );
40
use Koha::Patron::Messages;
40
use Koha::Patron::Messages;
41
use Koha::DateUtils;
42
use Koha::CsvProfiles;
41
use Koha::CsvProfiles;
43
use Koha::Holds;
42
use Koha::Holds;
44
use Koha::Patrons;
43
use Koha::Patrons;
(-)a/members/notices.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Members;
26
use C4::Members;
27
use C4::Letters;
27
use C4::Letters;
(-)a/members/pay.pl (-4 / +4 lines)
Lines 28-37 Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use URI::Escape;
31
use URI::Escape qw( uri_escape_utf8 uri_unescape );
32
use C4::Context;
32
use C4::Context;
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use C4::Members;
36
use C4::Members;
37
use C4::Accounts;
37
use C4::Accounts;
Lines 42-48 use Koha::Patrons; Link Here
42
use Koha::Items;
42
use Koha::Items;
43
43
44
use Koha::Patron::Categories;
44
use Koha::Patron::Categories;
45
use URI::Escape;
45
use URI::Escape qw( uri_escape_utf8 uri_unescape );
46
46
47
our $input = CGI->new;
47
our $input = CGI->new;
48
48
(-)a/members/paycollect.pl (-5 / +4 lines)
Lines 18-30 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use URI::Escape;
21
use URI::Escape qw( uri_escape uri_unescape );
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
27
use C4::Members;
28
use C4::Accounts;
27
use C4::Accounts;
29
use C4::Koha;
28
use C4::Koha;
30
29
Lines 34-40 use Koha::Patron::Categories; Link Here
34
use Koha::AuthorisedValues;
33
use Koha::AuthorisedValues;
35
use Koha::Account;
34
use Koha::Account;
36
use Koha::Token;
35
use Koha::Token;
37
use Koha::DateUtils;
36
use Koha::DateUtils qw( output_pref );
38
37
39
my $input = CGI->new();
38
my $input = CGI->new();
40
39
(-)a/members/print_overdues.pl (-3 / +3 lines)
Lines 22-30 use Modern::Perl; Link Here
22
use CGI;
22
use CGI;
23
23
24
use C4::Context;
24
use C4::Context;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
27
use C4::Overdues qw(parse_overdues_letter);
27
use C4::Overdues qw( parse_overdues_letter );
28
28
29
use Koha::Patrons;
29
use Koha::Patrons;
30
30
(-)a/members/printfeercpt.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Letters;
26
use C4::Letters;
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
(-)a/members/printinvoice.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Letters;
26
use C4::Letters;
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
(-)a/members/printslip.pl (-5 / +3 lines)
Lines 35-45 Link Here
35
use Modern::Perl;
35
use Modern::Perl;
36
use CGI qw ( -utf8 );
36
use CGI qw ( -utf8 );
37
use C4::Context;
37
use C4::Context;
38
use C4::Auth qw/:DEFAULT get_session/;
38
use C4::Auth qw( get_session get_template_and_user );
39
use C4::Output;
39
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
40
use C4::Members;
40
use C4::Members qw( IssueSlip );
41
use C4::Koha;
42
use Koha::DateUtils;
43
41
44
my $input = CGI->new;
42
my $input = CGI->new;
45
my $sessionID = $input->cookie("CGISESSID");
43
my $sessionID = $input->cookie("CGISESSID");
(-)a/members/purchase-suggestions.pl (-3 / +3 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
26
use C4::Members;
26
use C4::Members;
27
use C4::Suggestions;
27
use C4::Suggestions qw( SearchSuggestion );
28
use Koha::Patrons;
28
use Koha::Patrons;
29
29
30
my $input = CGI->new;
30
my $input = CGI->new;
(-)a/members/readingrec.pl (-5 / +5 lines)
Lines 24-34 use Modern::Perl; Link Here
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
26
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output;
28
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
29
use C4::Members;
29
use C4::Members qw( GetAllIssues );
30
use List::MoreUtils qw/any uniq/;
30
use List::MoreUtils qw( uniq );
31
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string );
32
32
33
use Koha::Patrons;
33
use Koha::Patrons;
34
use Koha::Patron::Categories;
34
use Koha::Patron::Categories;
(-)a/members/routing-lists.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Output;
22
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
23
use C4::Auth qw/:DEFAULT/;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Members;
24
use C4::Members;
25
use C4::Context;
25
use C4::Context;
26
use C4::Serials;
26
use C4::Serials;
(-)a/members/setstatus.pl (-1 / +1 lines)
Lines 26-34 Link Here
26
use Modern::Perl;
26
use Modern::Perl;
27
27
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use C4::Auth qw( checkauth );
29
use C4::Context;
30
use C4::Context;
30
use C4::Members;
31
use C4::Members;
31
use C4::Auth;
32
use Koha::Patrons;
32
use Koha::Patrons;
33
33
34
34
(-)a/members/statistics.pl (-3 / +7 lines)
Lines 25-35 Link Here
25
use Modern::Perl;
25
use Modern::Perl;
26
26
27
use CGI qw ( -utf8 );
27
use CGI qw ( -utf8 );
28
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
29
use C4::Context;
29
use C4::Context;
30
use C4::Members;
30
use C4::Members;
31
use C4::Members::Statistics;
31
use C4::Members::Statistics qw(
32
use C4::Output;
32
    GetPrecedentStateByBorrower
33
    GetTotalIssuesReturnedTodayByBorrower
34
    GetTotalIssuesTodayByBorrower
35
);
36
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
33
use Koha::Patrons;
37
use Koha::Patrons;
34
use Koha::Patron::Categories;
38
use Koha::Patron::Categories;
35
39
(-)a/members/summary-print.pl (-4 / +3 lines)
Lines 19-31 use Modern::Perl; Link Here
19
19
20
use CGI;
20
use CGI;
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use C4::Members;
24
use C4::Members;
25
use C4::Circulation qw( GetIssuingCharges );
25
use C4::Circulation qw( GetIssuingCharges );
26
use C4::Reserves;
26
use C4::Reserves;
27
use C4::Items;
27
use Koha::DateUtils qw( dt_from_string );
28
use Koha::DateUtils;
29
use Koha::Holds;
28
use Koha::Holds;
30
use Koha::ItemTypes;
29
use Koha::ItemTypes;
31
use Koha::Patrons;
30
use Koha::Patrons;
(-)a/members/update-child.pl (-2 / +2 lines)
Lines 29-36 Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use C4::Context;
31
use C4::Context;
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers output_and_exit_if_error output_and_exit );
34
use Koha::Patrons;
34
use Koha::Patrons;
35
use Koha::Patron::Categories;
35
use Koha::Patron::Categories;
36
use Koha::Patrons;
36
use Koha::Patrons;
(-)a/misc/add_date_fields_to_marc_records.pl (-3 / +3 lines)
Lines 18-31 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
BEGIN {
20
BEGIN {
21
    use FindBin;
21
    use FindBin ();
22
    eval { require "$FindBin::Bin/../kohalib.pl" };
22
    eval { require "$FindBin::Bin/../kohalib.pl" };
23
}
23
}
24
24
25
use Koha::Script;
25
use Koha::Script;
26
26
27
use Getopt::Long;
27
use Getopt::Long qw( GetOptions );
28
use Pod::Usage;
28
use Pod::Usage qw( pod2usage );
29
use MARC::Field;
29
use MARC::Field;
30
30
31
use C4::Biblio;
31
use C4::Biblio;
(-)a/misc/admin/set_password.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Bytes::Random::Secure;
22
use Bytes::Random::Secure;
23
use Getopt::Long;
23
use Getopt::Long qw( GetOptions );
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
use String::Random;
25
use String::Random;
26
26
27
use Koha::Patrons;
27
use Koha::Patrons;
(-)a/misc/background_jobs_worker.pl (-2 / +2 lines)
Lines 16-23 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( encode_json decode_json );
19
use JSON qw( decode_json );
20
use Try::Tiny;
20
use Try::Tiny qw( catch try );
21
21
22
use Koha::BackgroundJobs;
22
use Koha::BackgroundJobs;
23
23
(-)a/misc/batchCompareMARCvsFrameworks.pl (-3 / +2 lines)
Lines 7-13 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
12
}
13
13
Lines 15-24 BEGIN { Link Here
15
use Koha::Script;
15
use Koha::Script;
16
use C4::Context;
16
use C4::Context;
17
use MARC::File::USMARC;
17
use MARC::File::USMARC;
18
use MARC::Record;
19
use MARC::Batch;
18
use MARC::Batch;
20
19
21
use Getopt::Long;
20
use Getopt::Long qw( GetOptions );
22
use IO::File;
21
use IO::File;
23
22
24
my ( $input_marc_file,$number,$nowarning,$frameworkcode) = ('',0);
23
my ( $input_marc_file,$number,$nowarning,$frameworkcode) = ('',0);
(-)a/misc/batchDeleteUnusedSubfields.pl (-5 / +4 lines)
Lines 6-23 use strict; Link Here
6
BEGIN {
6
BEGIN {
7
    # find Koha's Perl modules
7
    # find Koha's Perl modules
8
    # test carefully before changing this
8
    # test carefully before changing this
9
    use FindBin;
9
    use FindBin ();
10
    eval { require "$FindBin::Bin/kohalib.pl" };
10
    eval { require "$FindBin::Bin/kohalib.pl" };
11
}
11
}
12
12
13
# Koha modules used
13
# Koha modules used
14
use Koha::Script;
14
use Koha::Script;
15
use MARC::Record;
16
use C4::Context;
15
use C4::Context;
17
use C4::Biblio;
16
use C4::Biblio qw( GetMarcStructure );
18
use Time::HiRes qw(gettimeofday);
17
use Time::HiRes qw( gettimeofday );
19
18
20
use Getopt::Long;
19
use Getopt::Long qw( GetOptions );
21
my ( $input_marc_file, $number) = ('',0);
20
my ( $input_marc_file, $number) = ('',0);
22
my ($version, $confirm,$test_parameter);
21
my ($version, $confirm,$test_parameter);
23
GetOptions(
22
GetOptions(
(-)a/misc/batchImportMARCWithBiblionumbers.pl (-5 / +4 lines)
Lines 6-12 use strict; Link Here
6
BEGIN {
6
BEGIN {
7
    # find Koha's Perl modules
7
    # find Koha's Perl modules
8
    # test carefully before changing this
8
    # test carefully before changing this
9
    use FindBin;
9
    use FindBin ();
10
    eval { require "$FindBin::Bin/kohalib.pl" };
10
    eval { require "$FindBin::Bin/kohalib.pl" };
11
}
11
}
12
12
Lines 14-26 BEGIN { Link Here
14
14
15
use Koha::Script;
15
use Koha::Script;
16
use C4::Context;
16
use C4::Context;
17
use C4::Biblio;
17
use C4::Biblio qw( GetMarcFromKohaField );
18
use MARC::Record;
19
use MARC::File::USMARC;
18
use MARC::File::USMARC;
20
use MARC::File::XML;
19
use MARC::File::XML;
21
use MARC::Batch;
20
use MARC::Batch;
22
use Time::HiRes qw(gettimeofday);
21
use Time::HiRes qw( gettimeofday );
23
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
24
use IO::File;
23
use IO::File;
25
24
26
my  $input_marc_file = '';
25
my  $input_marc_file = '';
(-)a/misc/batchRebuildBiblioTables.pl (-4 / +7 lines)
Lines 8-14 use strict; Link Here
8
BEGIN {
8
BEGIN {
9
    # find Koha's Perl modules
9
    # find Koha's Perl modules
10
    # test carefully before changing this
10
    # test carefully before changing this
11
    use FindBin;
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/kohalib.pl" };
12
    eval { require "$FindBin::Bin/kohalib.pl" };
13
}
13
}
14
14
Lines 17-26 use Koha::Script; Link Here
17
use MARC::Record;
17
use MARC::Record;
18
use C4::Charset;
18
use C4::Charset;
19
use C4::Context;
19
use C4::Context;
20
use C4::Biblio;
20
use C4::Biblio qw(
21
use Time::HiRes qw(gettimeofday);
21
    GetXmlBiblio
22
    TransformMarcToKoha
23
);
24
use Time::HiRes qw( gettimeofday );
22
25
23
use Getopt::Long;
26
use Getopt::Long qw( GetOptions );
24
27
25
my ($version, $confirm);
28
my ($version, $confirm);
26
GetOptions(
29
GetOptions(
(-)a/misc/batchRebuildItemsTables.pl (-5 / +5 lines)
Lines 2-17 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Getopt::Long;
5
use Getopt::Long qw( GetOptions );
6
use MARC::Field;
6
use MARC::Field;
7
use MARC::Record;
7
use MARC::Record;
8
use Pod::Usage;
8
use Pod::Usage qw( pod2usage );
9
use Time::HiRes qw(gettimeofday);
9
use Time::HiRes qw( gettimeofday );
10
10
11
use Koha::Script;
11
use Koha::Script;
12
use C4::Context;
12
use C4::Context;
13
use C4::Biblio;
13
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField );
14
use C4::Items;
14
use C4::Items qw( ModItemFromMarc );
15
15
16
=head1 NAME
16
=head1 NAME
17
17
(-)a/misc/batchRepairMissingBiblionumbers.pl (-2 / +2 lines)
Lines 7-20 use warnings; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
12
}
13
13
14
# Koha modules used
14
# Koha modules used
15
use Koha::Script;
15
use Koha::Script;
16
use C4::Context;
16
use C4::Context;
17
use C4::Biblio;
17
use C4::Biblio qw( GetMarcBiblio ModBiblioMarc );
18
18
19
19
20
my $dbh = C4::Context->dbh;
20
my $dbh = C4::Context->dbh;
(-)a/misc/batchdeletebiblios.pl (-4 / +3 lines)
Lines 1-12 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Getopt::Long;
4
use Getopt::Long qw( GetOptions );
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use IO::File;
7
6
8
use Koha::Script;
7
use Koha::Script;
9
use C4::Biblio;
8
use C4::Biblio qw( DelBiblio );
10
9
11
my $help;
10
my $help;
12
GetOptions(
11
GetOptions(
(-)a/misc/bin/connexion_import_daemon.pl (-6 / +6 lines)
Lines 20-26 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use Getopt::Long;
23
use Getopt::Long qw( GetOptions );
24
24
25
my ($help, $config, $daemon);
25
my ($help, $config, $daemon);
26
26
Lines 86-102 exit; Link Here
86
{
86
{
87
package ImportProxyServer;
87
package ImportProxyServer;
88
88
89
use Carp;
89
use Carp qw( croak );
90
use IO::Socket::INET;
90
use IO::Socket::INET qw( SOCK_STREAM );
91
# use IO::Socket::IP;
91
# use IO::Socket::IP;
92
use IO::Select;
92
use IO::Select;
93
use POSIX;
93
use POSIX qw( close exit fork localtime open printf sprintf );
94
use HTTP::Status qw(:constants);
94
use HTTP::Status qw( HTTP_FORBIDDEN HTTP_UNAUTHORIZED );
95
use strict;
95
use strict;
96
use warnings;
96
use warnings;
97
97
98
use LWP::UserAgent;
98
use LWP::UserAgent;
99
use XML::Simple;
99
use XML::Simple qw( XMLin );
100
use MARC::Record;
100
use MARC::Record;
101
use MARC::File::XML;
101
use MARC::File::XML;
102
102
(-)a/misc/check_sysprefs.pl (-1 / +1 lines)
Lines 8-14 Link Here
8
use strict;
8
use strict;
9
use warnings;
9
use warnings;
10
10
11
use File::Find;
11
use File::Find qw( find );
12
12
13
use Koha::Script;
13
use Koha::Script;
14
use C4::Context;
14
use C4::Context;
(-)a/misc/commit_file.pl (-3 / +3 lines)
Lines 5-18 use warnings; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/kohalib.pl" };
9
    eval { require "$FindBin::Bin/kohalib.pl" };
10
}
10
}
11
11
12
use Koha::Script;
12
use Koha::Script;
13
use C4::Context;
13
use C4::Context;
14
use C4::ImportBatch;
14
use C4::ImportBatch qw( GetImportBatch BatchCommitRecords BatchRevertRecords );
15
use Getopt::Long;
15
use Getopt::Long qw( GetOptions );
16
16
17
$| = 1;
17
$| = 1;
18
18
(-)a/misc/cronjobs/advance_notices.pl (-8 / +4 lines)
Lines 38-61 the OPAC. Link Here
38
38
39
use strict;
39
use strict;
40
use warnings;
40
use warnings;
41
use Getopt::Long;
41
use Getopt::Long qw( GetOptions );
42
use Pod::Usage;
42
use Pod::Usage qw( pod2usage );
43
use Data::Dumper;
44
BEGIN {
43
BEGIN {
45
    # find Koha's Perl modules
44
    # find Koha's Perl modules
46
    # test carefully before changing this
45
    # test carefully before changing this
47
    use FindBin;
46
    use FindBin ();
48
    eval { require "$FindBin::Bin/../kohalib.pl" };
47
    eval { require "$FindBin::Bin/../kohalib.pl" };
49
}
48
}
50
use Koha::Script -cron;
49
use Koha::Script -cron;
51
use C4::Biblio;
52
use C4::Context;
50
use C4::Context;
53
use C4::Letters;
51
use C4::Letters;
54
use C4::Members;
52
use C4::Members;
55
use C4::Members::Messaging;
53
use C4::Members::Messaging;
56
use C4::Overdues;
54
use C4::Log qw( cronlogaction );
57
use Koha::DateUtils;
58
use C4::Log;
59
use Koha::Items;
55
use Koha::Items;
60
use Koha::Libraries;
56
use Koha::Libraries;
61
use Koha::Patrons;
57
use Koha::Patrons;
(-)a/misc/cronjobs/archive_purchase_suggestions.pl (-3 / +3 lines)
Lines 2-15 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
9
10
use Koha::DateUtils qw( dt_from_string output_pref );
10
use Koha::DateUtils qw( dt_from_string output_pref );
11
use Koha::Suggestions;
11
use Koha::Suggestions;
12
use C4::Koha;
12
use C4::Koha qw( GetAuthorisedValues );
13
13
14
my ( $help, $verbose, $confirm, $age, $age_date_field, @statuses );
14
my ( $help, $verbose, $confirm, $age, $age_date_field, @statuses );
15
GetOptions(
15
GetOptions(
(-)a/misc/cronjobs/automatic_checkin.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use Koha::Checkouts;
21
use Koha::Checkouts;
22
use Koha::Script -cron;
22
use Koha::Script -cron;
23
use C4::Log;
23
use C4::Log qw( cronlogaction );
24
24
25
cronlogaction();
25
cronlogaction();
26
26
(-)a/misc/cronjobs/automatic_item_modification_by_age.pl (-3 / +3 lines)
Lines 2-15 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Getopt::Long;
5
use Getopt::Long qw( GetOptions );
6
use Pod::Usage;
6
use Pod::Usage qw( pod2usage );
7
use JSON;
7
use JSON;
8
8
9
use Koha::Script -cron;
9
use Koha::Script -cron;
10
use C4::Context;
10
use C4::Context;
11
use C4::Items;
11
use C4::Items;
12
use C4::Log;
12
use C4::Log qw( cronlogaction );
13
13
14
# Getting options
14
# Getting options
15
my ( $verbose, $help, $confirm );
15
my ( $verbose, $help, $confirm );
(-)a/misc/cronjobs/automatic_renewals.pl (-4 / +4 lines)
Lines 75-87 chosen 'Digests only' on the advance messages. Link Here
75
=cut
75
=cut
76
76
77
use Modern::Perl;
77
use Modern::Perl;
78
use Pod::Usage;
78
use Pod::Usage qw( pod2usage );
79
use Getopt::Long;
79
use Getopt::Long qw( GetOptions );
80
80
81
use Koha::Script -cron;
81
use Koha::Script -cron;
82
use C4::Circulation;
82
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
83
use C4::Context;
83
use C4::Context;
84
use C4::Log;
84
use C4::Log qw( cronlogaction );
85
use C4::Letters;
85
use C4::Letters;
86
use Koha::Checkouts;
86
use Koha::Checkouts;
87
use Koha::Libraries;
87
use Koha::Libraries;
(-)a/misc/cronjobs/batch_anonymise.pl (-8 / +4 lines)
Lines 19-43 Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
use Carp;
23
22
24
BEGIN {
23
BEGIN {
25
24
26
    # find Koha's Perl modules
25
    # find Koha's Perl modules
27
    # test carefully before changing this
26
    # test carefully before changing this
28
    use FindBin;
27
    use FindBin ();
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
29
}
31
30
32
use Koha::Script -cron;
31
use Koha::Script -cron;
33
use C4::Context;
32
use C4::Context;
34
use Koha::Patrons;
33
use Koha::Patrons;
35
use Date::Calc qw(
34
use Date::Calc qw( Add_Delta_Days Today );
36
  Today
35
use Getopt::Long qw( GetOptions );
37
  Add_Delta_Days
36
use C4::Log qw( cronlogaction );
38
);
39
use Getopt::Long;
40
use C4::Log;
41
37
42
sub usage {
38
sub usage {
43
    print STDERR <<USAGE;
39
    print STDERR <<USAGE;
(-)a/misc/cronjobs/build_browser_and_cloud.pl (-1 / +1 lines)
Lines 13-19 BEGIN { Link Here
13
use Koha::Script -cron;
13
use Koha::Script -cron;
14
use C4::Koha;
14
use C4::Koha;
15
use C4::Context;
15
use C4::Context;
16
use C4::Biblio;
16
use C4::Biblio qw( GetMarcBiblio );
17
use Date::Calc;
17
use Date::Calc;
18
use Time::HiRes qw(gettimeofday);
18
use Time::HiRes qw(gettimeofday);
19
use ZOOM;
19
use ZOOM;
(-)a/misc/cronjobs/cart_to_shelf.pl (-4 / +4 lines)
Lines 29-46 use strict; Link Here
29
use warnings;
29
use warnings;
30
30
31
use Koha::Script -cron;
31
use Koha::Script -cron;
32
use C4::Items qw/ CartToShelf /;
32
use C4::Items qw( CartToShelf );
33
use C4::Log;
33
use C4::Log qw( cronlogaction );
34
34
35
BEGIN {
35
BEGIN {
36
36
37
    # find Koha's Perl modules
37
    # find Koha's Perl modules
38
    # test carefully before changing this
38
    # test carefully before changing this
39
    use FindBin;
39
    use FindBin ();
40
    eval { require "$FindBin::Bin/../kohalib.pl" };
40
    eval { require "$FindBin::Bin/../kohalib.pl" };
41
}
41
}
42
use C4::Context;
42
use C4::Context;
43
use Getopt::Long;
43
use Getopt::Long qw( GetOptions );
44
44
45
my $hours = 0;
45
my $hours = 0;
46
46
(-)a/misc/cronjobs/check-url-quick.pl (-5 / +5 lines)
Lines 18-32 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Pod::Usage;
21
use Pod::Usage qw( pod2usage );
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
23
24
use Koha::Script -cron;
24
use Koha::Script -cron;
25
use C4::Context;
25
use C4::Context;
26
use C4::Biblio;
26
use C4::Biblio qw( GetMarcBiblio );
27
use AnyEvent;
27
use AnyEvent;
28
use AnyEvent::HTTP;
28
use AnyEvent::HTTP qw( http_request );
29
use Encode;
29
use Encode qw( encode_utf8 );
30
30
31
my ( $verbose, $help, $html ) = ( 0, 0, 0 );
31
my ( $verbose, $help, $html ) = ( 0, 0, 0 );
32
my ( $host,    $host_intranet ) = ( '', '' );
32
my ( $host,    $host_intranet ) = ( '', '' );
(-)a/misc/cronjobs/cleanup_database.pl (-4 / +4 lines)
Lines 31-37 use constant DEFAULT_DEBARMENTS_PURGEDAYS => 30; Link Here
31
BEGIN {
31
BEGIN {
32
    # find Koha's Perl modules
32
    # find Koha's Perl modules
33
    # test carefully before changing this
33
    # test carefully before changing this
34
    use FindBin;
34
    use FindBin ();
35
    eval { require "$FindBin::Bin/../kohalib.pl" };
35
    eval { require "$FindBin::Bin/../kohalib.pl" };
36
}
36
}
37
37
Lines 39-47 use Koha::Script -cron; Link Here
39
use C4::Context;
39
use C4::Context;
40
use C4::Search;
40
use C4::Search;
41
use C4::Search::History;
41
use C4::Search::History;
42
use Getopt::Long;
42
use Getopt::Long qw( GetOptions );
43
use C4::Log;
43
use C4::Log qw( cronlogaction );
44
use C4::Accounts;
44
use C4::Accounts qw( purge_zero_balance_fees );
45
use Koha::UploadedFiles;
45
use Koha::UploadedFiles;
46
use Koha::Old::Biblios;
46
use Koha::Old::Biblios;
47
use Koha::Old::Items;
47
use Koha::Old::Items;
(-)a/misc/cronjobs/cloud-kw.pl (-5 / +5 lines)
Lines 21-34 Link Here
21
use strict;
21
use strict;
22
use warnings;
22
use warnings;
23
use diagnostics;
23
use diagnostics;
24
use Carp;
24
use Carp qw( carp croak );
25
use YAML::XS;
25
use YAML::XS;
26
use Pod::Usage;
26
use Pod::Usage qw( pod2usage );
27
use Getopt::Long;
27
use Getopt::Long qw( GetOptions );
28
28
29
use Koha::Script -cron;
29
use Koha::Script -cron;
30
use C4::Context;
30
use C4::Context;
31
use C4::Log;
31
use C4::Log qw( cronlogaction );
32
32
33
my $verbose     = 0;
33
my $verbose     = 0;
34
my $help        = 0;
34
my $help        = 0;
Lines 97-103 package ZebraIndex; Link Here
97
use strict;
97
use strict;
98
use warnings;
98
use warnings;
99
use diagnostics;
99
use diagnostics;
100
use Carp;
100
use Carp qw( carp croak );
101
101
102
sub new {
102
sub new {
103
    my $self = {};
103
    my $self = {};
(-)a/misc/cronjobs/create_koc_db.pl (-2 / +2 lines)
Lines 92-99 use warnings; Link Here
92
$|++;
92
$|++;
93
93
94
use DBI;
94
use DBI;
95
use Getopt::Long;
95
use Getopt::Long qw( GetOptions );
96
use Pod::Usage;
96
use Pod::Usage qw( pod2usage );
97
97
98
use Koha::Script -cron;
98
use Koha::Script -cron;
99
use C4::Context;
99
use C4::Context;
(-)a/misc/cronjobs/delete_items.pl (-4 / +2 lines)
Lines 1-13 Link Here
1
#! /usr/bin/perl
1
#! /usr/bin/perl
2
2
3
use Getopt::Long;
3
use Getopt::Long qw( GetOptions );
4
4
5
use Koha::Script -cron;
5
use Koha::Script -cron;
6
use C4::Context;
6
use C4::Context;
7
use C4::Items;
8
use C4::Circulation;
9
use Modern::Perl;
7
use Modern::Perl;
10
use Pod::Usage;
8
use Pod::Usage qw( pod2usage );
11
9
12
my $dbh = C4::Context->dbh();
10
my $dbh = C4::Context->dbh();
13
11
(-)a/misc/cronjobs/delete_patrons.pl (-5 / +5 lines)
Lines 2-15 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::Members;
9
use C4::Members qw( GetBorrowersToExpunge );
10
use Koha::DateUtils;
10
use Koha::DateUtils qw( dt_from_string );
11
use Koha::Patrons;
11
use Koha::Patrons;
12
use C4::Log;
12
use C4::Log qw( cronlogaction );
13
13
14
my ( $help, $verbose, $not_borrowed_since, $expired_before, $last_seen,
14
my ( $help, $verbose, $not_borrowed_since, $expired_before, $last_seen,
15
    @category_code, $branchcode, $file, $confirm );
15
    @category_code, $branchcode, $file, $confirm );
(-)a/misc/cronjobs/delete_records_via_leader.pl (-5 / +4 lines)
Lines 27-41 BEGIN { Link Here
27
27
28
    # find Koha's Perl modules
28
    # find Koha's Perl modules
29
    # test carefully before changing this
29
    # test carefully before changing this
30
    use FindBin;
30
    use FindBin ();
31
    eval { require "$FindBin::Bin/../kohalib.pl" };
31
    eval { require "$FindBin::Bin/../kohalib.pl" };
32
}
32
}
33
33
34
use Getopt::Long;
34
use Getopt::Long qw( GetOptions );
35
use Pod::Usage;
35
use Pod::Usage qw( pod2usage );
36
use Koha::Script -cron;
36
use Koha::Script -cron;
37
use C4::Biblio;
37
use C4::Biblio qw( DelBiblio );
38
use C4::Items;
39
use Koha::Database;
38
use Koha::Database;
40
use Koha::Biblios;
39
use Koha::Biblios;
41
use Koha::Biblio::Metadatas;
40
use Koha::Biblio::Metadatas;
(-)a/misc/cronjobs/edi_cron.pl (-2 / +2 lines)
Lines 33-42 use Koha::Script -cron; Link Here
33
use C4::Context;
33
use C4::Context;
34
use Log::Log4perl qw(:easy);
34
use Log::Log4perl qw(:easy);
35
use Koha::Database;
35
use Koha::Database;
36
use Koha::EDI qw( process_quote process_invoice process_ordrsp);
36
use Koha::EDI qw( process_quote process_invoice process_ordrsp );
37
use Koha::Edifact::Transport;
37
use Koha::Edifact::Transport;
38
use Koha::Plugins::Handler;
38
use Koha::Plugins::Handler;
39
use Fcntl qw( :DEFAULT :flock :seek );
39
use Fcntl qw( LOCK_EX O_CREAT O_RDWR SEEK_SET );
40
40
41
my $logdir = C4::Context->config('logdir');
41
my $logdir = C4::Context->config('logdir');
42
42
(-)a/misc/cronjobs/fines.pl (-6 / +6 lines)
Lines 32-47 use 5.010; Link Here
32
32
33
use Koha::Script -cron;
33
use Koha::Script -cron;
34
use C4::Context;
34
use C4::Context;
35
use C4::Overdues;
35
use C4::Overdues qw( Getoverdues CalcFine UpdateFine );
36
use Getopt::Long;
36
use Getopt::Long qw( GetOptions );
37
use Carp;
37
use Carp qw( carp croak );
38
use File::Spec;
38
use File::Spec;
39
use Try::Tiny;
39
use Try::Tiny qw( catch try );
40
40
41
use Koha::Calendar;
41
use Koha::Calendar;
42
use Koha::DateUtils;
42
use Koha::DateUtils qw( dt_from_string output_pref );
43
use Koha::Patrons;
43
use Koha::Patrons;
44
use C4::Log;
44
use C4::Log qw( cronlogaction );
45
45
46
my $help;
46
my $help;
47
my $verbose;
47
my $verbose;
(-)a/misc/cronjobs/gather_print_notices.pl (-8 / +8 lines)
Lines 5-26 use Modern::Perl; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
10
}
10
}
11
11
12
use CGI qw( utf8 ); # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
12
use CGI; # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
13
use Koha::Script -cron;
13
use Koha::Script -cron;
14
use C4::Context;
14
use C4::Context;
15
use C4::Letters;
15
use C4::Letters qw( GetPrintMessages );
16
use C4::Templates;
16
use C4::Templates;
17
use File::Spec;
17
use File::Spec;
18
use Pod::Usage;
18
use Pod::Usage qw( pod2usage );
19
use Getopt::Long;
19
use Getopt::Long qw( GetOptions );
20
use C4::Log;
20
use C4::Log qw( cronlogaction );
21
21
22
use Koha::DateUtils;
22
use Koha::DateUtils qw( dt_from_string output_pref );
23
use Koha::Util::OpenDocument;
23
use Koha::Util::OpenDocument qw( generate_ods );
24
use MIME::Lite;
24
use MIME::Lite;
25
25
26
my (
26
my (
(-)a/misc/cronjobs/holds/auto_unsuspend_holds.pl (-2 / +2 lines)
Lines 23-29 use warnings; Link Here
23
BEGIN {
23
BEGIN {
24
    # find Koha's Perl modules
24
    # find Koha's Perl modules
25
    # test carefully before changing this
25
    # test carefully before changing this
26
    use FindBin;
26
    use FindBin ();
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
}
28
}
29
29
Lines 31-37 BEGIN { Link Here
31
31
32
use Koha::Script -cron;
32
use Koha::Script -cron;
33
use C4::Reserves;
33
use C4::Reserves;
34
use C4::Log;
34
use C4::Log qw( cronlogaction );
35
35
36
cronlogaction();
36
cronlogaction();
37
37
(-)a/misc/cronjobs/holds/build_holds_queue.pl (-2 / +2 lines)
Lines 11-23 use warnings; Link Here
11
BEGIN {
11
BEGIN {
12
    # find Koha's Perl modules
12
    # find Koha's Perl modules
13
    # test carefully before changing this
13
    # test carefully before changing this
14
    use FindBin;
14
    use FindBin ();
15
    eval { require "$FindBin::Bin/../kohalib.pl" };
15
    eval { require "$FindBin::Bin/../kohalib.pl" };
16
}
16
}
17
17
18
use Koha::Script -cron;
18
use Koha::Script -cron;
19
use C4::HoldsQueue qw(CreateQueue);
19
use C4::HoldsQueue qw(CreateQueue);
20
use C4::Log;
20
use C4::Log qw( cronlogaction );
21
21
22
cronlogaction();
22
cronlogaction();
23
23
(-)a/misc/cronjobs/holds/cancel_expired_holds.pl (-4 / +4 lines)
Lines 39-57 This script calls C4::Reserves::CancelExpiredReserves which will find and cancel Link Here
39
=cut
39
=cut
40
40
41
use Modern::Perl;
41
use Modern::Perl;
42
use Getopt::Long;
42
use Getopt::Long qw( GetOptions );
43
use Pod::Usage;
43
use Pod::Usage qw( pod2usage );
44
44
45
BEGIN {
45
BEGIN {
46
    # find Koha's Perl modules
46
    # find Koha's Perl modules
47
    # test carefully before changing this
47
    # test carefully before changing this
48
    use FindBin;
48
    use FindBin ();
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
50
}
50
}
51
51
52
use Koha::Script -cron;
52
use Koha::Script -cron;
53
use C4::Reserves;
53
use C4::Reserves;
54
use C4::Log;
54
use C4::Log qw( cronlogaction );
55
55
56
=head1 OPTIONS
56
=head1 OPTIONS
57
57
(-)a/misc/cronjobs/holds/cancel_unfilled_holds.pl (-5 / +4 lines)
Lines 21-39 use Modern::Perl; Link Here
21
BEGIN {
21
BEGIN {
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
    use FindBin ();
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
26
}
27
27
28
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
29
use Pod::Usage;
29
use Pod::Usage qw( pod2usage );
30
30
31
use Koha::Script -cron;
31
use Koha::Script -cron;
32
use C4::Reserves;
32
use C4::Reserves;
33
use C4::Log;
33
use C4::Log qw( cronlogaction );
34
use Koha::Holds;
34
use Koha::Holds;
35
use Koha::Calendar;
35
use Koha::Calendar;
36
use Koha::DateUtils;
37
use Koha::Libraries;
36
use Koha::Libraries;
38
37
39
cronlogaction();
38
cronlogaction();
(-)a/misc/cronjobs/holds/holds_reminder.pl (-6 / +5 lines)
Lines 21-40 BEGIN { Link Here
21
21
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
    use FindBin ();
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
26
}
27
27
28
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
29
use Pod::Usage;
29
use Pod::Usage qw( pod2usage );
30
use Text::CSV_XS;
31
use DateTime;
30
use DateTime;
32
use DateTime::Duration;
31
use DateTime::Duration;
33
32
34
use C4::Context;
33
use C4::Context;
35
use C4::Letters;
34
use C4::Letters;
36
use C4::Log;
35
use C4::Log qw( cronlogaction );
37
use Koha::DateUtils;
36
use Koha::DateUtils qw( dt_from_string );
38
use Koha::Calendar;
37
use Koha::Calendar;
39
use Koha::Libraries;
38
use Koha::Libraries;
40
use Koha::Notice::Templates;
39
use Koha::Notice::Templates;
(-)a/misc/cronjobs/import_webservice_batch.pl (-4 / +3 lines)
Lines 25-38 BEGIN { Link Here
25
25
26
    # find Koha's Perl modules
26
    # find Koha's Perl modules
27
    # test carefully before changing this
27
    # test carefully before changing this
28
    use FindBin;
28
    use FindBin ();
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
30
}
31
31
32
use Getopt::Long;
32
use Getopt::Long qw( GetOptions );
33
use Pod::Usage;
34
use Koha::Script -cron;
33
use Koha::Script -cron;
35
use C4::ImportBatch;
34
use C4::ImportBatch qw( BatchCommitRecords );
36
35
37
my ($help, $framework);
36
my ($help, $framework);
38
37
(-)a/misc/cronjobs/longoverdue.pl (-6 / +5 lines)
Lines 30-46 use warnings; Link Here
30
BEGIN {
30
BEGIN {
31
    # find Koha's Perl modules
31
    # find Koha's Perl modules
32
    # test carefully before changing this
32
    # test carefully before changing this
33
    use FindBin;
33
    use FindBin ();
34
    eval { require "$FindBin::Bin/../kohalib.pl" };
34
    eval { require "$FindBin::Bin/../kohalib.pl" };
35
}
35
}
36
36
37
use Getopt::Long;
37
use Getopt::Long qw( GetOptions );
38
use Pod::Usage;
38
use Pod::Usage qw( pod2usage );
39
39
40
use C4::Circulation qw/LostItem MarkIssueReturned/;
40
use C4::Circulation qw( LostItem MarkIssueReturned );
41
use C4::Context;
41
use C4::Context;
42
use C4::Items;
42
use C4::Log qw( cronlogaction );
43
use C4::Log;
44
use Koha::ItemTypes;
43
use Koha::ItemTypes;
45
use Koha::Patron::Categories;
44
use Koha::Patron::Categories;
46
use Koha::Patrons;
45
use Koha::Patrons;
(-)a/misc/cronjobs/membership_expiry.pl (-5 / +4 lines)
Lines 116-135 any field from the branches table Link Here
116
=cut
116
=cut
117
117
118
use Modern::Perl;
118
use Modern::Perl;
119
use Getopt::Long;
119
use Getopt::Long qw( GetOptions );
120
use Pod::Usage;
120
use Pod::Usage qw( pod2usage );
121
use Data::Dumper;
122
BEGIN {
121
BEGIN {
123
    # find Koha's Perl modules
122
    # find Koha's Perl modules
124
    # test carefully before changing this
123
    # test carefully before changing this
125
    use FindBin;
124
    use FindBin ();
126
    eval { require "$FindBin::Bin/../kohalib.pl" };
125
    eval { require "$FindBin::Bin/../kohalib.pl" };
127
}
126
}
128
127
129
use Koha::Script -cron;
128
use Koha::Script -cron;
130
use C4::Context;
129
use C4::Context;
131
use C4::Letters;
130
use C4::Letters;
132
use C4::Log;
131
use C4::Log qw( cronlogaction );
133
132
134
use Koha::Patrons;
133
use Koha::Patrons;
135
134
(-)a/misc/cronjobs/merge_authorities.pl (-3 / +3 lines)
Lines 1-9 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Getopt::Long;
4
use Getopt::Long qw( GetOptions );
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Time::HiRes qw(gettimeofday);
6
use Time::HiRes qw( gettimeofday );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::AuthoritiesMarc;
9
use C4::AuthoritiesMarc;
(-)a/misc/cronjobs/notice_unprocessed_suggestions.pl (-4 / +4 lines)
Lines 2-13 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::Budgets qw( GetBudget );
9
use C4::Budgets;
10
use C4::Suggestions qw( GetUnprocessedSuggestions );
10
use C4::Suggestions;
11
use Koha::Libraries;
11
use Koha::Libraries;
12
use Koha::Patrons;
12
use Koha::Patrons;
13
13
(-)a/misc/cronjobs/overdue_notices.pl (-7 / +7 lines)
Lines 24-35 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
29
}
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
32
use Pod::Usage qw( pod2usage );
33
use Text::CSV_XS;
33
use Text::CSV_XS;
34
use DateTime;
34
use DateTime;
35
use DateTime::Duration;
35
use DateTime::Duration;
Lines 37-46 use DateTime::Duration; Link Here
37
use Koha::Script -cron;
37
use Koha::Script -cron;
38
use C4::Context;
38
use C4::Context;
39
use C4::Letters;
39
use C4::Letters;
40
use C4::Overdues qw(GetFine GetOverdueMessageTransportTypes parse_overdues_letter);
40
use C4::Overdues qw( GetOverdueMessageTransportTypes parse_overdues_letter );
41
use C4::Log;
41
use C4::Log qw( cronlogaction );
42
use Koha::Patron::Debarments qw(AddUniqueDebarment);
42
use Koha::Patron::Debarments qw( AddUniqueDebarment );
43
use Koha::DateUtils;
43
use Koha::DateUtils qw( dt_from_string output_pref );
44
use Koha::Calendar;
44
use Koha::Calendar;
45
use Koha::Libraries;
45
use Koha::Libraries;
46
use Koha::Acquisition::Currencies;
46
use Koha::Acquisition::Currencies;
(-)a/misc/cronjobs/patron_emailer.pl (-5 / +5 lines)
Lines 21-36 use Modern::Perl; Link Here
21
BEGIN {
21
BEGIN {
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
    use FindBin ();
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
26
}
27
27
28
use Koha::Script -cron;
28
use Koha::Script -cron;
29
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
30
use Pod::Usage;
30
use Pod::Usage qw( pod2usage );
31
31
32
use C4::Log;
32
use C4::Log qw( cronlogaction );
33
use C4::Reports::Guided;
33
use C4::Reports::Guided qw( EmailReport );
34
34
35
cronlogaction();
35
cronlogaction();
36
36
(-)a/misc/cronjobs/plugins_nightly.pl (-2 / +2 lines)
Lines 2-11 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Try::Tiny;
5
use Try::Tiny qw( catch try );
6
6
7
use C4::Context;
7
use C4::Context;
8
use C4::Log;
8
use C4::Log qw( cronlogaction );
9
use Koha::Logger;
9
use Koha::Logger;
10
use Koha::Plugins;
10
use Koha::Plugins;
11
use Koha::Script -cron;
11
use Koha::Script -cron;
(-)a/misc/cronjobs/process_message_queue.pl (-5 / +5 lines)
Lines 22-36 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
27
}
28
28
29
use Koha::Script -cron;
29
use Koha::Script -cron;
30
use C4::Letters;
30
use C4::Letters qw( SendQueuedMessages );
31
use C4::Log;
31
use C4::Log qw( cronlogaction );
32
use Getopt::Long;
32
use Getopt::Long qw( GetOptions );
33
use Try::Tiny;
33
use Try::Tiny qw( catch try );
34
34
35
my $username = undef;
35
my $username = undef;
36
my $password = undef;
36
my $password = undef;
(-)a/misc/cronjobs/purge_suggestions.pl (-4 / +3 lines)
Lines 22-37 use Modern::Perl; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
27
}
28
28
29
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
30
use Pod::Usage;
31
30
32
use Koha::Script -cron;
31
use Koha::Script -cron;
33
use C4::Suggestions;
32
use C4::Suggestions;
34
use C4::Log;
33
use C4::Log qw( cronlogaction );
35
use C4::Context;
34
use C4::Context;
36
35
37
my ( $help, $days, $confirm );
36
my ( $help, $days, $confirm );
(-)a/misc/cronjobs/reconcile_balances.pl (-5 / +5 lines)
Lines 51-69 Makes the process print information about the taken actions. Link Here
51
51
52
use Modern::Perl;
52
use Modern::Perl;
53
53
54
use Getopt::Long;
54
use Getopt::Long qw( GetOptions );
55
use Pod::Usage;
55
use Pod::Usage qw( pod2usage );
56
use Try::Tiny;
56
use Try::Tiny qw( catch try );
57
57
58
BEGIN {
58
BEGIN {
59
    # find Koha's Perl modules
59
    # find Koha's Perl modules
60
    # test carefully before changing this
60
    # test carefully before changing this
61
    use FindBin;
61
    use FindBin ();
62
    eval { require "$FindBin::Bin/../kohalib.pl" };
62
    eval { require "$FindBin::Bin/../kohalib.pl" };
63
}
63
}
64
64
65
use Koha::Script -cron;
65
use Koha::Script -cron;
66
use C4::Log;
66
use C4::Log qw( cronlogaction );
67
67
68
use Koha::Account::Lines;
68
use Koha::Account::Lines;
69
use Koha::Patrons;
69
use Koha::Patrons;
(-)a/misc/cronjobs/rss/rss.pl (-2 / +1 lines)
Lines 31-38 use Template; Link Here
31
31
32
use Koha::Script -cron;
32
use Koha::Script -cron;
33
use C4::Context;
33
use C4::Context;
34
use Time::Local;
34
use POSIX qw( close localtime open strftime );
35
use POSIX;
36
35
37
my $dbh     = C4::Context->dbh;
36
my $dbh     = C4::Context->dbh;
38
my $file    = $ARGV[0];
37
my $file    = $ARGV[0];
(-)a/misc/cronjobs/runreport.pl (-9 / +9 lines)
Lines 21-47 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Koha::Script -cron;
23
use Koha::Script -cron;
24
use C4::Reports::Guided; # 0.12
24
use C4::Reports::Guided qw( store_results execute_query );
25
use Koha::Reports;
25
use Koha::Reports;
26
use C4::Context;
26
use C4::Context;
27
use C4::Log;
27
use C4::Log qw( cronlogaction );
28
use Koha::Email;
28
use Koha::Email;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string );
30
use Koha::SMTP::Servers;
30
use Koha::SMTP::Servers;
31
31
32
use Getopt::Long qw(:config auto_help auto_version);
32
use Getopt::Long qw( GetOptions );
33
use Pod::Usage;
33
use Pod::Usage qw( pod2usage );
34
use Text::CSV::Encoded;
34
use Text::CSV::Encoded;
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use Carp;
36
use Carp qw( carp );
37
use Encode;
37
use Encode qw( decode );
38
use JSON qw( to_json );
38
use JSON qw( to_json );
39
use Try::Tiny;
39
use Try::Tiny qw( catch try );
40
40
41
BEGIN {
41
BEGIN {
42
    # find Koha's Perl modules
42
    # find Koha's Perl modules
43
    # test carefully before changing this
43
    # test carefully before changing this
44
    use FindBin;
44
    use FindBin ();
45
    eval { require "$FindBin::Bin/../kohalib.pl" };
45
    eval { require "$FindBin::Bin/../kohalib.pl" };
46
}
46
}
47
47
(-)a/misc/cronjobs/serialsUpdate.pl (-7 / +7 lines)
Lines 24-43 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
29
}
30
30
31
use Koha::Script -cron;
31
use Koha::Script -cron;
32
use C4::Context;
32
use C4::Context;
33
use C4::Serials;
33
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
34
use C4::Log;
35
use Koha::DateUtils;
36
use C4::Serials::Frequency;
34
use C4::Serials::Frequency;
35
use C4::Log qw( cronlogaction );
36
use Koha::DateUtils qw( dt_from_string output_pref );
37
37
38
use Date::Calc qw/Date_to_Days check_date/;
38
use Date::Calc qw( check_date Date_to_Days );
39
use Getopt::Long;
39
use Getopt::Long qw( GetOptions );
40
use Pod::Usage;
40
use Pod::Usage qw( pod2usage );
41
41
42
=head1 NAME
42
=head1 NAME
43
43
(-)a/misc/cronjobs/share_usage_with_koha_community.pl (-4 / +4 lines)
Lines 2-15 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Pod::Usage;
5
use Pod::Usage qw( pod2usage );
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
7
8
use Koha::Script -cron;
8
use Koha::Script -cron;
9
use C4::Context;
9
use C4::Context;
10
use C4::UsageStats;
10
use C4::UsageStats;
11
use C4::Log;
11
use C4::Log qw( cronlogaction );
12
use POSIX qw(strftime);
12
use POSIX qw( strftime );
13
13
14
my ( $help, $verbose, $force, $quiet );
14
my ( $help, $verbose, $force, $quiet );
15
GetOptions(
15
GetOptions(
(-)a/misc/cronjobs/sitemap.pl (-3 / +2 lines)
Lines 21-31 package Main; Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use utf8;
23
use utf8;
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
use Getopt::Long;
25
use Getopt::Long qw( GetOptions );
26
26
27
use Koha::Script -cron;
27
use Koha::Script -cron;
28
use C4::Biblio;
29
use Koha::Sitemapper;
28
use Koha::Sitemapper;
30
29
31
30
(-)a/misc/cronjobs/staticfines.pl (-9 / +7 lines)
Lines 31-52 BEGIN { Link Here
31
31
32
    # find Koha's Perl modules
32
    # find Koha's Perl modules
33
    # test carefully before changing this
33
    # test carefully before changing this
34
    use FindBin;
34
    use FindBin ();
35
    eval { require "$FindBin::Bin/kohalib.pl" };
35
    eval { require "$FindBin::Bin/kohalib.pl" };
36
}
36
}
37
37
38
use Date::Calc qw/Date_to_Days/;
38
use Date::Calc qw( Date_to_Days );
39
39
40
use Koha::Script -cron;
40
use Koha::Script -cron;
41
use C4::Context;
41
use C4::Context;
42
use C4::Circulation;
42
use C4::Overdues qw( CalcFine checkoverdues GetFine Getoverdues );
43
use C4::Overdues;
44
use C4::Calendar qw();    # don't need any exports from Calendar
43
use C4::Calendar qw();    # don't need any exports from Calendar
45
use C4::Biblio;
44
use C4::Log qw( cronlogaction );
46
use C4::Log;
45
use Getopt::Long qw( GetOptions );
47
use Getopt::Long;
46
use List::MoreUtils qw( none );
48
use List::MoreUtils qw/none/;
47
use Koha::DateUtils qw( dt_from_string output_pref );
49
use Koha::DateUtils;
50
use Koha::Patrons;
48
use Koha::Patrons;
51
49
52
my $help    = 0;
50
my $help    = 0;
(-)a/misc/cronjobs/stockrotation.pl (-1 / +1 lines)
Lines 108-114 database updates have been performed."). Link Here
108
=cut
108
=cut
109
109
110
use Modern::Perl;
110
use Modern::Perl;
111
use Getopt::Long qw/HelpMessage :config gnu_getopt/;
111
use Getopt::Long qw( GetOptions HelpMessage );
112
112
113
use Koha::Script -cron;
113
use Koha::Script -cron;
114
use C4::Context;
114
use C4::Context;
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl (-3 / +3 lines)
Lines 24-35 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
29
}
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
32
use Pod::Usage qw( pod2usage );
33
33
34
use Koha::Script -cron;
34
use Koha::Script -cron;
35
use C4::Context;
35
use C4::Context;
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl (-5 / +4 lines)
Lines 24-43 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
29
}
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
32
use Pod::Usage qw( pod2usage );
33
33
34
use Koha::Script -cron;
34
use Koha::Script -cron;
35
use C4::Context;
35
use C4::Context;
36
use C4::Items;
37
use C4::Letters;
36
use C4::Letters;
38
use C4::Overdues;
37
use C4::Overdues;
39
use Koha::Calendar;
38
use Koha::Calendar;
40
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::Patrons;
40
use Koha::Patrons;
42
use Koha::Libraries;
41
use Koha::Libraries;
43
42
(-)a/misc/cronjobs/update_patrons_category.pl (-4 / +4 lines)
Lines 20-36 use Modern::Perl; Link Here
20
BEGIN {
20
BEGIN {
21
    # find Koha's Perl modules
21
    # find Koha's Perl modules
22
    # test carefully before changing this
22
    # test carefully before changing this
23
    use FindBin;
23
    use FindBin ();
24
    eval { require "$FindBin::Bin/../kohalib.pl" };
24
    eval { require "$FindBin::Bin/../kohalib.pl" };
25
}
25
}
26
26
27
use C4::Context;
27
use C4::Context;
28
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
29
use Pod::Usage;
29
use Pod::Usage qw( pod2usage );
30
use Koha::Logger;
30
use Koha::Logger;
31
use Koha::Patrons;
31
use Koha::Patrons;
32
use Koha::Patron::Categories;
32
use Koha::Patron::Categories;
33
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string );
34
use Koha::Script -cron;
34
use Koha::Script -cron;
35
35
36
=head1 NAME
36
=head1 NAME
(-)a/misc/cronjobs/update_totalissues.pl (-8 / +8 lines)
Lines 24-45 BEGIN { Link Here
24
24
25
    # find Koha's Perl modules
25
    # find Koha's Perl modules
26
    # test carefully before changing this
26
    # test carefully before changing this
27
    use FindBin;
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
29
}
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
32
use Pod::Usage qw( pod2usage );
33
33
34
use Koha::Script -cron;
34
use Koha::Script -cron;
35
use Koha::DateUtils qw/ dt_from_string /;
35
use Koha::DateUtils qw( dt_from_string );
36
use C4::Context;
36
use C4::Context;
37
use C4::Biblio;
37
use C4::Biblio qw( UpdateTotalIssues );
38
use C4::Log;
38
use C4::Log qw( cronlogaction );
39
use DateTime;
39
use DateTime;
40
use DateTime::Format::MySQL;
40
use DateTime::Format::MySQL;
41
use Time::HiRes qw/time/;
41
use Time::HiRes qw( time );
42
use POSIX qw/strftime ceil/;
42
use POSIX qw( ceil strftime );
43
43
44
sub usage {
44
sub usage {
45
    pod2usage( -verbose => 2 );
45
    pod2usage( -verbose => 2 );
(-)a/misc/cronjobs/writeoff_debts.pl (-3 / +3 lines)
Lines 3-13 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use feature 'say';
4
use feature 'say';
5
5
6
use Getopt::Long;
6
use Getopt::Long qw( GetOptions );
7
use Pod::Usage;
7
use Pod::Usage qw( pod2usage );
8
8
9
use Koha::Account::Lines;
9
use Koha::Account::Lines;
10
use Koha::DateUtils;
10
use Koha::DateUtils qw( dt_from_string );
11
11
12
use Koha::Script -cron;
12
use Koha::Script -cron;
13
13
(-)a/misc/devel/add_missing_filters.pl (-3 / +3 lines)
Lines 2-10 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use File::Slurp;
5
use File::Slurp qw( read_file write_file );
6
use Pod::Usage;
6
use Pod::Usage qw( pod2usage );
7
use Getopt::Long;
7
use Getopt::Long qw( GetOptions );
8
8
9
use t::lib::QA::TemplateFilters;
9
use t::lib::QA::TemplateFilters;
10
10
(-)a/misc/devel/coverage.pl (-3 / +3 lines)
Lines 48-56 prints this help text Link Here
48
use Modern::Perl;
48
use Modern::Perl;
49
49
50
use C4::Context;
50
use C4::Context;
51
use Cwd;
51
use Cwd qw( getcwd );
52
use Getopt::Long;
52
use Getopt::Long qw( GetOptions );
53
use Pod::Usage;
53
use Pod::Usage qw( pod2usage );
54
54
55
my $help;
55
my $help;
56
56
(-)a/misc/devel/create_superlibrarian.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Getopt::Long;
21
use Getopt::Long qw( GetOptions );
22
use Pod::Usage;
22
use Pod::Usage qw( pod2usage );
23
23
24
use Koha::Script;
24
use Koha::Script;
25
use Koha::Patrons;
25
use Koha::Patrons;
(-)a/misc/devel/get_prepared_letter.pl (-4 / +4 lines)
Lines 69-79 documentation of GetPreparedLetter for more informations. Link Here
69
69
70
use Modern::Perl;
70
use Modern::Perl;
71
71
72
use Getopt::Long;
72
use Getopt::Long qw( GetOptions );
73
use JSON;
73
use JSON qw( decode_json );
74
use Pod::Usage;
74
use Pod::Usage qw( pod2usage );
75
75
76
use C4::Letters;
76
use C4::Letters qw( GetPreparedLetter );
77
77
78
my $help;
78
my $help;
79
my ( $module, $letter_code, $branchcode, $message_transport_type, $lang,
79
my ( $module, $letter_code, $branchcode, $message_transport_type, $lang,
(-)a/misc/devel/install_plugins.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Getopt::Long;
21
use Getopt::Long qw( GetOptions );
22
use Pod::Usage;
22
use Pod::Usage qw( pod2usage );
23
23
24
use Koha::Script;
24
use Koha::Script;
25
25
(-)a/misc/devel/update_dbix_class_files.pl (-2 / +2 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
22
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
23
23
24
use Getopt::Long;
24
use Getopt::Long qw( GetOptions );
25
use Pod::Usage;
25
use Pod::Usage qw( pod2usage );
26
26
27
my %db_defaults = (
27
my %db_defaults = (
28
    driver => 'mysql',
28
    driver => 'mysql',
(-)a/misc/export_borrowers.pl (-1 / +1 lines)
Lines 21-27 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use Text::CSV;
23
use Text::CSV;
24
use Getopt::Long qw(:config no_ignore_case);
24
use Getopt::Long qw( GetOptions );
25
25
26
use Koha::Script;
26
use Koha::Script;
27
use C4::Context;
27
use C4::Context;
(-)a/misc/export_records.pl (-3 / +3 lines)
Lines 18-26 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use MARC::File::XML;
20
use MARC::File::XML;
21
use List::MoreUtils qw(uniq);
21
use List::MoreUtils qw( uniq );
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use Pod::Usage;
23
use Pod::Usage qw( pod2usage );
24
24
25
use Koha::Script;
25
use Koha::Script;
26
use C4::Auth;
26
use C4::Auth;
(-)a/misc/exportauth.pl (-2 / +1 lines)
Lines 8-20 use strict; Link Here
8
BEGIN {
8
BEGIN {
9
    # find Koha's Perl modules
9
    # find Koha's Perl modules
10
    # test carefully before changing this
10
    # test carefully before changing this
11
    use FindBin;
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/kohalib.pl" };
12
    eval { require "$FindBin::Bin/kohalib.pl" };
13
}
13
}
14
14
15
use Koha::Script;
15
use Koha::Script;
16
use C4::Context;
16
use C4::Context;
17
use C4::Biblio;
18
use C4::Auth;
17
use C4::Auth;
19
my $outfile = $ARGV[0];
18
my $outfile = $ARGV[0];
20
open(my $fh, '>', $outfile) or die $!;
19
open(my $fh, '>', $outfile) or die $!;
(-)a/misc/import_patrons.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use Pod::Usage;
23
use Pod::Usage qw( pod2usage );
24
24
25
use Koha::Script;
25
use Koha::Script;
26
use Koha::Patrons::Import;
26
use Koha::Patrons::Import;
(-)a/misc/link_bibs_to_authorities.pl (-8 / +12 lines)
Lines 7-25 BEGIN { Link Here
7
7
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
12
}
13
13
14
use Koha::Script;
14
use Koha::Script;
15
use C4::Context;
15
use C4::Context;
16
use C4::Biblio;
16
use C4::Biblio qw(
17
use Getopt::Long;
17
    GetFrameworkCode
18
use Pod::Usage;
18
    GetMarcBiblio
19
use Data::Dumper;
19
    LinkBibHeadingsToAuthorities
20
use Time::HiRes qw/time/;
20
    ModBiblio
21
use POSIX qw/strftime ceil/;
21
);
22
use Module::Load::Conditional qw(can_load);
22
use Getopt::Long qw( GetOptions );
23
use Pod::Usage qw( pod2usage );
24
use Time::HiRes qw( time );
25
use POSIX qw( ceil strftime );
26
use Module::Load::Conditional qw( can_load );
23
27
24
sub usage {
28
sub usage {
25
    pod2usage( -verbose => 2 );
29
    pod2usage( -verbose => 2 );
(-)a/misc/load_testing/benchmark_circulation.pl (-2 / +1 lines)
Lines 7-19 use warnings; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
12
}
13
13
14
use HTTPD::Bench::ApacheBench;
14
use HTTPD::Bench::ApacheBench;
15
use LWP::UserAgent;
15
use LWP::UserAgent;
16
use Data::Dumper;
17
use HTTP::Cookies;
16
use HTTP::Cookies;
18
use C4::Context;
17
use C4::Context;
19
18
(-)a/misc/load_testing/benchmark_staff.pl (-4 / +3 lines)
Lines 7-23 use warnings; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
12
}
13
13
14
use Getopt::Long;
14
use Getopt::Long qw( GetOptions );
15
use HTTPD::Bench::ApacheBench;
15
use HTTPD::Bench::ApacheBench;
16
use LWP::UserAgent;
16
use LWP::UserAgent;
17
use Data::Dumper;
18
use HTTP::Cookies;
17
use HTTP::Cookies;
19
use C4::Context;
18
use C4::Context;
20
use URI::Escape;
19
use URI::Escape qw( uri_escape_utf8 );
21
use Koha::Patrons;
20
use Koha::Patrons;
22
21
23
my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
22
my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
(-)a/misc/load_testing/benchmark_webservices.pl (-2 / +1 lines)
Lines 16-23 use warnings; Link Here
16
#
16
#
17
# Requires LWP::UserAgent, File::Slurp.
17
# Requires LWP::UserAgent, File::Slurp.
18
use LWP::UserAgent;
18
use LWP::UserAgent;
19
use File::Slurp qw(slurp);
19
use File::Slurp qw( slurp );
20
use Carp;
21
my $ua = LWP::UserAgent->new();
20
my $ua = LWP::UserAgent->new();
22
$ua->cookie_jar({ file =>"cookies.txt" });
21
$ua->cookie_jar({ file =>"cookies.txt" });
23
my $baseurl = shift;
22
my $baseurl = shift;
(-)a/misc/load_yaml.pl (-1 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Koha::Script;
22
use Koha::Script;
23
use Getopt::Long qw(:config no_ignore_case);
23
use Getopt::Long qw( GetOptions );
24
use C4::Context;
24
use C4::Context;
25
use C4::Installer;
25
use C4::Installer;
26
26
(-)a/misc/maintenance/UNIMARC_fix_collectiontitle.pl (-2 / +1 lines)
Lines 8-19 use strict; Link Here
8
use warnings;
8
use warnings;
9
9
10
BEGIN {
10
BEGIN {
11
    use FindBin;
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
13
}
13
}
14
14
15
use Koha::Script;
15
use Koha::Script;
16
use C4::Biblio;
17
16
18
sub process {
17
sub process {
19
18
(-)a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl (-3 / +3 lines)
Lines 8-20 use strict; Link Here
8
use warnings;
8
use warnings;
9
9
10
BEGIN {
10
BEGIN {
11
    use FindBin;
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
13
}
13
}
14
14
15
use Koha::Script;
15
use Koha::Script;
16
use C4::Biblio;
16
use C4::Biblio qw( GetMarcBiblio ModBiblio );
17
use Getopt::Long;
17
use Getopt::Long qw( GetOptions );
18
18
19
sub _read_marc_code {
19
sub _read_marc_code {
20
    my $input = shift;
20
    my $input = shift;
(-)a/misc/maintenance/auth_show_hidden_data.pl (-2 / +2 lines)
Lines 22-29 Link Here
22
# which hidden fields in the framework still contain data.
22
# which hidden fields in the framework still contain data.
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
use Getopt::Long;
25
use Getopt::Long qw( GetOptions );
26
use Pod::Usage;
26
use Pod::Usage qw( pod2usage );
27
27
28
use Koha::Script;
28
use Koha::Script;
29
use Koha::Authorities;
29
use Koha::Authorities;
(-)a/misc/maintenance/borrowers-force-messaging-defaults.pl (-3 / +3 lines)
Lines 22-36 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
27
}
28
28
29
use Koha::Script;
29
use Koha::Script;
30
use C4::Context;
30
use C4::Context;
31
use C4::Members::Messaging;
31
use C4::Members::Messaging;
32
use Getopt::Long;
32
use Getopt::Long qw( GetOptions );
33
use Pod::Usage;
33
use Pod::Usage qw( pod2usage );
34
34
35
35
36
sub usage {
36
sub usage {
(-)a/misc/maintenance/check_syspref_cache.pl (-2 / +2 lines)
Lines 16-23 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Getopt::Long;
19
use Getopt::Long qw( GetOptions );
20
use Pod::Usage;
20
use Pod::Usage qw( pod2usage );
21
use Encode qw( encode_utf8 );
21
use Encode qw( encode_utf8 );
22
22
23
use Koha::Script;
23
use Koha::Script;
(-)a/misc/maintenance/cmp_sysprefs.pl (-2 / +2 lines)
Lines 27-34 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use open OUT => ':encoding(UTF-8)', ':std';
28
use open OUT => ':encoding(UTF-8)', ':std';
29
29
30
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
31
use Pod::Usage;
31
use Pod::Usage qw( pod2usage );
32
32
33
use Koha::Script;
33
use Koha::Script;
34
use C4::Context;
34
use C4::Context;
(-)a/misc/maintenance/fix_accountlines_date.pl (-4 / +3 lines)
Lines 22-36 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
27
}
28
28
29
use Koha::Script;
29
use Koha::Script;
30
use C4::Context;
30
use C4::Context;
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
32
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::DateUtils;
34
33
35
=head1 NAME
34
=head1 NAME
36
35
(-)a/misc/maintenance/fix_accountlines_rmdupfines_bug8253.pl (-3 / +2 lines)
Lines 23-37 use warnings; Link Here
23
BEGIN {
23
BEGIN {
24
    # find Koha's Perl modules
24
    # find Koha's Perl modules
25
    # test carefully before changing this
25
    # test carefully before changing this
26
    use FindBin;
26
    use FindBin ();
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
}
28
}
29
29
30
use Koha::Script;
30
use Koha::Script;
31
use C4::Context;
31
use C4::Context;
32
use C4::Installer;
33
32
34
use Getopt::Long;
33
use Getopt::Long qw( GetOptions );
35
use Data::Dumper;
34
use Data::Dumper;
36
35
37
sub print_usage {
36
sub print_usage {
(-)a/misc/maintenance/fix_mysql_constraints.pl (-4 / +4 lines)
Lines 21-34 use Modern::Perl; Link Here
21
BEGIN {
21
BEGIN {
22
    # find Koha's Perl modules
22
    # find Koha's Perl modules
23
    # test carefully before changing this
23
    # test carefully before changing this
24
    use FindBin;
24
    use FindBin ();
25
    my $lib = "$FindBin::Bin/../kohalib.pl";
25
    my $lib = "$FindBin::Bin/../kohalib.pl";
26
    eval { require $lib };
26
    eval { require $lib };
27
}
27
}
28
28
29
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
30
use Pod::Usage;
30
use Pod::Usage qw( pod2usage );
31
use Try::Tiny;
31
use Try::Tiny qw( catch try );
32
use Koha::Script;
32
use Koha::Script;
33
use C4::Context;
33
use C4::Context;
34
34
(-)a/misc/maintenance/fix_tags_weight.pl (-2 / +2 lines)
Lines 28-35 use Koha::Tags; Link Here
28
use Koha::Tags::Approvals;
28
use Koha::Tags::Approvals;
29
use Koha::Tags::Indexes;
29
use Koha::Tags::Indexes;
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Pod::Usage;
32
use Pod::Usage qw( pod2usage );
33
33
34
=head1 NAME
34
=head1 NAME
35
35
(-)a/misc/maintenance/generate_MARC21Languages.pl (-4 / +4 lines)
Lines 19-28 Link Here
19
#
19
#
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use XML::Simple;
22
use XML::Simple qw( XMLin );
23
use Pod::Usage;
23
use Pod::Usage qw( pod2usage );
24
use Getopt::Long;
24
use Getopt::Long qw( GetOptions );
25
use Carp;
25
use Carp qw( croak );
26
26
27
use open ':std', ':encoding(UTF-8)';
27
use open ':std', ':encoding(UTF-8)';
28
28
(-)a/misc/maintenance/process_record_through_filter.pl (-2 / +1 lines)
Lines 9-16 use warnings; Link Here
9
9
10
use Koha::Script;
10
use Koha::Script;
11
use Koha::RecordProcessor;
11
use Koha::RecordProcessor;
12
use Data::Dumper;
12
use C4::Biblio qw( GetMarcBiblio );
13
use C4::Biblio;
14
13
15
my $record = GetMarcBiblio({ biblionumber => $ARGV[0] });
14
my $record = GetMarcBiblio({ biblionumber => $ARGV[0] });
16
15
(-)a/misc/maintenance/remove_items_from_biblioitems.pl (-2 / +2 lines)
Lines 24-31 $|=1; Link Here
24
24
25
use Koha::Script;
25
use Koha::Script;
26
use C4::Context;
26
use C4::Context;
27
use C4::Biblio;
27
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblio );
28
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
29
29
30
my ($wherestring, $run, $silent, $want_help);
30
my ($wherestring, $run, $silent, $want_help);
31
my $result = GetOptions(
31
my $result = GetOptions(
(-)a/misc/maintenance/sanitize_records.pl (-4 / +3 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Koha::Script;
22
use Koha::Script;
23
use C4::Charset qw( SanitizeRecord );
23
use C4::Charset;
24
use C4::Context;
24
use C4::Context;
25
use DBI;
26
use C4::Biblio;
25
use C4::Biblio;
27
use Getopt::Long;
26
use Getopt::Long qw( GetOptions );
28
use Pod::Usage;
27
use Pod::Usage qw( pod2usage );
29
28
30
my ( $help, $verbose, $confirm, $biblionumbers, $reindex, $filename,
29
my ( $help, $verbose, $confirm, $biblionumbers, $reindex, $filename,
31
    $auto_search, $fix_ampersand );
30
    $auto_search, $fix_ampersand );
(-)a/misc/maintenance/search_for_data_inconsistencies.pl (-1 / +1 lines)
Lines 25-31 use Koha::BiblioFrameworks; Link Here
25
use Koha::Biblioitems;
25
use Koha::Biblioitems;
26
use Koha::Items;
26
use Koha::Items;
27
use Koha::ItemTypes;
27
use Koha::ItemTypes;
28
use C4::Biblio;
28
use C4::Biblio qw( GetMarcFromKohaField );
29
29
30
{
30
{
31
    my $items = Koha::Items->search({ -or => { homebranch => undef, holdingbranch => undef }});
31
    my $items = Koha::Items->search({ -or => { homebranch => undef, holdingbranch => undef }});
(-)a/misc/maintenance/touch_all_biblios.pl (-4 / +4 lines)
Lines 22-38 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
27
}
28
28
29
# possible modules to use
29
# possible modules to use
30
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
31
31
32
use Koha::Script;
32
use Koha::Script;
33
use C4::Context;
33
use C4::Context;
34
use C4::Biblio;
34
use C4::Biblio qw( GetMarcBiblio ModBiblio );
35
use Pod::Usage;
35
use Pod::Usage qw( pod2usage );
36
36
37
37
38
sub usage {
38
sub usage {
(-)a/misc/maintenance/touch_all_items.pl (-4 / +3 lines)
Lines 22-39 use warnings; Link Here
22
BEGIN {
22
BEGIN {
23
    # find Koha's Perl modules
23
    # find Koha's Perl modules
24
    # test carefully before changing this
24
    # test carefully before changing this
25
    use FindBin;
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
27
}
28
28
29
# possible modules to use
29
# possible modules to use
30
use Getopt::Long;
30
use Getopt::Long qw( GetOptions );
31
31
32
use Koha::Script;
32
use Koha::Script;
33
use C4::Context;
33
use C4::Context;
34
use C4::Items;
35
use Koha::Items;
34
use Koha::Items;
36
use Pod::Usage;
35
use Pod::Usage qw( pod2usage );
37
36
38
37
39
sub usage {
38
sub usage {
(-)a/misc/maintenance/update_authorities.pl (-3 / +3 lines)
Lines 19-27 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use List::MoreUtils qw/uniq/;
23
use List::MoreUtils qw( uniq );
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
25
26
use Koha::Script;
26
use Koha::Script;
27
use C4::AuthoritiesMarc qw/AddAuthority DelAuthority GetAuthority merge/;
27
use C4::AuthoritiesMarc qw/AddAuthority DelAuthority GetAuthority merge/;
(-)a/misc/migration_tools/22_to_30/convert_to_utf8.pl (-1 / +1 lines)
Lines 9-15 BEGIN { Link Here
9
9
10
    # find Koha's Perl modules
10
    # find Koha's Perl modules
11
    # test carefully before changing this
11
    # test carefully before changing this
12
    use FindBin;
12
    use FindBin ();
13
    eval { require "$FindBin::Bin/../../kohalib.pl" };
13
    eval { require "$FindBin::Bin/../../kohalib.pl" };
14
}
14
}
15
15
(-)a/misc/migration_tools/22_to_30/export_Authorities.pl (-3 / +2 lines)
Lines 3-17 use Modern::Perl; Link Here
3
BEGIN {
3
BEGIN {
4
    # find Koha's Perl modules
4
    # find Koha's Perl modules
5
    # test carefully before changing this
5
    # test carefully before changing this
6
    use FindBin;
6
    use FindBin ();
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
8
}
8
}
9
use C4::Context;
9
use C4::Context;
10
#use MARC::File::XML(BinaryEncoding=>"utf8");
10
#use MARC::File::XML(BinaryEncoding=>"utf8");
11
#use MARC::File::USMARC;
11
#use MARC::File::USMARC;
12
use MARC::Record;
13
use C4::AuthoritiesMarc;
12
use C4::AuthoritiesMarc;
14
use POSIX;
13
use POSIX qw( close localtime sprintf time );
15
#MARC::File::XML::default_record_format("UNIMARCAUTH");
14
#MARC::File::XML::default_record_format("UNIMARCAUTH");
16
my $dbh = C4::Context->dbh;
15
my $dbh = C4::Context->dbh;
17
my $rq= $dbh->prepare(qq|
16
my $rq= $dbh->prepare(qq|
(-)a/misc/migration_tools/22_to_30/export_Authorities_xml.pl (-3 / +2 lines)
Lines 3-16 use Modern::Perl; Link Here
3
BEGIN {
3
BEGIN {
4
    # find Koha's Perl modules
4
    # find Koha's Perl modules
5
    # test carefully before changing this
5
    # test carefully before changing this
6
    use FindBin;
6
    use FindBin ();
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
8
}
8
}
9
use C4::Context;
9
use C4::Context;
10
use MARC::File::XML(BinaryEncoding=>"utf8");
10
use MARC::File::XML(BinaryEncoding=>"utf8");
11
use MARC::Record;
12
use C4::AuthoritiesMarc;
11
use C4::AuthoritiesMarc;
13
use POSIX;
12
use POSIX qw( close localtime open sprintf time );
14
MARC::File::XML::default_record_format("UNIMARCAUTH");
13
MARC::File::XML::default_record_format("UNIMARCAUTH");
15
my $dbh = C4::Context->dbh;
14
my $dbh = C4::Context->dbh;
16
my $rq= $dbh->prepare(qq|
15
my $rq= $dbh->prepare(qq|
(-)a/misc/migration_tools/22_to_30/missing090field.pl (-3 / +2 lines)
Lines 7-21 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
12
}
13
13
14
# Koha modules used
14
# Koha modules used
15
15
16
use C4::Context;
16
use C4::Context;
17
use C4::Biblio;
17
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblioMarc );
18
use MARC::Record;
19
use MARC::File::USMARC;
18
use MARC::File::USMARC;
20
19
21
$|=1;
20
$|=1;
(-)a/misc/migration_tools/22_to_30/move_marc_to_authheader.pl (-1 / +1 lines)
Lines 7-13 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
12
}
13
use C4::Context;
13
use C4::Context;
(-)a/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl (-2 / +1 lines)
Lines 5-15 use Modern::Perl; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/../../kohalib.pl" };
9
    eval { require "$FindBin::Bin/../../kohalib.pl" };
10
}
10
}
11
use C4::Context;
11
use C4::Context;
12
use C4::Biblio;
13
use MARC::Record;
12
use MARC::Record;
14
use MARC::File::XML ( BinaryEncoding => 'utf8' );
13
use MARC::File::XML ( BinaryEncoding => 'utf8' );
15
14
(-)a/misc/migration_tools/22_to_30/rebuild_leader.pl (-3 / +2 lines)
Lines 7-21 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
12
}
13
13
14
# Koha modules used
14
# Koha modules used
15
15
16
use C4::Context;
16
use C4::Context;
17
use C4::Biblio;
17
use C4::Biblio qw( ModBiblioMarc );
18
use MARC::Record;
19
use MARC::File::USMARC;
18
use MARC::File::USMARC;
20
19
21
20
(-)a/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl (-3 / +2 lines)
Lines 7-21 use strict; Link Here
7
BEGIN {
7
BEGIN {
8
    # find Koha's Perl modules
8
    # find Koha's Perl modules
9
    # test carefully before changing this
9
    # test carefully before changing this
10
    use FindBin;
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
12
}
13
13
14
# Koha modules used
14
# Koha modules used
15
15
16
use C4::Context;
16
use C4::Context;
17
use C4::Biblio;
17
use C4::Biblio qw( GetMarcBiblio ModBiblioMarc );
18
use MARC::Record;
19
use MARC::File::USMARC;
18
use MARC::File::USMARC;
20
19
21
20
(-)a/misc/migration_tools/buildCOUNTRY.pl (-3 / +2 lines)
Lines 8-18 use strict; Link Here
8
# Koha modules used
8
# Koha modules used
9
use Koha::Script;
9
use Koha::Script;
10
use C4::Context;
10
use C4::Context;
11
use C4::Biblio;
12
use C4::AuthoritiesMarc;
11
use C4::AuthoritiesMarc;
13
use Time::HiRes qw(gettimeofday);
12
use Time::HiRes qw( gettimeofday );
14
13
15
use Getopt::Long;
14
use Getopt::Long qw( GetOptions );
16
my ( $fields, $number,$language) = ('',0);
15
my ( $fields, $number,$language) = ('',0);
17
my ($version, $verbose, $test_parameter, $delete);
16
my ($version, $verbose, $test_parameter, $delete);
18
GetOptions(
17
GetOptions(
(-)a/misc/migration_tools/buildEDITORS.pl (-3 / +3 lines)
Lines 10-20 use MARC::Record; Link Here
10
use MARC::Batch;
10
use MARC::Batch;
11
use Koha::Script;
11
use Koha::Script;
12
use C4::Context;
12
use C4::Context;
13
use C4::Biblio;
13
use C4::Biblio qw( GetMarcBiblio );
14
use C4::AuthoritiesMarc;
14
use C4::AuthoritiesMarc;
15
use Time::HiRes qw(gettimeofday);
15
use Time::HiRes qw( gettimeofday );
16
16
17
use Getopt::Long;
17
use Getopt::Long qw( GetOptions );
18
my ( $input_marc_file, $number) = ('',0);
18
my ( $input_marc_file, $number) = ('',0);
19
my ($version, $verbose, $test_parameter, $confirm,$delete);
19
my ($version, $verbose, $test_parameter, $confirm,$delete);
20
GetOptions(
20
GetOptions(
(-)a/misc/migration_tools/buildLANG.pl (-3 / +2 lines)
Lines 8-18 use strict; Link Here
8
# Koha modules used
8
# Koha modules used
9
use Koha::Script;
9
use Koha::Script;
10
use C4::Context;
10
use C4::Context;
11
use C4::Biblio;
12
use C4::AuthoritiesMarc;
11
use C4::AuthoritiesMarc;
13
use Time::HiRes qw(gettimeofday);
12
use Time::HiRes qw( gettimeofday );
14
13
15
use Getopt::Long;
14
use Getopt::Long qw( GetOptions );
16
my ( $fields, $number,$language) = ('',0);
15
my ( $fields, $number,$language) = ('',0);
17
my ($version, $verbose, $test_parameter, $delete);
16
my ($version, $verbose, $test_parameter, $delete);
18
GetOptions(
17
GetOptions(
(-)a/misc/migration_tools/build_oai_sets.pl (-4 / +12 lines)
Lines 39-52 oai_sets_mappings, and then fill table oai_sets_biblios with builded infos. Link Here
39
use Modern::Perl;
39
use Modern::Perl;
40
use MARC::Record;
40
use MARC::Record;
41
use MARC::File::XML;
41
use MARC::File::XML;
42
use List::MoreUtils qw/uniq/;
42
use List::MoreUtils qw( uniq );
43
use Getopt::Std;
43
use Getopt::Std qw( getopts );
44
44
45
use Koha::Script;
45
use Koha::Script;
46
use C4::Context;
46
use C4::Context;
47
use C4::Charset qw/StripNonXmlChars/;
47
use C4::Charset qw( StripNonXmlChars );
48
use C4::Biblio;
48
use C4::Biblio;
49
use C4::OAI::Sets;
49
use C4::OAI::Sets qw(
50
    AddOAISetsBiblios
51
    CalcOAISetsBiblio
52
    GetOAISet
53
    GetOAISetBySpec
54
    GetOAISets
55
    GetOAISetsMappings
56
    ModOAISetsBiblios
57
);
50
58
51
my %opts;
59
my %opts;
52
$Getopt::Std::STANDARD_HELP_VERSION = 1;
60
$Getopt::Std::STANDARD_HELP_VERSION = 1;
(-)a/misc/migration_tools/bulkmarcimport.pl (-11 / +16 lines)
Lines 6-37 use Modern::Perl; Link Here
6
BEGIN {
6
BEGIN {
7
    # find Koha's Perl modules
7
    # find Koha's Perl modules
8
    # test carefully before changing this
8
    # test carefully before changing this
9
    use FindBin;
9
    use FindBin ();
10
    eval { require "$FindBin::Bin/../kohalib.pl" };
10
    eval { require "$FindBin::Bin/../kohalib.pl" };
11
}
11
}
12
12
13
# Koha modules used
13
# Koha modules used
14
use MARC::File::USMARC;
14
use MARC::File::USMARC;
15
use MARC::File::XML;
15
use MARC::File::XML;
16
use MARC::Record;
17
use MARC::Batch;
16
use MARC::Batch;
18
use MARC::Charset;
19
use Encode;
17
use Encode;
20
18
21
use Koha::Script;
19
use Koha::Script;
22
use C4::Context;
20
use C4::Context;
23
use C4::Biblio;
21
use C4::Biblio qw(
22
    AddBiblio
23
    GetMarcFromKohaField
24
    ModBiblio
25
    ModBiblioMarc
26
);
24
use C4::Koha;
27
use C4::Koha;
25
use C4::Charset;
28
use C4::Charset qw( MarcToUTF8Record SetUTF8Flag );
26
use C4::Items;
29
use C4::Items qw( AddItemBatchFromMarc );
27
use C4::MarcModificationTemplates;
30
use C4::MarcModificationTemplates qw(
31
    GetModificationTemplates
32
    ModifyRecordWithTemplate
33
);
28
34
29
use YAML::XS;
35
use YAML::XS;
30
use Unicode::Normalize;
36
use Time::HiRes qw( gettimeofday );
31
use Time::HiRes qw(gettimeofday);
37
use Getopt::Long qw( GetOptions );
32
use Getopt::Long;
33
use IO::File;
38
use IO::File;
34
use Pod::Usage;
39
use Pod::Usage qw( pod2usage );
35
40
36
use Koha::Logger;
41
use Koha::Logger;
37
use Koha::Biblios;
42
use Koha::Biblios;
(-)a/misc/migration_tools/checkNonIndexedBiblios.pl (-3 / +2 lines)
Lines 27-41 BEGIN { Link Here
27
27
28
    # find Koha's Perl modules
28
    # find Koha's Perl modules
29
    # test carefully before changing this
29
    # test carefully before changing this
30
    use FindBin;
30
    use FindBin ();
31
    eval { require "$FindBin::Bin/kohalib.pl" };
31
    eval { require "$FindBin::Bin/kohalib.pl" };
32
}
32
}
33
33
34
# Koha modules used
34
# Koha modules used
35
use MARC::Record;
36
use Koha::Script;
35
use Koha::Script;
37
use C4::Context;
36
use C4::Context;
38
use Getopt::Long;
37
use Getopt::Long qw( GetOptions );
39
38
40
use Koha::SearchEngine::Search;
39
use Koha::SearchEngine::Search;
41
40
(-)a/misc/migration_tools/create_analytical_rel.pl (-4 / +3 lines)
Lines 5-20 use strict; Link Here
5
BEGIN {
5
BEGIN {
6
    # find Koha's Perl modules
6
    # find Koha's Perl modules
7
    # test carefully before changing this
7
    # test carefully before changing this
8
    use FindBin;
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
10
}
10
}
11
11
12
use Koha::Script;
12
use Koha::Script;
13
use C4::Context;
13
use C4::Context;
14
use C4::Biblio;
14
use C4::Biblio qw( GetMarcBiblio ModBiblio );
15
use C4::Items;
16
use Koha::Items;
15
use Koha::Items;
17
use Getopt::Long;
16
use Getopt::Long qw( GetOptions );
18
17
19
$| = 1;
18
$| = 1;
20
19
(-)a/misc/migration_tools/ifla/update.pl (-4 / +4 lines)
Lines 19-28 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Date::Format;
22
use Date::Format qw( time2str );
23
use File::Basename;
23
use File::Basename qw( basename );
24
use FindBin qw($Bin);
24
use FindBin qw( $Bin );
25
use Getopt::Long;
25
use Getopt::Long qw( GetOptions );
26
use Locale::PO;
26
use Locale::PO;
27
use YAML::XS;
27
use YAML::XS;
28
use utf8;
28
use utf8;
(-)a/misc/migration_tools/import_lexile.pl (-3 / +3 lines)
Lines 28-39 use utf8; Link Here
28
28
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use Getopt::Long;
31
use Getopt::Long qw( GetOptions );
32
use Text::CSV;
32
use Text::CSV;
33
33
34
use Koha::Script;
34
use Koha::Script;
35
use C4::Context;
35
use C4::Context;
36
use C4::Biblio;
36
use C4::Biblio qw( GetMarcBiblio ModBiblio );
37
use C4::Koha qw( GetVariationsOfISBN );
37
use C4::Koha qw( GetVariationsOfISBN );
38
38
39
use Koha::Biblios;
39
use Koha::Biblios;
Lines 45-51 BEGIN { Link Here
45
45
46
    # find Koha's Perl modules
46
    # find Koha's Perl modules
47
    # test carefully before changing this
47
    # test carefully before changing this
48
    use FindBin;
48
    use FindBin ();
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
50
}
50
}
51
51
(-)a/misc/migration_tools/koha-svc.pl (-1 / +1 lines)
Lines 21-27 use warnings; Link Here
21
use strict;
21
use strict;
22
22
23
use LWP::UserAgent;
23
use LWP::UserAgent;
24
use File::Slurp;
24
use File::Slurp qw( read_file write_file );
25
25
26
if ( $#ARGV >= 3 && ! caller ) { # process command-line params only if not called as module!
26
if ( $#ARGV >= 3 && ! caller ) { # process command-line params only if not called as module!
27
    my ( $url, $user, $password, $biblionumber, $file ) = @ARGV;
27
    my ( $url, $user, $password, $biblionumber, $file ) = @ARGV;
(-)a/misc/migration_tools/rebuild_zebra.pl (-6 / +6 lines)
Lines 19-31 use Modern::Perl; Link Here
19
19
20
use Koha::Script;
20
use Koha::Script;
21
use C4::Context;
21
use C4::Context;
22
use Getopt::Long;
22
use Getopt::Long qw( GetOptions );
23
use Fcntl qw(:flock);
23
use Fcntl qw( LOCK_EX LOCK_NB LOCK_UN );
24
use File::Temp qw/ tempdir /;
24
use File::Temp qw( tempdir );
25
use File::Path;
25
use File::Path qw( mkpath rmtree );
26
use C4::Biblio;
26
use C4::Biblio qw( GetXmlBiblio );
27
use C4::AuthoritiesMarc;
27
use C4::AuthoritiesMarc;
28
use C4::Items;
28
use C4::Items qw( GetItemsInfo Item2Marc );
29
use Koha::RecordProcessor;
29
use Koha::RecordProcessor;
30
use Koha::Caches;
30
use Koha::Caches;
31
use XML::LibXML;
31
use XML::LibXML;
(-)a/misc/migration_tools/remove_unused_authorities.pl (-1 / +1 lines)
Lines 25-31 use Modern::Perl; Link Here
25
use Koha::Script;
25
use Koha::Script;
26
use C4::Context;
26
use C4::Context;
27
use C4::AuthoritiesMarc;
27
use C4::AuthoritiesMarc;
28
use Getopt::Long;
28
use Getopt::Long qw( GetOptions );
29
29
30
use Koha::SearchEngine::Search;
30
use Koha::SearchEngine::Search;
31
31
(-)a/misc/migration_tools/switch_marc21_series_info.pl (-3 / +3 lines)
Lines 25-38 use warnings; Link Here
25
BEGIN {
25
BEGIN {
26
    # find Koha's Perl modules
26
    # find Koha's Perl modules
27
    # test carefully before changing this
27
    # test carefully before changing this
28
    use FindBin;
28
    use FindBin ();
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
30
}
31
31
32
use Koha::Script;
32
use Koha::Script;
33
use C4::Biblio;
33
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblioMarc );
34
use C4::Context;
34
use C4::Context;
35
use Getopt::Long;
35
use Getopt::Long qw( GetOptions );
36
36
37
my $commit;
37
my $commit;
38
my $add_links;
38
my $add_links;
(-)a/misc/migration_tools/upgradeitems.pl (-2 / +2 lines)
Lines 5-12 use strict; Link Here
5
5
6
use Koha::Script;
6
use Koha::Script;
7
use C4::Context;
7
use C4::Context;
8
use C4::Items;
8
use C4::Items qw( ModItemFromMarc );
9
use C4::Biblio;
9
use C4::Biblio qw( GetMarcBiblio );
10
10
11
my $dbh=C4::Context->dbh;
11
my $dbh=C4::Context->dbh;
12
12
(-)a/misc/mod_zebraqueue.pl (-3 / +3 lines)
Lines 20-30 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use Getopt::Long;
23
use Getopt::Long qw( GetOptions );
24
use Pod::Usage;
24
use Pod::Usage qw( pod2usage );
25
25
26
use Koha::Script;
26
use Koha::Script;
27
use C4::Biblio;
27
use C4::Biblio qw( ModZebra );
28
28
29
my @biblios;
29
my @biblios;
30
my @authorities;
30
my @authorities;
(-)a/misc/recreateIssueStatistics.pl (-3 / +1 lines)
Lines 25-33 use warnings; Link Here
25
25
26
use Koha::Script;
26
use Koha::Script;
27
use C4::Context;
27
use C4::Context;
28
use C4::Items;
28
use Getopt::Long qw( GetOptions );
29
use Data::Dumper;
30
use Getopt::Long;
31
use Koha::Items;
29
use Koha::Items;
32
30
33
my $dbh = C4::Context->dbh;
31
my $dbh = C4::Context->dbh;
(-)a/misc/sax_parser_test.pl (-1 / +1 lines)
Lines 4-10 use strict; Link Here
4
use warnings;
4
use warnings;
5
5
6
use XML::SAX;
6
use XML::SAX;
7
use Encode;
7
use Encode qw( encode_utf8 );
8
8
9
my $parser = XML::SAX::ParserFactory->parser(
9
my $parser = XML::SAX::ParserFactory->parser(
10
Handler => MySAXHandler->new
10
Handler => MySAXHandler->new
(-)a/misc/search_tools/export_elasticsearch_mappings.pl (-2 / +2 lines)
Lines 61-68 use Koha::SearchMarcMaps; Link Here
61
use Koha::SearchEngine::Elasticsearch;
61
use Koha::SearchEngine::Elasticsearch;
62
62
63
use YAML::XS;
63
use YAML::XS;
64
use Getopt::Long;
64
use Getopt::Long qw( GetOptions );
65
use Pod::Usage;
65
use Pod::Usage qw( pod2usage );
66
66
67
my $type = '';
67
my $type = '';
68
my $man;
68
my $man;
(-)a/misc/search_tools/rebuild_elasticsearch.pl (-4 / +3 lines)
Lines 112-118 Full documentation. Link Here
112
=cut
112
=cut
113
113
114
use autodie;
114
use autodie;
115
use Getopt::Long;
115
use Getopt::Long qw( GetOptions );
116
use Koha::Script;
116
use Koha::Script;
117
use C4::Context;
117
use C4::Context;
118
use Koha::MetadataRecord::Authority;
118
use Koha::MetadataRecord::Authority;
Lines 120-129 use Koha::BiblioUtils; Link Here
120
use Koha::SearchEngine::Elasticsearch;
120
use Koha::SearchEngine::Elasticsearch;
121
use Koha::SearchEngine::Elasticsearch::Indexer;
121
use Koha::SearchEngine::Elasticsearch::Indexer;
122
use MARC::Field;
122
use MARC::Field;
123
use MARC::Record;
124
use Modern::Perl;
123
use Modern::Perl;
125
use Pod::Usage;
124
use Pod::Usage qw( pod2usage );
126
use Try::Tiny;
125
use Try::Tiny qw( catch try );
127
126
128
my $verbose = 0;
127
my $verbose = 0;
129
my $commit = 5000;
128
my $commit = 5000;
(-)a/misc/stage_file.pl (-4 / +4 lines)
Lines 23-38 use Modern::Perl; Link Here
23
BEGIN {
23
BEGIN {
24
    # find Koha's Perl modules
24
    # find Koha's Perl modules
25
    # test carefully before changing this
25
    # test carefully before changing this
26
    use FindBin;
26
    use FindBin ();
27
    eval { require "$FindBin::Bin/kohalib.pl" };
27
    eval { require "$FindBin::Bin/kohalib.pl" };
28
}
28
}
29
29
30
use Koha::Script;
30
use Koha::Script;
31
use C4::Context;
31
use C4::Context;
32
use C4::ImportBatch;
32
use C4::ImportBatch qw( RecordsFromISO2709File RecordsFromMARCXMLFile BatchStageMarcRecords SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates );
33
use C4::Matcher;
33
use C4::Matcher;
34
use C4::MarcModificationTemplates;
34
use C4::MarcModificationTemplates qw( GetModificationTemplates );
35
use Getopt::Long;
35
use Getopt::Long qw( GetOptions );
36
36
37
$| = 1;
37
$| = 1;
38
38
(-)a/misc/translator/LangInstaller.pm (-2 / +1 lines)
Lines 19-32 package LangInstaller; Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Context;
22
use C4::Context qw( config preference new interface );
23
# WARNING: Any other tested YAML library fails to work properly in this
23
# WARNING: Any other tested YAML library fails to work properly in this
24
# script content
24
# script content
25
# FIXME Really?
25
# FIXME Really?
26
use YAML::XS;
26
use YAML::XS;
27
use Locale::PO;
27
use Locale::PO;
28
use FindBin qw( $Bin );
28
use FindBin qw( $Bin );
29
use File::Basename;
30
use File::Path qw( make_path );
29
use File::Path qw( make_path );
31
use File::Copy;
30
use File::Copy;
32
31
(-)a/misc/translator/TmplTokenizer.pm (-5 lines)
Lines 7-14 use C4::TTParser; Link Here
7
use VerboseWarnings qw( pedantic_p error_normal warn_normal warn_pedantic );
7
use VerboseWarnings qw( pedantic_p error_normal warn_normal warn_pedantic );
8
require Exporter;
8
require Exporter;
9
9
10
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
11
12
###############################################################################
10
###############################################################################
13
11
14
=head1 NAME
12
=head1 NAME
Lines 24-32 A wrapper for the functionality found in TTParser to allow an easier transition Link Here
24
###############################################################################
22
###############################################################################
25
23
26
24
27
@ISA = qw(Exporter);
28
@EXPORT_OK = qw();
29
30
use vars qw( $pedantic_attribute_error_in_nonpedantic_mode_p );
25
use vars qw( $pedantic_attribute_error_in_nonpedantic_mode_p );
31
use vars qw( $pedantic_tmpl_var_use_in_nonpedantic_mode_p );
26
use vars qw( $pedantic_tmpl_var_use_in_nonpedantic_mode_p );
32
use vars qw( $pedantic_error_markup_in_pcdata_p );
27
use vars qw( $pedantic_error_markup_in_pcdata_p );
(-)a/misc/translator/VerboseWarnings.pm (-17 / +13 lines)
Lines 1-9 Link Here
1
package VerboseWarnings;
1
package VerboseWarnings;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
require Exporter;
5
6
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
7
4
8
###############################################################################
5
###############################################################################
9
6
Lines 20-39 verbose warnings. Link Here
20
17
21
###############################################################################
18
###############################################################################
22
19
23
20
our (@ISA, @EXPORT_OK);
24
@ISA = qw(Exporter);
21
BEGIN {
25
@EXPORT_OK = qw(
22
    require Exporter;
26
    &pedantic_p
23
    @ISA = qw(Exporter);
27
    &warn_additional
24
    @EXPORT_OK = qw(
28
    &warn_normal
25
        &pedantic_p
29
    &warn_pedantic
26
        &warn_additional
30
    &error_additional
27
        &warn_normal
31
    &error_normal
28
        &warn_pedantic
32
);
29
        &error_additional
33
%EXPORT_TAGS = (
30
        &error_normal
34
    'warn' => [ 'warn_additional',  'warn_normal',  'warn_pedantic' ],
31
    );
35
    'die'  => [ 'error_additional', 'error_normal' ],
32
}
36
);
37
33
38
###############################################################################
34
###############################################################################
39
35
(-)a/misc/translator/tmpl_process3.pl (-3 / +2 lines)
Lines 16-25 using gettext-compatible translation files Link Here
16
16
17
use strict;
17
use strict;
18
#use warnings; FIXME - Bug 2505
18
#use warnings; FIXME - Bug 2505
19
use File::Basename;
19
use File::Basename qw( fileparse );
20
use Getopt::Long;
20
use Getopt::Long qw( GetOptions );
21
use Locale::PO;
21
use Locale::PO;
22
use File::Temp qw( :POSIX );
23
use TmplTokenizer;
22
use TmplTokenizer;
24
use VerboseWarnings qw( :warn :die );
23
use VerboseWarnings qw( :warn :die );
25
24
(-)a/misc/translator/xgettext.pl (-2 / +2 lines)
Lines 26-33 use lib $FindBin::Bin; Link Here
26
26
27
use strict;
27
use strict;
28
use warnings;
28
use warnings;
29
use Getopt::Long;
29
use Getopt::Long qw( GetOptions );
30
use POSIX;
30
use POSIX qw( close exit localtime open printf time );
31
use Locale::PO;
31
use Locale::PO;
32
use TmplTokenizer;
32
use TmplTokenizer;
33
use VerboseWarnings;
33
use VerboseWarnings;
(-)a/misc/z3950_responder.pl (-4 / +3 lines)
Lines 19-28 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Carp;
22
use File::Basename qw( fileparse );
23
use File::Basename;
23
use Getopt::Long qw( GetOptions );
24
use Getopt::Long qw(:config no_ignore_case);
24
use Pod::Usage qw( pod2usage );
25
use Pod::Usage;
26
25
27
use Koha::Config;
26
use Koha::Config;
28
use Koha::Z3950Responder;
27
use Koha::Z3950Responder;
(-)a/offline_circ/download.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use JSON;
22
use JSON qw( to_json );
23
use C4::Auth;
23
use C4::Auth qw( checkauth );
24
use C4::Output;
24
use C4::Output;
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Koha;
(-)a/offline_circ/enqueue_koc.pl (-7 / +3 lines)
Lines 21-41 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
27
use C4::Context;
26
use C4::Context;
28
use C4::Biblio;
29
use C4::Accounts;
27
use C4::Accounts;
30
use C4::Circulation;
28
use C4::Circulation qw( AddOfflineOperation );
31
use C4::Items;
32
use C4::Members;
29
use C4::Members;
33
use C4::Stats;
30
use C4::Stats;
34
use Koha::Checkouts;
31
use Koha::Checkouts;
35
use Koha::UploadedFiles;
32
use Koha::UploadedFiles;
36
use Koha::Items;
33
use Koha::Items;
37
34
38
use Date::Calc qw( Add_Delta_Days Date_to_Days );
39
35
40
# this is the file version number that we're coded against.
36
# this is the file version number that we're coded against.
41
my $FILE_VERSION = '1.0';
37
my $FILE_VERSION = '1.0';
(-)a/offline_circ/list.pl (-5 / +3 lines)
Lines 21-33 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
27
use C4::Context;
26
use C4::Context;
28
use C4::Circulation;
27
use C4::Circulation qw( GetOfflineOperations GetOfflineOperation );
29
use C4::Members;
28
use C4::Members;
30
use C4::Biblio;
31
use Koha::Patrons;
29
use Koha::Patrons;
32
30
33
use Koha::Items;
31
use Koha::Items;
(-)a/offline_circ/process.pl (-2 / +2 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Circulation;
25
use C4::Circulation qw( GetOfflineOperation ProcessOfflineOperation DeleteOfflineOperation );
26
26
27
my $query = CGI->new;
27
my $query = CGI->new;
28
28
(-)a/offline_circ/process_koc.pl (-8 / +5 lines)
Lines 21-36 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Carp;
25
24
26
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
27
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
28
use C4::Koha;
29
use C4::Context;
27
use C4::Context;
30
use C4::Biblio;
31
use C4::Accounts;
28
use C4::Accounts;
32
use C4::Circulation;
29
use C4::Circulation qw( barcodedecode GetOpenIssue AddRenewal AddIssue MarkIssueReturned );
33
use C4::Items;
30
use C4::Items qw( ModDateLastSeen );
34
use C4::Members;
31
use C4::Members;
35
use C4::Stats;
32
use C4::Stats;
36
use C4::BackgroundJob;
33
use C4::BackgroundJob;
Lines 39-45 use Koha::Account; Link Here
39
use Koha::Checkouts;
36
use Koha::Checkouts;
40
use Koha::Patrons;
37
use Koha::Patrons;
41
38
42
use Date::Calc qw( Add_Delta_Days Date_to_Days );
39
use Date::Calc qw( Date_to_Days );
43
40
44
use constant DEBUG => 0;
41
use constant DEBUG => 0;
45
42
(-)a/offline_circ/service.pl (-3 / +3 lines)
Lines 21-29 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( check_api_auth check_cookie_auth );
25
use C4::Circulation;
25
use C4::Circulation qw( AddOfflineOperation ProcessOfflineOperation );
26
use Koha::DateUtils;
26
use Koha::DateUtils qw( dt_from_string );
27
use DateTime::TimeZone;
27
use DateTime::TimeZone;
28
28
29
my $cgi = CGI->new;
29
my $cgi = CGI->new;
(-)a/opac/clubs/clubs-tab.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Patrons;
26
use Koha::Patrons;
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/opac/clubs/enroll.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Clubs;
26
use Koha::Clubs;
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
(-)a/opac/errors/400.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/401.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/402.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/403.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/404.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/errors/500.pl (-3 / +3 lines)
Lines 18-27 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use List::MoreUtils qw(any);
24
use List::MoreUtils qw( any );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
27
my $admin = C4::Context->preference('KohaAdminEmailAddress');
(-)a/opac/external/overdrive/auth.pl (-2 / +1 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use URI;
23
use URI;
24
use URI::Escape;
24
use URI::Escape qw( uri_escape );
25
use C4::Auth qw(checkauth);
26
use Koha::Logger;
25
use Koha::Logger;
27
use Koha::ExternalContent::OverDrive;
26
use Koha::ExternalContent::OverDrive;
28
27
(-)a/opac/ilsdi.pl (-4 / +4 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::ILSDI::Services;
22
use C4::ILSDI::Services;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
26
27
use List::MoreUtils qw(any);
27
use List::MoreUtils qw( any );
28
use XML::Simple;
28
use XML::Simple qw( XMLout );
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use Net::Netmask;
30
use Net::Netmask;
31
31
(-)a/opac/maintenance.pl (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth;
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Templates qw/gettemplate/;
23
use C4::Templates qw/gettemplate/;
24
24
25
use Koha;
25
use Koha;
(-)a/opac/opac-ISBDdetail.pl (-7 / +16 lines)
Lines 41-56 the items attached to the biblio Link Here
41
41
42
use Modern::Perl;
42
use Modern::Perl;
43
43
44
use C4::Auth;
44
use C4::Auth qw( get_template_and_user );
45
use C4::Context;
45
use C4::Context;
46
use C4::Output;
46
use C4::Output qw( parametrized_url output_html_with_http_headers );
47
use CGI qw ( -utf8 );
47
use CGI qw ( -utf8 );
48
use C4::Biblio;
48
use C4::Biblio qw(
49
use C4::Items;
49
    CountItemsIssued
50
    GetISBDView
51
    GetMarcControlnumber
52
    GetMarcISSN
53
    TransformMarcToKoha
54
);
50
use C4::Reserves;
55
use C4::Reserves;
51
use C4::Acquisition;
56
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
52
use C4::Serials;    # uses getsubscriptionfrom biblionumber
57
use C4::Koha qw(
53
use C4::Koha;
58
    GetNormalizedEAN
59
    GetNormalizedISBN
60
    GetNormalizedOCLCNumber
61
    GetNormalizedUPC
62
);
54
use Koha::CirculationRules;
63
use Koha::CirculationRules;
55
use Koha::ItemTypes;
64
use Koha::ItemTypes;
56
use Koha::Patrons;
65
use Koha::Patrons;
(-)a/opac/opac-MARCdetail.pl (-9 / +15 lines)
Lines 45-69 the items attached to the biblio Link Here
45
45
46
use Modern::Perl;
46
use Modern::Perl;
47
47
48
use C4::Auth;
48
use C4::Auth qw( get_template_and_user );
49
use C4::Context;
49
use C4::Context;
50
use C4::Output;
50
use C4::Output qw( parametrized_url output_html_with_http_headers );
51
use CGI qw ( -utf8 );
51
use CGI qw ( -utf8 );
52
use MARC::Record;
52
use C4::Biblio qw(
53
use C4::Biblio;
53
    CountItemsIssued
54
use C4::Items;
54
    GetAuthorisedValueDesc
55
    GetMarcBiblio
56
    GetMarcControlnumber
57
    GetMarcFromKohaField
58
    GetMarcISSN
59
    GetMarcStructure
60
    TransformMarcToKoha
61
);
55
use C4::Reserves;
62
use C4::Reserves;
56
use C4::Members;
63
use C4::Members;
57
use C4::Acquisition;
64
use C4::Koha qw( GetNormalizedISBN );
58
use C4::Koha;
65
use List::MoreUtils qw( uniq );
59
use List::MoreUtils qw( any uniq );
60
use Koha::Biblios;
66
use Koha::Biblios;
61
use Koha::CirculationRules;
67
use Koha::CirculationRules;
62
use Koha::Items;
68
use Koha::Items;
63
use Koha::ItemTypes;
69
use Koha::ItemTypes;
64
use Koha::Patrons;
70
use Koha::Patrons;
65
use Koha::RecordProcessor;
71
use Koha::RecordProcessor;
66
use Koha::DateUtils;
72
use Koha::DateUtils qw( output_pref );
67
73
68
my $query = CGI->new();
74
my $query = CGI->new();
69
75
(-)a/opac/opac-account-pay-return.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
23
24
use C4::Auth;
24
use C4::Auth qw( checkauth );
25
use Koha::Plugins::Handler;
25
use Koha::Plugins::Handler;
26
26
27
my $cgi = CGI->new;
27
my $cgi = CGI->new;
(-)a/opac/opac-account-pay.pl (-4 / +1 lines)
Lines 22-32 use utf8; Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI;
24
use CGI;
25
use HTTP::Request::Common;
26
use LWP::UserAgent;
27
use URI;
28
25
29
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
30
use C4::Output;
27
use C4::Output;
31
use C4::Context;
28
use C4::Context;
32
use Koha::Acquisition::Currencies;
29
use Koha::Acquisition::Currencies;
(-)a/opac/opac-account.pl (-2 / +2 lines)
Lines 22-29 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Members;
24
use C4::Members;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use Koha::Account::Lines;
27
use Koha::Account::Lines;
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use Koha::Plugins;
29
use Koha::Plugins;
(-)a/opac/opac-addbybiblionumber.pl (-3 / +2 lines)
Lines 21-29 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Biblio;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Auth;
27
26
28
use Koha::Biblios;
27
use Koha::Biblios;
29
use Koha::Virtualshelves;
28
use Koha::Virtualshelves;
(-)a/opac/opac-alert-subscribe.pl (-5 / +3 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Serials qw( GetSubscription );
27
use C4::Letters;
28
use C4::Serials;
29
27
30
28
31
my $query = CGI->new;
29
my $query = CGI->new;
(-)a/opac/opac-article-request-cancel.pl (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Output;
24
use C4::Output;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use Koha::ArticleRequests;
26
use Koha::ArticleRequests;
27
27
28
my $query = CGI->new;
28
my $query = CGI->new;
(-)a/opac/opac-authorities-home.pl (-5 / +3 lines)
Lines 21-33 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use URI::Escape;
24
use URI::Escape qw( uri_escape_utf8 );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Auth;
28
use C4::Output qw( pagination_bar output_html_with_http_headers );
29
use C4::Output;
30
use C4::AuthoritiesMarc;
31
use C4::Koha;
29
use C4::Koha;
32
use C4::Search::History;
30
use C4::Search::History;
33
31
(-)a/opac/opac-authoritiesdetail.pl (-5 / +4 lines)
Lines 38-50 parameters tables. Link Here
38
38
39
use Modern::Perl;
39
use Modern::Perl;
40
40
41
use C4::AuthoritiesMarc;
41
use C4::Auth qw( get_template_and_user );
42
use C4::Auth;
42
use C4::Biblio qw( GetMarcUrls );
43
use C4::Biblio qw(GetMarcUrls);
44
use C4::Context;
43
use C4::Context;
45
use C4::Output;
44
use C4::Output qw( output_html_with_http_headers );
45
use C4::AuthoritiesMarc qw( GetAuthority BuildSummary );
46
use CGI qw ( -utf8 );
46
use CGI qw ( -utf8 );
47
use MARC::Record;
48
use C4::Koha;
47
use C4::Koha;
49
48
50
use Koha::Authorities;
49
use Koha::Authorities;
(-)a/opac/opac-basket.pl (-5 / +13 lines)
Lines 20-30 use Modern::Perl; Link Here
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
21
22
use C4::Koha;
22
use C4::Koha;
23
use C4::Biblio;
23
use C4::Biblio qw(
24
use C4::Items;
24
    GetBiblioData
25
use C4::Circulation;
25
    GetFrameworkCode
26
use C4::Auth;
26
    GetMarcAuthors
27
use C4::Output;
27
    GetMarcBiblio
28
    GetMarcSeries
29
    GetMarcSubjects
30
    GetMarcUrls
31
);
32
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
33
use C4::Circulation qw( GetTransfers );
34
use C4::Auth qw( get_template_and_user );
35
use C4::Output qw( output_html_with_http_headers );
28
use Koha::RecordProcessor;
36
use Koha::RecordProcessor;
29
use Koha::CsvProfiles;
37
use Koha::CsvProfiles;
30
use Koha::AuthorisedValues;
38
use Koha::AuthorisedValues;
(-)a/opac/opac-blocked.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_with_http_headers );
24
use C4::Context;
24
use C4::Context;
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
(-)a/opac/opac-browse.pl (-3 / +3 lines)
Lines 22-37 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
use Koha::SearchEngine::Elasticsearch;
29
use Koha::SearchEngine::Elasticsearch;
30
use Koha::SearchEngine::Elasticsearch::Browse;
30
use Koha::SearchEngine::Elasticsearch::Browse;
31
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
31
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
32
use Koha::SearchEngine::Elasticsearch::Search;
32
use Koha::SearchEngine::Elasticsearch::Search;
33
33
34
use JSON;
34
use JSON qw( to_json );
35
use Unicode::Collate;
35
use Unicode::Collate;
36
36
37
my $query = CGI->new;
37
my $query = CGI->new;
(-)a/opac/opac-browser.pl (-3 / +2 lines)
Lines 26-36 TODO :: Description here Link Here
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
28
29
use C4::Auth;
29
use C4::Auth qw( get_template_and_user );
30
use C4::Context;
30
use C4::Context;
31
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Biblio;
34
33
35
my $query = CGI->new;
34
my $query = CGI->new;
36
35
(-)a/opac/opac-course-details.pl (-4 / +3 lines)
Lines 22-32 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
28
27
29
use C4::CourseReserves qw(GetCourse GetCourseReserves);
28
use C4::CourseReserves qw( GetCourse GetCourseReserve GetCourseReserves );
30
29
31
my $cgi = CGI->new;
30
my $cgi = CGI->new;
32
31
(-)a/opac/opac-course-reserves.pl (-3 / +3 lines)
Lines 22-31 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
use C4::CourseReserves qw(SearchCourses);
28
use C4::CourseReserves qw( SearchCourses );
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
31
31
(-)a/opac/opac-detail.pl (-22 / +42 lines)
Lines 24-53 use Modern::Perl; Link Here
24
24
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Acquisition qw( SearchOrders );
26
use C4::Acquisition qw( SearchOrders );
27
use C4::Auth qw(:DEFAULT get_session);
27
use C4::Auth qw( get_template_and_user get_session );
28
use C4::Koha;
28
use C4::Koha qw(
29
use C4::Serials;    #uses getsubscriptionfrom biblionumber
29
    getitemtypeimagelocation
30
use C4::Output;
30
    GetNormalizedEAN
31
use C4::Biblio;
31
    GetNormalizedISBN
32
use C4::Items;
32
    GetNormalizedOCLCNumber
33
use C4::Circulation;
33
    GetNormalizedUPC
34
use C4::Tags qw(get_tags);
34
);
35
use C4::XISBN qw(get_xisbns);
35
use C4::Serials qw( CountSubscriptionFromBiblionumber SearchSubscriptions GetLatestSerials );
36
use C4::External::Amazon;
36
use C4::Output qw( parametrized_url output_html_with_http_headers );
37
use C4::Biblio qw(
38
    CountItemsIssued
39
    GetBiblioData
40
    GetMarcAuthors
41
    GetMarcBiblio
42
    GetMarcControlnumber
43
    GetMarcISBN
44
    GetMarcISSN
45
    GetMarcSeries
46
    GetMarcSubjects
47
    GetMarcUrls
48
);
49
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
50
use C4::Circulation qw( GetTransfers );
51
use C4::Tags qw( get_tags );
52
use C4::XISBN qw( get_xisbns );
53
use C4::External::Amazon qw( get_amazon_tld );
37
use C4::External::BakerTaylor qw( image_url link_url );
54
use C4::External::BakerTaylor qw( image_url link_url );
38
use C4::External::Syndetics qw(get_syndetics_index get_syndetics_summary get_syndetics_toc get_syndetics_excerpt get_syndetics_reviews get_syndetics_anotes );
55
use C4::External::Syndetics qw(
56
    get_syndetics_anotes
57
    get_syndetics_excerpt
58
    get_syndetics_index
59
    get_syndetics_reviews
60
    get_syndetics_summary
61
    get_syndetics_toc
62
);
39
use C4::Members;
63
use C4::Members;
40
use C4::XSLT;
64
use C4::XSLT qw( XSLTParse4Display );
41
use C4::ShelfBrowser;
65
use C4::ShelfBrowser qw( GetNearbyItems );
42
use C4::Reserves;
66
use C4::Reserves qw( GetReserveStatus );
43
use C4::Charset;
67
use C4::Charset qw( SetUTF8Flag );
44
use C4::Letters;
45
use MARC::Record;
46
use MARC::Field;
68
use MARC::Field;
47
use List::MoreUtils qw/any none/;
69
use List::MoreUtils qw( any );
48
use Koha::DateUtils;
49
use C4::HTML5Media;
70
use C4::HTML5Media;
50
use C4::CourseReserves qw(GetItemCourseReservesInfo);
71
use C4::CourseReserves qw( GetItemCourseReservesInfo );
51
72
52
use Koha::Biblios;
73
use Koha::Biblios;
53
use Koha::RecordProcessor;
74
use Koha::RecordProcessor;
Lines 63-69 use Koha::Ratings; Link Here
63
use Koha::Reviews;
84
use Koha::Reviews;
64
use Koha::SearchEngine::Search;
85
use Koha::SearchEngine::Search;
65
86
66
use Try::Tiny;
67
87
68
my $query = CGI->new();
88
my $query = CGI->new();
69
89
Lines 228-234 my $session = get_session($query->cookie("CGISESSID")); Link Here
228
my %paging = (previous => {}, next => {});
248
my %paging = (previous => {}, next => {});
229
if ($session->param('busc')) {
249
if ($session->param('busc')) {
230
    use C4::Search;
250
    use C4::Search;
231
    use URI::Escape;
251
    use URI::Escape qw( uri_escape_utf8 uri_unescape );
232
252
233
    # Rebuild the string to store on session
253
    # Rebuild the string to store on session
234
    # param value is URI encoded and params separator is HTML encode (&amp;)
254
    # param value is URI encoded and params separator is HTML encode (&amp;)
(-)a/opac/opac-discharge.pl (-5 / +3 lines)
Lines 18-33 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Carp;
21
use Carp qw( carp );
22
22
23
use C4::Auth qw(:DEFAULT get_session);
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw( -utf8 );
24
use CGI qw( -utf8 );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Log;
28
use Koha::Patrons;
27
use Koha::Patrons;
29
use Koha::Patron::Discharge;
28
use Koha::Patron::Discharge;
30
use Koha::DateUtils;
31
29
32
my $input = CGI->new;
30
my $input = CGI->new;
33
31
(-)a/opac/opac-downloadcart.pl (-6 / +5 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
23
use Encode qw( encode );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
26
use C4::Biblio qw( GetFrameworkCode GetISBDView GetMarcBiblio );
27
use C4::Items;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output;
29
use C4::Record;
28
use C4::Record;
30
use C4::Ris;
29
use C4::Ris qw( marc2ris );
31
use Koha::CsvProfiles;
30
use Koha::CsvProfiles;
32
use Koha::RecordProcessor;
31
use Koha::RecordProcessor;
33
32
(-)a/opac/opac-downloadshelf.pl (-6 / +4 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
24
23
25
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
25
use C4::Biblio qw( GetFrameworkCode GetISBDView GetMarcBiblio );
27
use C4::Items;
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output;
29
use C4::Record;
27
use C4::Record;
30
use C4::Ris;
28
use C4::Ris qw( marc2ris );
31
use Koha::CsvProfiles;
29
use Koha::CsvProfiles;
32
use Koha::RecordProcessor;
30
use Koha::RecordProcessor;
33
use Koha::Virtualshelves;
31
use Koha::Virtualshelves;
(-)a/opac/opac-export.pl (-2 / +7 lines)
Lines 22-31 use Modern::Perl; Link Here
22
use C4::Record;
22
use C4::Record;
23
use C4::Auth;
23
use C4::Auth;
24
use C4::Output;
24
use C4::Output;
25
use C4::Biblio;
25
use C4::Biblio qw(
26
    GetFrameworkCode
27
    GetISBDView
28
    GetMarcBiblio
29
    GetMarcControlnumber
30
);
26
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
27
use C4::Auth;
32
use C4::Auth;
28
use C4::Ris;
33
use C4::Ris qw( marc2ris );
29
use Koha::RecordProcessor;
34
use Koha::RecordProcessor;
30
35
31
my $query = CGI->new;
36
my $query = CGI->new;
(-)a/opac/opac-holdshistory.pl (-2 / +2 lines)
Lines 20-27 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::Holds;
27
use Koha::Holds;
(-)a/opac/opac-ics.pl (-5 / +2 lines)
Lines 29-39 use DateTime::Format::ICal; Link Here
29
use DateTime::Event::ICal;
29
use DateTime::Event::ICal;
30
use URI;
30
use URI;
31
31
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Koha;
33
use Koha::DateUtils qw( dt_from_string );
34
use C4::Circulation;
35
use C4::Members;
36
use Koha::DateUtils;
37
34
38
my $query = CGI->new;
35
my $query = CGI->new;
39
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
36
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
(-)a/opac/opac-idref.pl (-4 / +3 lines)
Lines 21-34 use Modern::Perl; Link Here
21
21
22
use CGI;
22
use CGI;
23
use LWP::UserAgent;
23
use LWP::UserAgent;
24
use HTTP::Request::Common;
24
use JSON qw( from_json );
25
use JSON;
26
use Encode;
25
use Encode;
27
26
28
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
29
use C4::Context;
28
use C4::Context;
30
use C4::Search;
29
use C4::Search;
31
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
32
31
33
my $cgi = CGI->new;
32
my $cgi = CGI->new;
34
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
33
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
(-)a/opac/opac-illrequests.pl (-2 / +2 lines)
Lines 22-30 use Modern::Perl; Link Here
22
use JSON qw( encode_json );
22
use JSON qw( encode_json );
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
28
29
use Koha::Illrequest::Config;
29
use Koha::Illrequest::Config;
30
use Koha::Illrequests;
30
use Koha::Illrequests;
(-)a/opac/opac-imageviewer.pl (-3 / +2 lines)
Lines 20-28 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Biblio;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output;
26
25
27
use Koha::Biblios;
26
use Koha::Biblios;
28
use Koha::CoverImages;
27
use Koha::CoverImages;
(-)a/opac/opac-issue-note.pl (-4 / +3 lines)
Lines 23-34 use CGI qw ( -utf8 ); Link Here
23
use C4::Koha;
23
use C4::Koha;
24
use C4::Context;
24
use C4::Context;
25
use C4::Scrubber;
25
use C4::Scrubber;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Biblio;
29
use C4::Letters;
28
use C4::Letters;
30
use Koha::Checkouts;
29
use Koha::Checkouts;
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string );
32
use Koha::Patrons;
31
use Koha::Patrons;
33
32
34
my $query = CGI->new;
33
my $query = CGI->new;
(-)a/opac/opac-library.pl (-2 / +2 lines)
Lines 21-28 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Libraries;
26
use Koha::Libraries;
27
27
28
my $query = CGI->new();
28
my $query = CGI->new();
(-)a/opac/opac-main.pl (-4 / +3 lines)
Lines 20-31 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;    # get_template_and_user
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Languages qw(getTranslatedLanguages accept_language);
26
use Koha::Quotes;
25
use Koha::Quotes;
27
use C4::Members;
26
use C4::Members;
28
use C4::Overdues;
27
use C4::Overdues qw( checkoverdues );
29
use Koha::Checkouts;
28
use Koha::Checkouts;
30
use Koha::Holds;
29
use Koha::Holds;
31
use Koha::News;
30
use Koha::News;
(-)a/opac/opac-memberentry.pl (-5 / +5 lines)
Lines 19-32 use Modern::Perl; Link Here
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Digest::MD5 qw( md5_base64 md5_hex );
21
use Digest::MD5 qw( md5_base64 md5_hex );
22
use JSON;
22
use JSON qw( to_json );
23
use List::MoreUtils qw( any each_array uniq );
23
use List::MoreUtils qw( any each_array uniq );
24
use String::Random qw( random_string );
24
use String::Random qw( random_string );
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Context;
28
use C4::Context;
29
use C4::Members;
29
use C4::Members qw( checkcardnumber );
30
use C4::Form::MessagingPreferences;
30
use C4::Form::MessagingPreferences;
31
use Koha::AuthUtils;
31
use Koha::AuthUtils;
32
use Koha::Patrons;
32
use Koha::Patrons;
Lines 35-41 use Koha::Patron::Modification; Link Here
35
use Koha::Patron::Modifications;
35
use Koha::Patron::Modifications;
36
use C4::Scrubber;
36
use C4::Scrubber;
37
use Email::Valid;
37
use Email::Valid;
38
use Koha::DateUtils;
38
use Koha::DateUtils qw( dt_from_string output_pref );
39
use Koha::Libraries;
39
use Koha::Libraries;
40
use Koha::Patron::Attribute::Types;
40
use Koha::Patron::Attribute::Types;
41
use Koha::Patron::Attributes;
41
use Koha::Patron::Attributes;
(-)a/opac/opac-messaging.pl (-5 / +2 lines)
Lines 21-32 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;    # checkauth, getborrowernumber.
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Circulation;
28
use C4::Output;
29
use C4::Members;
30
use C4::Members::Messaging;
27
use C4::Members::Messaging;
31
use C4::Form::MessagingPreferences;
28
use C4::Form::MessagingPreferences;
32
use Koha::Patrons;
29
use Koha::Patrons;
(-)a/opac/opac-modrequest-suspend.pl (-2 / +2 lines)
Lines 19-26 use Modern::Perl; Link Here
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Output;
21
use C4::Output;
22
use C4::Reserves;
22
use C4::Reserves qw( CanReserveBeCanceledFromOpac ToggleSuspend SuspendAll );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
my $query = CGI->new;
24
my $query = CGI->new;
25
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
25
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
26
    {
26
    {
(-)a/opac/opac-modrequest.pl (-2 / +2 lines)
Lines 26-33 use Modern::Perl; Link Here
26
26
27
use CGI qw ( -utf8 );
27
use CGI qw ( -utf8 );
28
use C4::Output;
28
use C4::Output;
29
use C4::Reserves;
29
use C4::Reserves qw( CanReserveBeCanceledFromOpac );
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use Koha::Holds;
31
use Koha::Holds;
32
my $query = CGI->new;
32
my $query = CGI->new;
33
33
(-)a/opac/opac-mymessages.pl (-3 / +2 lines)
Lines 21-31 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
27
use C4::Letters;
26
use C4::Letters;
28
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
29
28
30
my $query = CGI->new();
29
my $query = CGI->new();
31
30
(-)a/opac/opac-news-rss.pl (-3 / +2 lines)
Lines 20-28 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI;
22
use CGI;
23
use C4::Auth;    # get_template_and_user
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Languages qw(getTranslatedLanguages accept_language);
26
use Koha::News;
25
use Koha::News;
27
26
28
my $input = CGI->new;
27
my $input = CGI->new;
(-)a/opac/opac-overdrive-search.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth qw(:DEFAULT get_session);
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
my $cgi = CGI->new;
27
my $cgi = CGI->new;
28
28
(-)a/opac/opac-passwd.pl (-5 / +3 lines)
Lines 22-35 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth;    # checkauth, getborrowernumber.
25
use C4::Auth qw( get_template_and_user checkpw checkpw_hash );
26
use C4::Context;
26
use C4::Context;
27
use C4::Circulation;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Members;
29
use C4::Output;
30
use Koha::Patrons;
28
use Koha::Patrons;
31
29
32
use Try::Tiny;
30
use Try::Tiny qw( catch try );
33
31
34
my $query = CGI->new;
32
my $query = CGI->new;
35
33
(-)a/opac/opac-password-recovery.pl (-7 / +11 lines)
Lines 3-19 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI;
4
use CGI;
5
5
6
use C4::Auth;
6
use C4::Auth qw( get_template_and_user );
7
use C4::Koha;
7
use C4::Output qw( output_html_with_http_headers );
8
use C4::Output;
9
use C4::Context;
8
use C4::Context;
10
use Koha::Patron::Password::Recovery
9
use Koha::Patron::Password::Recovery qw(
11
  qw(SendPasswordRecoveryEmail ValidateBorrowernumber GetValidLinkInfo CompletePasswordRecovery DeleteExpiredPasswordRecovery);
10
    CompletePasswordRecovery
11
    DeleteExpiredPasswordRecovery
12
    GetValidLinkInfo
13
    SendPasswordRecoveryEmail
14
    ValidateBorrowernumber
15
);
12
use Koha::Patrons;
16
use Koha::Patrons;
13
my $query = CGI->new;
17
my $query = CGI->new;
14
use HTML::Entities;
18
use HTML::Entities;
15
use Try::Tiny;
19
use Try::Tiny qw( catch try );
16
use List::Util qw/any/;
20
use List::Util qw( any );
17
21
18
my ( $template, $dummy, $cookie ) = get_template_and_user(
22
my ( $template, $dummy, $cookie ) = get_template_and_user(
19
    {
23
    {
(-)a/opac/opac-patron-consent.pl (-3 / +3 lines)
Lines 20-28 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw/-utf8/;
21
use CGI qw/-utf8/;
22
22
23
use C4::Auth qw/get_template_and_user/;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output qw/output_html_with_http_headers/;
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::DateUtils qw/dt_from_string/;
25
use Koha::DateUtils qw( dt_from_string );
26
use Koha::Patron::Consents;
26
use Koha::Patron::Consents;
27
use Koha::Patrons;
27
use Koha::Patrons;
28
28
(-)a/opac/opac-patron-image.pl (-1 / +1 lines)
Lines 22-28 use Modern::Perl; Link Here
22
use C4::Members;
22
use C4::Members;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use CGI::Cookie;  # need to check cookies before having CGI parse the POST request
24
use CGI::Cookie;  # need to check cookies before having CGI parse the POST request
25
use C4::Auth qw(:DEFAULT check_cookie_auth);
25
use C4::Auth qw( check_cookie_auth );
26
use Koha::Patron::Images;
26
use Koha::Patron::Images;
27
27
28
my $query = CGI->new;
28
my $query = CGI->new;
(-)a/opac/opac-privacy.pl (-2 / +2 lines)
Lines 19-27 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
21
22
use C4::Auth;    # checkauth, getborrowernumber.
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::Patrons;
25
use Koha::Patrons;
26
26
27
my $query = CGI->new;
27
my $query = CGI->new;
(-)a/opac/opac-ratings-ajax.pl (-2 / +2 lines)
Lines 28-36 use Modern::Perl; Link Here
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use CGI::Cookie;  # need to check cookies before having CGI parse the POST request
29
use CGI::Cookie;  # need to check cookies before having CGI parse the POST request
30
30
31
use C4::Auth qw(:DEFAULT check_cookie_auth);
31
use C4::Auth qw( get_template_and_user check_cookie_auth );
32
use C4::Context;
32
use C4::Context;
33
use C4::Output qw(:html :ajax pagination_bar);
33
use C4::Output qw( is_ajax output_ajax_with_http_headers );
34
34
35
use Koha::Ratings;
35
use Koha::Ratings;
36
36
(-)a/opac/opac-ratings.pl (-1 / +1 lines)
Lines 28-34 note: there is currently no 'delete rating' functionality in this script Link Here
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
30
31
use C4::Auth;
31
use C4::Auth qw( checkauth );
32
use C4::Context;
32
use C4::Context;
33
33
34
use Koha::Ratings;
34
use Koha::Ratings;
(-)a/opac/opac-readingrecord.pl (-7 / +9 lines)
Lines 20-36 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
24
use C4::Koha qw(
25
    getitemtypeimagelocation
26
    GetNormalizedISBN
27
    GetNormalizedUPC
28
);
25
use C4::Biblio;
29
use C4::Biblio;
26
use C4::Circulation;
30
use C4::Members qw( GetAllIssues );
27
use C4::Members;
28
use C4::External::BakerTaylor qw( image_url link_url );
31
use C4::External::BakerTaylor qw( image_url link_url );
29
use Koha::DateUtils;
30
use MARC::Record;
32
use MARC::Record;
31
33
32
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
33
use C4::Charset qw(StripNonXmlChars);
35
use C4::Charset qw( StripNonXmlChars );
34
use Koha::Patrons;
36
use Koha::Patrons;
35
37
36
use Koha::ItemTypes;
38
use Koha::ItemTypes;
(-)a/opac/opac-recordedbooks-search.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
my $cgi = CGI->new;
27
my $cgi = CGI->new;
28
28
(-)a/opac/opac-registration-verify.pl (-2 / +2 lines)
Lines 19-26 use Modern::Perl; Link Here
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Members;
24
use C4::Members;
25
use C4::Form::MessagingPreferences;
25
use C4::Form::MessagingPreferences;
26
use Koha::AuthUtils;
26
use Koha::AuthUtils;
(-)a/opac/opac-renew.pl (-4 / +2 lines)
Lines 24-37 Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Circulation;
27
use C4::Circulation qw( CanBookBeRenewed AddRenewal );
28
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
29
use C4::Context;
29
use C4::Context;
30
use C4::Items;
31
use C4::Members;
30
use C4::Members;
32
use Koha::Items;
31
use Koha::Items;
33
use Koha::Patrons;
32
use Koha::Patrons;
34
use Date::Calc qw( Today Date_to_Days );
35
my $query = CGI->new;
33
my $query = CGI->new;
36
34
37
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
35
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
(-)a/opac/opac-reportproblem.pl (-4 / +4 lines)
Lines 19-34 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Try::Tiny;
22
use Try::Tiny qw( catch try );
23
23
24
use C4::Auth;    # get_template_and_user
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Letters;
26
use C4::Letters;
27
use Koha::ProblemReport;
27
use Koha::ProblemReport;
28
use Koha::Libraries;
28
use Koha::Libraries;
29
use Koha::Patrons;
29
use Koha::Patrons;
30
use Koha::Util::Navigation;
30
use Koha::Util::Navigation;
31
use URI::Escape;
31
use URI::Escape qw( uri_unescape );
32
use Encode;
32
use Encode;
33
33
34
my $input = CGI->new;
34
my $input = CGI->new;
(-)a/opac/opac-request-article.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::Biblios;
27
use Koha::Biblios;
28
use Koha::Patrons;
28
use Koha::Patrons;
(-)a/opac/opac-reserve.pl (-10 / +9 lines)
Lines 21-48 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;    # checkauth, getborrowernumber.
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use C4::Koha qw( getitemtypeimagelocation getitemtypeimagesrc );
26
use C4::Circulation;
26
use C4::Circulation qw( GetBranchItemRule GetTransfers );
27
use C4::Reserves;
27
use C4::Reserves qw( CanItemBeReserved CanBookBeReserved AddReserve GetReservesControlBranch IsAvailableForItemLevelRequest );
28
use C4::Biblio;
28
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
29
use C4::Items;
29
use C4::Items qw( GetHostItemsInfo GetItemsInfo );
30
use C4::Output;
30
use C4::Output qw( output_html_with_http_headers );
31
use C4::Context;
31
use C4::Context;
32
use C4::Members;
32
use C4::Members;
33
use C4::Overdues;
33
use C4::Overdues;
34
34
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::Biblios;
36
use Koha::Biblios;
37
use Koha::DateUtils;
37
use Koha::DateUtils qw( dt_from_string output_pref );
38
use Koha::CirculationRules;
38
use Koha::CirculationRules;
39
use Koha::Items;
39
use Koha::Items;
40
use Koha::ItemTypes;
40
use Koha::ItemTypes;
41
use Koha::Checkouts;
41
use Koha::Checkouts;
42
use Koha::Libraries;
42
use Koha::Libraries;
43
use Koha::Patrons;
43
use Koha::Patrons;
44
use Date::Calc qw/Today Date_to_Days/;
44
use List::MoreUtils qw( uniq );
45
use List::MoreUtils qw/uniq/;
46
45
47
my $maxreserves = C4::Context->preference("maxreserves");
46
my $maxreserves = C4::Context->preference("maxreserves");
48
47
(-)a/opac/opac-restrictedpage.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI;
22
use CGI;
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
my $localNetwork  = C4::Context->preference('RestrictedPageLocalIPs');
26
my $localNetwork  = C4::Context->preference('RestrictedPageLocalIPs');
27
my $userIP = $ENV{'REMOTE_ADDR'};
27
my $userIP = $ENV{'REMOTE_ADDR'};
(-)a/opac/opac-retrieve-file.pl (-2 / +2 lines)
Lines 21-29 use Modern::Perl; Link Here
21
use CGI;
21
use CGI;
22
use Encode;
22
use Encode;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use Koha::UploadedFiles;
27
use Koha::UploadedFiles;
28
28
29
my $input = CGI::->new;
29
my $input = CGI::->new;
(-)a/opac/opac-review.pl (-5 / +3 lines)
Lines 19-32 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Koha;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output;
25
use C4::Biblio;
26
use C4::Scrubber;
24
use C4::Scrubber;
27
25
28
use Koha::Biblios;
26
use Koha::Biblios;
29
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string );
30
use Koha::Review;
28
use Koha::Review;
31
use Koha::Reviews;
29
use Koha::Reviews;
32
30
(-)a/opac/opac-routing-lists.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Members;
21
use C4::Members;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use Koha::Patrons;
24
use Koha::Patrons;
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
(-)a/opac/opac-search-history.pl (-6 / +2 lines)
Lines 19-34 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Auth qw(:DEFAULT get_session);
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Log;
27
use C4::Items;
28
use C4::Search::History;
26
use C4::Search::History;
29
27
30
use URI::Escape;
31
use POSIX qw(strftime);
32
28
33
29
34
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/opac/opac-search.pl (-7 / +7 lines)
Lines 43-56 my ($builder, $searcher); Link Here
43
$builder  = Koha::SearchEngine::QueryBuilder->new({index => 'biblios'});
43
$builder  = Koha::SearchEngine::QueryBuilder->new({index => 'biblios'});
44
$searcher = Koha::SearchEngine::Search->new({index => 'biblios'});
44
$searcher = Koha::SearchEngine::Search->new({index => 'biblios'});
45
45
46
use C4::Output;
46
use C4::Output qw( output_html_with_http_headers pagination_bar output_with_http_headers );
47
use C4::Auth qw(:DEFAULT get_session);
47
use C4::Auth qw( get_template_and_user get_session );
48
use C4::Languages qw(getLanguages);
48
use C4::Languages qw( getlanguage getLanguages );
49
use C4::Search;
49
use C4::Search qw( searchResults );
50
use C4::Search::History;
50
use C4::Search::History;
51
use C4::Biblio; # Unused here?
51
use C4::Biblio qw( GetXmlBiblio CountItemsIssued );
52
use C4::Koha;
52
use C4::Koha qw( GetItemTypesCategorized getitemtypeimagelocation GetAuthorisedValues );
53
use C4::Tags qw(get_tags);
53
use C4::Tags qw( get_tags get_tag );
54
use C4::SocialData;
54
use C4::SocialData;
55
use C4::External::OverDrive;
55
use C4::External::OverDrive;
56
use C4::External::BakerTaylor qw( image_url link_url );
56
use C4::External::BakerTaylor qw( image_url link_url );
(-)a/opac/opac-sendbasket.pl (-10 / +14 lines)
Lines 20-35 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
23
use Encode;
24
use Carp;
24
use Carp qw( carp );
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
use C4::Biblio;
27
use C4::Biblio qw(
28
use C4::Items;
28
    GetBiblioData
29
use C4::Auth;
29
    GetMarcAuthors
30
use C4::Output;
30
    GetMarcBiblio
31
use C4::Members;
31
    GetMarcSubjects
32
use C4::Templates ();
32
);
33
use C4::Items qw( GetItemsInfo );
34
use C4::Auth qw( get_template_and_user );
35
use C4::Output qw( output_html_with_http_headers );
36
use C4::Templates;
33
use Koha::Email;
37
use Koha::Email;
34
use Koha::Patrons;
38
use Koha::Patrons;
35
use Koha::Token;
39
use Koha::Token;
(-)a/opac/opac-sendshelf.pl (-9 / +15 lines)
Lines 20-34 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw( encode );
23
use Encode;
24
use Carp;
24
use Carp qw( carp );
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Biblio;
28
use C4::Biblio qw(
29
use C4::Items;
29
    GetBiblioData
30
use C4::Output;
30
    GetFrameworkCode
31
use C4::Members;
31
    GetMarcAuthors
32
    GetMarcBiblio
33
    GetMarcISBN
34
    GetMarcSubjects
35
);
36
use C4::Items qw( GetItemsInfo );
37
use C4::Output qw( output_html_with_http_headers );
32
use Koha::Email;
38
use Koha::Email;
33
use Koha::Patrons;
39
use Koha::Patrons;
34
use Koha::Virtualshelves;
40
use Koha::Virtualshelves;
(-)a/opac/opac-serial-issues.pl (-5 / +3 lines)
Lines 21-31 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use C4::Serials qw( GetFullSubscription GetFullSubscriptionsFromBiblionumber PrepareSerialsData GetSubscription GetSubscriptionsFromBiblionumber );
26
use C4::Serials;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Letters;
28
use C4::Output;
29
use C4::Context;
27
use C4::Context;
30
28
31
my $query      = CGI->new;
29
my $query      = CGI->new;
(-)a/opac/opac-shareshelf.pl (-3 / +2 lines)
Lines 27-37 use constant SHELVES_URL => Link Here
27
use CGI qw ( -utf8 );
27
use CGI qw ( -utf8 );
28
use Email::Valid;
28
use Email::Valid;
29
29
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Context;
31
use C4::Context;
32
use C4::Letters;
32
use C4::Letters;
33
use C4::Members ();
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::Output;
35
34
36
use Koha::Patrons;
35
use Koha::Patrons;
37
use Koha::Virtualshelves;
36
use Koha::Virtualshelves;
(-)a/opac/opac-shelves.pl (-5 / +9 lines)
Lines 20-32 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Biblio;
24
use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
25
use C4::External::BakerTaylor qw( image_url link_url );
25
use C4::External::BakerTaylor qw( image_url link_url );
26
use C4::Koha;
26
use C4::Koha qw(
27
use C4::Items;
27
    GetNormalizedEAN
28
    GetNormalizedISBN
29
    GetNormalizedOCLCNumber
30
    GetNormalizedUPC
31
);
28
use C4::Members;
32
use C4::Members;
29
use C4::Output;
33
use C4::Output qw( pagination_bar output_with_http_headers );
30
use C4::Tags qw( get_tags );
34
use C4::Tags qw( get_tags );
31
use C4::XSLT;
35
use C4::XSLT;
32
36
(-)a/opac/opac-showmarc.pl (-4 / +3 lines)
Lines 25-35 use Encode; Link Here
25
25
26
# Koha modules used
26
# Koha modules used
27
use C4::Context;
27
use C4::Context;
28
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Auth;
29
use C4::Auth qw( get_template_and_user );
30
use C4::Biblio;
31
use C4::ImportBatch;
30
use C4::ImportBatch;
32
use C4::XSLT ();
31
use C4::XSLT;
33
use C4::Templates;
32
use C4::Templates;
34
use Koha::RecordProcessor;
33
use Koha::RecordProcessor;
35
34
(-)a/opac/opac-showreviews.pl (-7 / +11 lines)
Lines 21-35 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use C4::Koha qw(
26
use C4::Output;
26
    GetNormalizedEAN
27
use C4::Circulation;
27
    GetNormalizedISBN
28
use C4::Biblio;
28
    GetNormalizedOCLCNumber
29
use Koha::DateUtils;
29
    GetNormalizedUPC
30
);
31
use C4::Output qw( output_html_with_http_headers );
32
use C4::Biblio qw( GetMarcBiblio );
33
use Koha::DateUtils qw( dt_from_string );
30
use Koha::Patrons;
34
use Koha::Patrons;
31
use Koha::Reviews;
35
use Koha::Reviews;
32
use POSIX qw(ceil floor strftime);
36
use POSIX qw( ceil floor );
33
37
34
my $template_name;
38
my $template_name;
35
my $query = CGI->new;
39
my $query = CGI->new;
(-)a/opac/opac-suggestions.pl (-7 / +12 lines)
Lines 19-31 use Modern::Perl; Link Here
19
19
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Encode qw( encode );
22
use Encode;
23
use C4::Auth;    # get_template_and_user
23
use C4::Auth qw( get_template_and_user );
24
use C4::Members;
24
use C4::Members;
25
use C4::Koha;
25
use C4::Koha qw( GetAuthorisedValues );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Suggestions;
27
use C4::Suggestions qw(
28
use C4::Koha;
28
    DelSuggestion
29
    MarcRecordFromNewSuggestion
30
    NewSuggestion
31
    SearchSuggestion
32
);
33
use C4::Koha qw( GetAuthorisedValues );
29
use C4::Scrubber;
34
use C4::Scrubber;
30
use C4::Search qw( FindDuplicate );
35
use C4::Search qw( FindDuplicate );
31
36
Lines 33-39 use Koha::AuthorisedValues; Link Here
33
use Koha::Libraries;
38
use Koha::Libraries;
34
use Koha::Patrons;
39
use Koha::Patrons;
35
40
36
use Koha::DateUtils;
41
use Koha::DateUtils qw( dt_from_string output_pref );
37
42
38
my $input           = CGI->new;
43
my $input           = CGI->new;
39
my $op              = $input->param('op') || 'else';
44
my $op              = $input->param('op') || 'else';
(-)a/opac/opac-tags.pl (-6 / +11 lines)
Lines 35-50 use Modern::Perl; Link Here
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use CGI::Cookie; # need to check cookies before having CGI parse the POST request
36
use CGI::Cookie; # need to check cookies before having CGI parse the POST request
37
37
38
use C4::Auth qw(:DEFAULT check_cookie_auth);
38
use C4::Auth qw( check_cookie_auth get_template_and_user );
39
use C4::Context;
39
use C4::Context;
40
use C4::Output qw(:html :ajax );
40
use C4::Output qw( output_with_http_headers is_ajax output_html_with_http_headers );
41
use C4::Scrubber;
41
use C4::Scrubber;
42
use C4::Biblio;
42
use C4::Biblio qw( GetMarcBiblio );
43
use C4::Items qw(GetItemsInfo GetHiddenItemnumbers);
43
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
44
use C4::Tags qw(add_tag get_approval_rows get_tag_rows remove_tag stratify_tags);
44
use C4::Tags qw(
45
    add_tag
46
    get_approval_rows
47
    get_tag_rows
48
    remove_tag
49
    stratify_tags
50
);
45
use C4::XSLT;
51
use C4::XSLT;
46
52
47
use Data::Dumper;
48
53
49
use Koha::Logger;
54
use Koha::Logger;
50
use Koha::Biblios;
55
use Koha::Biblios;
(-)a/opac/opac-tags_subject.pl (-3 / +2 lines)
Lines 26-36 TODO :: Description here Link Here
26
26
27
use Modern::Perl;
27
use Modern::Perl;
28
28
29
use C4::Auth;
29
use C4::Auth qw( get_template_and_user );
30
use C4::Context;
30
use C4::Context;
31
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Biblio;
34
33
35
my $query = CGI->new;
34
my $query = CGI->new;
36
35
(-)a/opac/opac-topissues.pl (-6 / +3 lines)
Lines 22-35 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
26
use C4::Context;
27
use C4::Languages;
28
use C4::Search;
27
use C4::Search;
29
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Koha;
29
use C4::Circulation qw( GetTopIssues );
31
use C4::Circulation;
32
use Date::Manip;
33
30
34
=head1 NAME
31
=head1 NAME
35
32
(-)a/opac/opac-user.pl (-15 / +13 lines)
Lines 21-40 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use C4::Koha qw(
26
use C4::Circulation;
26
    getitemtypeimagelocation
27
    GetNormalizedISBN
28
    GetNormalizedUPC
29
);
30
use C4::Circulation qw( CanBookBeRenewed GetRenewCount GetIssuingCharges GetSoonestRenewDate );
27
use C4::External::BakerTaylor qw( image_url link_url );
31
use C4::External::BakerTaylor qw( image_url link_url );
28
use C4::Reserves;
32
use C4::Reserves qw( GetReserveStatus );
29
use C4::Members;
33
use C4::Members;
30
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
31
use C4::Biblio;
35
use C4::Biblio qw( GetMarcBiblio );
32
use C4::Items;
33
use C4::Letters;
34
use Koha::Account::Lines;
36
use Koha::Account::Lines;
35
use Koha::Biblios;
37
use Koha::Biblios;
36
use Koha::Libraries;
38
use Koha::Libraries;
37
use Koha::DateUtils;
39
use Koha::DateUtils qw( output_pref );
38
use Koha::Holds;
40
use Koha::Holds;
39
use Koha::Database;
41
use Koha::Database;
40
use Koha::ItemTypes;
42
use Koha::ItemTypes;
Lines 48-59 use Koha::Token; Link Here
48
50
49
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
51
use constant ATTRIBUTE_SHOW_BARCODE => 'SHOW_BCODE';
50
52
51
use Scalar::Util qw(looks_like_number);
53
use Scalar::Util qw( looks_like_number );
52
use Date::Calc qw(
54
use Date::Calc qw( Date_to_Days Today );
53
  Today
54
  Add_Delta_Days
55
  Date_to_Days
56
);
57
55
58
my $query = CGI->new;
56
my $query = CGI->new;
59
57
(-)a/opac/sci/sci-main.pl (-4 / +4 lines)
Lines 19-31 use Modern::Perl; Link Here
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
21
22
use C4::Auth qw(get_template_and_user checkpw);
22
use C4::Auth qw( get_template_and_user );
23
use C4::Circulation;
23
use C4::Circulation qw( AddReturn );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use Koha::Items;
25
use Koha::Items;
26
26
27
use List::MoreUtils qw( uniq );
27
use List::MoreUtils qw( uniq );
28
use Try::Tiny;
28
use Try::Tiny qw( catch try );
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
31
31
(-)a/opac/sco/help.pl (-2 / +2 lines)
Lines 24-31 Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
26
27
use C4::Auth   qw(get_template_and_user in_iprange);
27
use C4::Auth qw( in_iprange get_template_and_user );
28
use C4::Output qw(output_html_with_http_headers);
28
use C4::Output qw( output_html_with_http_headers );
29
29
30
my $query = CGI->new;
30
my $query = CGI->new;
31
unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
31
unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
(-)a/opac/sco/printslip.pl (-4 / +3 lines)
Lines 29-38 It is called from sco-main.pl Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use C4::Context;
31
use C4::Context;
32
use C4::Auth qw/:DEFAULT get_session in_iprange/;
32
use C4::Auth qw( in_iprange get_session get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::Members;
34
use C4::Members qw( IssueSlip );
35
use C4::Koha;
36
35
37
my $input = CGI->new;
36
my $input = CGI->new;
38
unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
37
unless ( in_iprange(C4::Context->preference('SelfCheckAllowByIPRanges')) ) {
(-)a/opac/sco/sco-main.pl (-6 / +3 lines)
Lines 35-48 use Modern::Perl; Link Here
35
35
36
use CGI qw ( -utf8 );
36
use CGI qw ( -utf8 );
37
37
38
use C4::Auth qw(get_template_and_user checkpw in_iprange);
38
use C4::Auth qw( in_iprange get_template_and_user checkpw );
39
use C4::Koha;
39
use C4::Circulation qw( AddReturn CanBookBeIssued AddIssue CanBookBeRenewed AddRenewal );
40
use C4::Circulation;
41
use C4::Reserves;
40
use C4::Reserves;
42
use C4::Output;
41
use C4::Output qw( output_html_with_http_headers );
43
use C4::Members;
42
use C4::Members;
44
use C4::Biblio;
45
use C4::Items;
46
use Koha::DateUtils qw( dt_from_string );
43
use Koha::DateUtils qw( dt_from_string );
47
use Koha::Acquisition::Currencies;
44
use Koha::Acquisition::Currencies;
48
use Koha::Items;
45
use Koha::Items;
(-)a/opac/sco/sco-patron-image.pl (-1 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth qw(in_iprange);
21
use C4::Auth qw( in_iprange );
22
use C4::Service;
22
use C4::Service;
23
use C4::Members;
23
use C4::Members;
24
use Koha::Patron::Images;
24
use Koha::Patron::Images;
(-)a/opac/svc/checkout_notes (-2 / +2 lines)
Lines 21-30 use Modern::Perl; Link Here
21
21
22
use JSON qw( encode_json );
22
use JSON qw( encode_json );
23
use C4::Service;
23
use C4::Service;
24
use C4::Auth qw /check_cookie_auth/;
24
use C4::Auth qw( check_cookie_auth get_template_and_user );
25
use C4::Letters;
25
use C4::Letters;
26
use CGI;
26
use CGI;
27
use C4::Output qw(:DEFAULT :ajax);
27
use C4::Output qw( is_ajax output_with_http_headers );
28
use C4::Scrubber;
28
use C4::Scrubber;
29
use C4::Circulation;
29
use C4::Circulation;
30
use C4::Biblio;
30
use C4::Biblio;
(-)a/opac/svc/shelfbrowser.pl (-3 / +3 lines)
Lines 3-12 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI qw ( -utf8 );
4
use CGI qw ( -utf8 );
5
5
6
use C4::Auth;
6
use C4::Auth qw( get_template_and_user );
7
use C4::Context;
7
use C4::Context;
8
use C4::Output;
8
use C4::Output qw( output_html_with_http_headers );
9
use C4::ShelfBrowser;
9
use C4::ShelfBrowser qw( GetNearbyItems );
10
10
11
my $cgi = CGI->new;
11
my $cgi = CGI->new;
12
12
(-)a/opac/tracklinks.pl (-3 / +3 lines)
Lines 20-32 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Context;
22
use C4::Context;
23
use C4::Auth qw(checkauth);
23
use C4::Auth qw( checkauth );
24
use C4::Biblio;
24
use C4::Biblio;
25
use C4::Output;
25
use C4::Output qw( output_error );
26
use Koha::Items;
26
use Koha::Items;
27
use Koha::Linktracker;
27
use Koha::Linktracker;
28
use CGI qw ( -utf8 );
28
use CGI qw ( -utf8 );
29
use List::MoreUtils qw(any);
29
use List::MoreUtils qw( any );
30
30
31
my $cgi = CGI->new;
31
my $cgi = CGI->new;
32
my $uri = $cgi->param('uri') || '';
32
my $uri = $cgi->param('uri') || '';
(-)a/patron_lists/add-modify.pl (-3 / +3 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( AddPatronList GetPatronLists ModPatronList );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patron_lists/delete.pl (-2 / +2 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output;
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( DelPatronList );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patron_lists/list.pl (-4 / +8 lines)
Lines 21-30 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw(
27
use List::MoreUtils qw/uniq/;
27
    AddPatronsToList
28
    DelPatronsFromList
29
    GetPatronLists
30
);
31
use List::MoreUtils qw( uniq );
28
32
29
my $cgi = CGI->new;
33
my $cgi = CGI->new;
30
34
(-)a/patron_lists/lists.pl (-3 / +3 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( GetPatronLists );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patron_lists/patrons.pl (-3 / +3 lines)
Lines 21-29 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::List::Patron;
26
use Koha::List::Patron qw( AddPatronList GetPatronLists ModPatronList );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
29
(-)a/patroncards/add_user_search.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Members;
25
use C4::Members;
26
26
27
use Koha::Patron::Categories;
27
use Koha::Patron::Categories;
(-)a/patroncards/create-pdf.pl (-5 / +5 lines)
Lines 19-35 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use Graphics::Magick;
23
use Graphics::Magick;
24
use XML::Simple;
24
use XML::Simple qw( XMLin );
25
use POSIX qw(ceil);
25
use POSIX qw( ceil );
26
use Storable qw(dclone);
26
use Storable qw( dclone );
27
use autouse 'Data::Dumper' => qw(Dumper);
27
use autouse 'Data::Dumper' => qw(Dumper);
28
28
29
use C4::Context;
29
use C4::Context;
30
use C4::Creators;
30
use C4::Creators;
31
use C4::Patroncards;
31
use C4::Patroncards;
32
use Koha::List::Patron;
32
use Koha::List::Patron qw( GetPatronLists );
33
use Koha::Patrons;
33
use Koha::Patrons;
34
use Koha::Patron::Images;
34
use Koha::Patron::Images;
35
35
(-)a/patroncards/edit-batch.pl (-3 / +3 lines)
Lines 24-32 use Modern::Perl; Link Here
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use autouse 'Data::Dumper' => qw(Dumper);
25
use autouse 'Data::Dumper' => qw(Dumper);
26
26
27
use C4::Auth qw(get_template_and_user);
27
use C4::Auth qw( get_template_and_user );
28
use C4::Output qw(output_html_with_http_headers);
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Creators;
29
use C4::Creators qw( get_card_summary html_table );
30
use C4::Patroncards;
30
use C4::Patroncards;
31
use Koha::Patrons;
31
use Koha::Patrons;
32
32
(-)a/patroncards/edit-layout.pl (-5 / +10 lines)
Lines 21-33 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use Text::CSV_XS;
24
use XML::Simple qw( XMLin XMLout );
25
use XML::Simple;
26
use autouse 'Data::Dumper' => qw(Dumper);
25
use autouse 'Data::Dumper' => qw(Dumper);
27
26
28
use C4::Auth qw(get_template_and_user);
27
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw(output_html_with_http_headers);
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Creators;
29
use C4::Creators qw(
30
    get_all_image_names
31
    get_barcode_types
32
    get_font_types
33
    get_text_justification_types
34
    get_unit_values
35
);
31
use C4::Patroncards;
36
use C4::Patroncards;
32
37
33
my $cgi = CGI->new;
38
my $cgi = CGI->new;
(-)a/patroncards/edit-profile.pl (-3 / +3 lines)
Lines 22-30 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators::Lib qw(get_all_templates get_unit_values);
27
use C4::Creators::Lib qw( get_all_templates get_unit_values );
28
use C4::Patroncards::Profile;
28
use C4::Patroncards::Profile;
29
29
30
my $cgi = CGI->new;
30
my $cgi = CGI->new;
(-)a/patroncards/edit-template.pl (-3 / +3 lines)
Lines 23-31 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use autouse 'Data::Dumper' => qw(Dumper);
24
use autouse 'Data::Dumper' => qw(Dumper);
25
25
26
use C4::Auth qw(get_template_and_user);
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw(output_html_with_http_headers);
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators;
28
use C4::Creators qw( get_all_profiles get_unit_values );
29
use C4::Patroncards;
29
use C4::Patroncards;
30
30
31
my $cgi = CGI->new;
31
my $cgi = CGI->new;
(-)a/patroncards/home.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
22
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
24
25
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
27
27
28
my $cgi = CGI->new;
28
my $cgi = CGI->new;
29
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
29
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/patroncards/image-manage.pl (-5 / +4 lines)
Lines 4-16 use Modern::Perl; Link Here
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
use Graphics::Magick;
6
use Graphics::Magick;
7
use POSIX qw(ceil);
8
7
9
use C4::Context;
8
use C4::Context;
10
use C4::Auth;
9
use C4::Auth qw( get_template_and_user );
11
use C4::Output;
10
use C4::Output qw( output_html_with_http_headers );
12
use C4::Creators;
11
use C4::Creators qw( html_table );
13
use C4::Patroncards;
12
use C4::Patroncards qw( get_image put_image rm_image );
14
13
15
my $cgi = CGI->new;
14
my $cgi = CGI->new;
16
15
(-)a/patroncards/manage.pl (-5 / +10 lines)
Lines 23-34 use Modern::Perl; Link Here
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use autouse 'Data::Dumper' => qw(Dumper);
24
use autouse 'Data::Dumper' => qw(Dumper);
25
25
26
use C4::Auth qw(get_template_and_user);
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output qw(output_html_with_http_headers);
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Creators;
28
use C4::Creators qw(
29
use C4::Patroncards;
29
    get_all_layouts
30
    get_all_profiles
31
    get_all_templates
32
    get_batch_summary
33
    html_table
34
);
30
use C4::Labels;
35
use C4::Labels;
31
use Koha::List::Patron;
36
use Koha::List::Patron qw( GetPatronLists );
32
37
33
my $cgi = CGI->new;
38
my $cgi = CGI->new;
34
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/patroncards/print.pl (-4 / +3 lines)
Lines 22-31 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use autouse 'Data::Dumper' => qw(Dumper);
23
use autouse 'Data::Dumper' => qw(Dumper);
24
24
25
use C4::Auth qw(get_template_and_user);
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output qw(output_html_with_http_headers);
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Creators;
27
use C4::Creators qw( get_all_layouts get_all_templates get_output_formats );
28
use C4::Patroncards;
29
28
30
my $cgi = CGI->new;
29
my $cgi = CGI->new;
31
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
30
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/plugins/plugins-enable.pl (-1 / +1 lines)
Lines 20-26 use Modern::Perl; Link Here
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
21
22
use C4::Context;
22
use C4::Context;
23
use C4::Auth qw(check_cookie_auth);
23
use C4::Auth qw( check_cookie_auth );
24
use Koha::Plugins::Handler;
24
use Koha::Plugins::Handler;
25
25
26
die("Koha plugins are disabled!") unless C4::Context->config("enable_plugins");
26
die("Koha plugins are disabled!") unless C4::Context->config("enable_plugins");
(-)a/plugins/plugins-home.pl (-4 / +4 lines)
Lines 21-32 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use JSON qw(from_json);
24
use JSON qw( from_json );
25
use LWP::Simple qw(get);
25
use LWP::Simple qw( get );
26
26
27
use Koha::Plugins;
27
use Koha::Plugins;
28
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
use C4::Context;
30
use C4::Context;
31
31
32
my $plugins_enabled = C4::Context->config("enable_plugins");
32
my $plugins_enabled = C4::Context->config("enable_plugins");
(-)a/plugins/plugins-uninstall.pl (-3 / +1 lines)
Lines 18-29 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Archive::Extract;
20
use Archive::Extract;
21
use File::Temp;
22
use File::Copy;
23
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
24
22
25
use C4::Context;
23
use C4::Context;
26
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
27
use C4::Output;
25
use C4::Output;
28
use C4::Members;
26
use C4::Members;
29
use Koha::Plugins::Handler;
27
use Koha::Plugins::Handler;
(-)a/plugins/plugins-upload.pl (-3 / +2 lines)
Lines 21-32 use Modern::Perl; Link Here
21
use Archive::Extract;
21
use Archive::Extract;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Mojo::UserAgent;
23
use Mojo::UserAgent;
24
use File::Copy;
25
use File::Temp;
24
use File::Temp;
26
25
27
use C4::Context;
26
use C4::Context;
28
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
29
use C4::Output;
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::Members;
29
use C4::Members;
31
use Koha::Logger;
30
use Koha::Logger;
32
use Koha::Plugins;
31
use Koha::Plugins;
(-)a/plugins/run.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use Koha::Plugins::Handler;
24
use Koha::Plugins::Handler;
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
27
use C4::Context;
28
28
29
my $plugins_enabled = C4::Context->config("enable_plugins");
29
my $plugins_enabled = C4::Context->config("enable_plugins");
(-)a/pos/pay.pl (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use CGI;
22
use CGI;
23
use JSON qw( from_json );
23
use JSON qw( from_json );
24
24
25
use C4::Auth qw/:DEFAULT get_session/;
25
use C4::Auth qw( get_session get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Context;
27
use C4::Context;
28
28
29
use Koha::Account::DebitTypes;
29
use Koha::Account::DebitTypes;
(-)a/pos/printreceipt.pl (-4 / +2 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Auth qw/:DEFAULT get_session/;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_and_exit_if_error output_and_exit output_html_with_http_headers );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use C4::Letters;
26
use Koha::Account::Lines;
25
use Koha::Account::Lines;
27
use Koha::DateUtils;
28
use Koha::Notice::Templates;
26
use Koha::Notice::Templates;
29
27
30
my $input = CGI->new;
28
my $input = CGI->new;
(-)a/pos/register.pl (-3 / +3 lines)
Lines 19-32 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
25
25
26
use Koha::Account::Lines;
26
use Koha::Account::Lines;
27
use Koha::Cash::Registers;
27
use Koha::Cash::Registers;
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
30
31
my $input = CGI->new();
31
my $input = CGI->new();
32
32
(-)a/pos/registers.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Context;
24
use C4::Context;
25
25
26
use Koha::Cash::Registers;
26
use Koha::Cash::Registers;
(-)a/reports/acquisitions_stats.pl (-7 / +6 lines)
Lines 19-34 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Reports;
25
use C4::Reports qw( GetDelimiterChoices );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Koha;
27
use C4::Koha qw( GetAuthorisedValues );
28
use C4::Circulation;
28
use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField );
29
use C4::Biblio;
30
use Koha::ItemTypes;
29
use Koha::ItemTypes;
31
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Libraries;
31
use Koha::Libraries;
33
32
34
=head1 NAME
33
=head1 NAME
(-)a/reports/bor_issues_top.pl (-9 / +5 lines)
Lines 20-34 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Reports qw( GetDelimiterChoices );
27
use C4::Circulation;
28
use C4::Members;
29
use C4::Reports;
30
27
31
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::ItemTypes;
29
use Koha::ItemTypes;
33
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
34
31
Lines 286-293 sub calculate { Link Here
286
		$patrons{$id}->{oldcols}->{$col} = $rank;
283
		$patrons{$id}->{oldcols}->{$col} = $rank;
287
    }
284
    }
288
285
289
	use Data::Dumper;
286
	
290
291
	$strcalc =~ s/old_issues/issues/g;
287
	$strcalc =~ s/old_issues/issues/g;
292
    $dbcalc = $dbh->prepare($strcalc);
288
    $dbcalc = $dbh->prepare($strcalc);
293
    $dbcalc->execute;
289
    $dbcalc->execute;
(-)a/reports/borrowers_out.pl (-7 / +4 lines)
Lines 20-34 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Koha;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Output;
26
use C4::Reports qw( GetDelimiterChoices );
27
use C4::Circulation;
28
use C4::Reports;
29
use C4::Members;
30
27
31
use Koha::DateUtils;
28
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::Patron::Categories;
29
use Koha::Patron::Categories;
33
30
34
=head1 NAME
31
=head1 NAME
(-)a/reports/borrowers_stats.pl (-12 / +6 lines)
Lines 19-44 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use List::MoreUtils qw/uniq/;
23
22
24
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
24
use C4::Context;
26
use C4::Koha;
25
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Acquisition;
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output;
27
use C4::Reports qw( GetDelimiterChoices );
29
use C4::Reports;
30
use C4::Circulation;
31
28
32
use Koha::AuthorisedValues;
29
use Koha::AuthorisedValues;
33
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::Libraries;
31
use Koha::Libraries;
35
use Koha::Patron::Attribute::Types;
32
use Koha::Patron::Attribute::Types;
36
use Koha::Patron::Categories;
33
use Koha::Patron::Categories;
37
34
38
use Date::Calc qw(
35
use Date::Calc qw( Add_Delta_YM Today );
39
  Today
40
  Add_Delta_YM
41
  );
42
36
43
=head1 NAME
37
=head1 NAME
44
38
(-)a/reports/cash_register_stats.pl (-7 / +5 lines)
Lines 16-32 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use C4::Auth;
19
use C4::Auth qw( get_template_and_user );
20
use CGI;
20
use CGI;
21
use C4::Context;
21
use C4::Context;
22
use C4::Reports;
22
use C4::Reports qw( GetDelimiterChoices );
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Koha;
25
use C4::Circulation;
26
use DateTime;
24
use DateTime;
27
use Koha::DateUtils;
25
use Koha::DateUtils qw( dt_from_string output_pref );
28
use Text::CSV::Encoded;
26
use Text::CSV::Encoded;
29
use List::Util qw/any/;
27
use List::Util qw( any );
30
28
31
use Koha::Account::CreditTypes;
29
use Koha::Account::CreditTypes;
32
use Koha::Account::DebitTypes;
30
use Koha::Account::DebitTypes;
(-)a/reports/cat_issues_top.pl (-7 / +5 lines)
Lines 19-33 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Koha;
26
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Circulation;
27
use C4::Reports qw( GetDelimiterChoices );
28
use C4::Reports;
28
use Koha::DateUtils qw( dt_from_string output_pref );
29
use C4::Members;
30
use Koha::DateUtils;
31
use Koha::ItemTypes;
29
use Koha::ItemTypes;
32
30
33
=head1 NAME
31
=head1 NAME
(-)a/reports/catalogue_out.pl (-3 / +2 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
# use Date::Manip;  # TODO: add not borrowed since date X criteria
26
# use Date::Manip;  # TODO: add not borrowed since date X criteria
27
use Data::Dumper;
28
27
29
=head1 catalogue_out
28
=head1 catalogue_out
30
29
(-)a/reports/catalogue_stats.pl (-7 / +6 lines)
Lines 19-35 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Koha;
26
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Reports;
27
use C4::Reports qw( GetDelimiterChoices );
28
use C4::Circulation;
28
use C4::Biblio qw( GetMarcSubfieldStructureFromKohaField );
29
use C4::Biblio qw/GetMarcSubfieldStructureFromKohaField/;
30
29
31
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
32
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string );
33
use Koha::ItemTypes;
32
use Koha::ItemTypes;
34
33
35
=head1 NAME
34
=head1 NAME
(-)a/reports/dictionary.pl (-5 / +4 lines)
Lines 16-28 Link Here
16
#
16
#
17
# You should have received a copy of the GNU General Public License
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
20
use Modern::Perl;
19
use Modern::Perl;
21
use C4::Auth;
20
use C4::Auth qw( get_template_and_user );
22
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
23
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
24
use C4::Reports::Guided;
23
use C4::Reports::Guided qw( get_from_dictionary get_columns get_column_type get_distinct_values save_dictionary delete_definition get_report_areas );
25
use Koha::DateUtils;
24
use Koha::DateUtils qw( dt_from_string output_pref );
26
25
27
=head1 NAME
26
=head1 NAME
28
27
(-)a/reports/guided_reports.pl (-6 / +6 lines)
Lines 23-43 use Text::CSV::Encoded; Link Here
23
use Encode qw( decode );
23
use Encode qw( decode );
24
use URI::Escape;
24
use URI::Escape;
25
use File::Temp;
25
use File::Temp;
26
use C4::Reports::Guided;
26
use C4::Reports::Guided qw( delete_report get_report_areas convert_sql update_sql get_saved_reports get_results ValidateSQLParameters format_results get_report_types get_columns get_from_dictionary get_criteria build_query save_report execute_query nb_rows get_report_groups );
27
use Koha::Reports;
27
use Koha::Reports;
28
use C4::Auth qw/:DEFAULT get_session/;
28
use C4::Auth qw( get_template_and_user get_session );
29
use C4::Output;
29
use C4::Output qw( pagination_bar output_html_with_http_headers );
30
use C4::Context;
30
use C4::Context;
31
use Koha::Caches;
31
use Koha::Caches;
32
use C4::Log;
32
use C4::Log qw( logaction );
33
use Koha::DateUtils qw/dt_from_string output_pref/;
33
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::AuthorisedValue;
34
use Koha::AuthorisedValue;
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
36
use Koha::BiblioFrameworks;
36
use Koha::BiblioFrameworks;
37
use Koha::Libraries;
37
use Koha::Libraries;
38
use Koha::Patron::Categories;
38
use Koha::Patron::Categories;
39
use Koha::SharedContent;
39
use Koha::SharedContent;
40
use Koha::Util::OpenDocument;
40
use Koha::Util::OpenDocument qw( generate_ods );
41
41
42
=head1 NAME
42
=head1 NAME
43
43
(-)a/reports/issues_avg_stats.pl (-7 / +5 lines)
Lines 19-35 Link Here
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Koha;
26
use C4::Reports qw( GetDelimiterChoices );
27
use C4::Circulation;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
use C4::Reports;
29
use Koha::DateUtils;
30
use Koha::ItemTypes;
28
use Koha::ItemTypes;
31
use Koha::Patron::Categories;
29
use Koha::Patron::Categories;
32
use Date::Calc qw(Delta_Days);
30
use Date::Calc qw( Delta_Days );
33
31
34
=head1 NAME
32
=head1 NAME
35
33
(-)a/reports/issues_stats.pl (-8 / +5 lines)
Lines 20-37 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Date::Manip;
24
23
25
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
26
use C4::Context;
25
use C4::Context;
27
use C4::Koha;
26
use C4::Koha qw( GetAuthorisedValues );
28
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
29
use C4::Circulation;
28
use C4::Reports qw( GetDelimiterChoices );
30
use C4::Reports;
31
use C4::Members;
32
29
33
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
34
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string output_pref );
35
use Koha::ItemTypes;
32
use Koha::ItemTypes;
36
use Koha::Patron::Attribute::Types;
33
use Koha::Patron::Attribute::Types;
37
34
(-)a/reports/itemslost.pl (-5 / +2 lines)
Lines 29-42 use Modern::Perl; Link Here
29
29
30
use CGI qw ( -utf8 );
30
use CGI qw ( -utf8 );
31
use Text::CSV_XS;
31
use Text::CSV_XS;
32
use C4::Auth;
32
use C4::Auth qw( get_template_and_user );
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers );
34
use C4::Biblio;
35
use C4::Items;
36
34
37
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
38
use Koha::CsvProfiles;
36
use Koha::CsvProfiles;
39
use Koha::DateUtils;
40
37
41
my $query = CGI->new;
38
my $query = CGI->new;
42
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/reports/manager.pl (-3 / +2 lines)
Lines 19-28 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Circulation;
26
25
27
26
28
my $input = CGI->new;
27
my $input = CGI->new;
(-)a/reports/orders_by_fund.pl (-7 / +5 lines)
Lines 28-41 This script displays all orders associated to a selected budget. Link Here
28
use Modern::Perl;
28
use Modern::Perl;
29
29
30
use CGI qw( -utf8 );
30
use CGI qw( -utf8 );
31
use C4::Auth;
31
use C4::Auth qw( get_template_and_user );
32
use C4::Output;
32
use C4::Output qw( output_html_with_http_headers );
33
use C4::Budgets;
33
use C4::Budgets qw( GetBudgetsReport GetBudgetHierarchy );
34
use C4::Biblio;
34
use C4::Acquisition qw( GetBasket get_rounded_price );
35
use C4::Reports;
36
use C4::Acquisition; #GetBasket()
37
use Koha::Biblios;
35
use Koha::Biblios;
38
use Koha::DateUtils;
36
use Koha::DateUtils qw( dt_from_string output_pref );
39
37
40
my $query = CGI->new;
38
my $query = CGI->new;
41
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
39
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/reports/reports-home.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Context;
25
use C4::Context;
26
26
27
27
(-)a/reports/reserves_stats.pl (-6 / +6 lines)
Lines 21-38 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Reports;
28
use C4::Reports qw( GetDelimiterChoices );
29
use C4::Members;
29
use C4::Members;
30
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
31
use Koha::DateUtils;
31
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
33
use Koha::Libraries;
33
use Koha::Libraries;
34
use Koha::Patron::Categories;
34
use Koha::Patron::Categories;
35
use List::MoreUtils qw/any/;
35
use List::MoreUtils qw( any );
36
36
37
=head1 NAME
37
=head1 NAME
38
38
(-)a/reports/serials_stats.pl (-5 / +4 lines)
Lines 18-30 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Koha;
25
use C4::Reports qw( GetDelimiterChoices );
26
use C4::Reports;
26
use C4::Serials qw( GetExpirationDate HasSubscriptionExpired );
27
use C4::Serials;
28
27
29
=head1 serials_out
28
=head1 serials_out
30
29
(-)a/reserve/modrequest.pl (-2 / +2 lines)
Lines 26-33 use Modern::Perl; Link Here
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use List::MoreUtils qw( uniq );
27
use List::MoreUtils qw( uniq );
28
use C4::Output;
28
use C4::Output;
29
use C4::Reserves;
29
use C4::Reserves qw( ModReserve ModReserveCancelAll );
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use Koha::DateUtils qw( dt_from_string );
31
use Koha::DateUtils qw( dt_from_string );
32
32
33
my $query = CGI->new;
33
my $query = CGI->new;
(-)a/reserve/modrequest_suspendall.pl (-2 / +2 lines)
Lines 25-32 Link Here
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Output;
27
use C4::Output;
28
use C4::Reserves;
28
use C4::Reserves qw( SuspendAll );
29
use C4::Auth;
29
use C4::Auth qw( get_template_and_user );
30
30
31
my $query = CGI->new;
31
my $query = CGI->new;
32
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
32
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
(-)a/reserve/placerequest.pl (-7 / +2 lines)
Lines 24-36 Link Here
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Biblio;
27
use C4::Reserves qw( CanItemBeReserved AddReserve CanBookBeReserved );
28
use C4::Items;
28
use C4::Auth qw( checkauth );
29
use C4::Output;
30
use C4::Reserves;
31
use C4::Circulation;
32
use C4::Members;
33
use C4::Auth qw/checkauth/;
34
29
35
use Koha::Items;
30
use Koha::Items;
36
use Koha::Patrons;
31
use Koha::Patrons;
(-)a/reserve/request.pl (-14 / +12 lines)
Lines 29-51 script to place reserves/requests Link Here
29
use Modern::Perl;
29
use Modern::Perl;
30
30
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
use List::MoreUtils qw/uniq/;
32
use List::MoreUtils qw( uniq );
33
use Date::Calc qw/Date_to_Days/;
33
use Date::Calc qw( Date_to_Days );
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Auth;
35
use C4::Auth qw( get_template_and_user );
36
use C4::Reserves;
36
use C4::Reserves qw( RevertWaitingStatus AlterPriority ToggleLowestPriority ToggleSuspend CanBookBeReserved GetMaxPatronHoldsForRecord ItemsAnyAvailableAndNotRestricted CanItemBeReserved IsAvailableForItemLevelRequest );
37
use C4::Biblio;
37
use C4::Items qw( get_hostitemnumbers_of );
38
use C4::Items;
38
use C4::Koha qw( getitemtypeimagelocation );
39
use C4::Koha;
39
use C4::Serials qw( CountSubscriptionFromBiblionumber );
40
use C4::Serials;
40
use C4::Circulation qw( GetTransfers _GetCircControlBranch GetBranchItemRule );
41
use C4::Circulation;
41
use Koha::DateUtils qw( dt_from_string output_pref );
42
use Koha::DateUtils;
43
use C4::Utils::DataTables::Members;
42
use C4::Utils::DataTables::Members;
44
use C4::Members;
43
use C4::Search qw( enabled_staff_search_views );
45
use C4::Search;		# enabled_staff_search_views
46
44
47
use Koha::Biblios;
45
use Koha::Biblios;
48
use Koha::DateUtils;
46
use Koha::DateUtils qw( dt_from_string output_pref );
49
use Koha::Checkouts;
47
use Koha::Checkouts;
50
use Koha::Holds;
48
use Koha::Holds;
51
use Koha::CirculationRules;
49
use Koha::CirculationRules;
(-)a/reviews/reviewswaiting.pl (-3 / +2 lines)
Lines 18-27 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( pagination_bar output_html_with_http_headers );
23
use C4::Context;
23
use C4::Context;
24
use C4::Biblio;
25
use Koha::Biblios;
24
use Koha::Biblios;
26
use Koha::Patrons;
25
use Koha::Patrons;
27
use Koha::Reviews;
26
use Koha::Reviews;
(-)a/rotating_collections/addItems.pl (-3 / +2 lines)
Lines 18-28 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use C4::Output;
21
use C4::Output qw( output_html_with_http_headers );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
24
use C4::RotatingCollections;
24
use C4::RotatingCollections;
25
use C4::Items;
26
25
27
use Koha::Items;
26
use Koha::Items;
28
27
(-)a/rotating_collections/editCollections.pl (-2 / +2 lines)
Lines 20-27 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
26
27
use C4::RotatingCollections;
27
use C4::RotatingCollections;
(-)a/rotating_collections/rotatingCollections.pl (-2 / +2 lines)
Lines 20-27 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Context;
25
use C4::Context;
26
use C4::RotatingCollections;
26
use C4::RotatingCollections;
27
27
(-)a/rotating_collections/transferCollection.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
use C4::Output;
21
use C4::Output qw( output_html_with_http_headers );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Context;
23
use C4::Context;
24
use C4::RotatingCollections;
24
use C4::RotatingCollections;
25
25
(-)a/serials/acqui-search-result.pl (-4 / +3 lines)
Lines 41-52 acqui-search-result.pl Link Here
41
41
42
42
43
use Modern::Perl;
43
use Modern::Perl;
44
use C4::Auth;
44
use C4::Auth qw( get_template_and_user );
45
use C4::Biblio;
45
use C4::Output qw( output_html_with_http_headers );
46
use C4::Output;
47
use CGI qw ( -utf8 );
46
use CGI qw ( -utf8 );
48
use C4::Acquisition qw( SearchOrders );
47
use C4::Acquisition qw( SearchOrders );
49
use Koha::DateUtils;
48
use Koha::DateUtils qw( output_pref );
50
49
51
use Koha::Acquisition::Booksellers;
50
use Koha::Acquisition::Booksellers;
52
51
(-)a/serials/acqui-search.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
27
27
(-)a/serials/add_user_search.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Members;
25
use C4::Members;
26
26
27
use Koha::Patron::Categories;
27
use Koha::Patron::Categories;
(-)a/serials/checkexpiration.pl (-4 / +4 lines)
Lines 44-54 The date to filter on. Link Here
44
44
45
use Modern::Perl;
45
use Modern::Perl;
46
use CGI qw ( -utf8 );
46
use CGI qw ( -utf8 );
47
use C4::Auth;
47
use C4::Auth qw( get_template_and_user );
48
use C4::Serials; # GetExpirationDate
48
use C4::Serials qw( SearchSubscriptions GetExpirationDate );
49
use C4::Output;
49
use C4::Output qw( output_html_with_http_headers );
50
use C4::Context;
50
use C4::Context;
51
use Koha::DateUtils;
51
use Koha::DateUtils qw( dt_from_string );
52
52
53
use DateTime;
53
use DateTime;
54
54
(-)a/serials/claims.pl (-6 / +4 lines)
Lines 19-31 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Serials;
23
use C4::Serials qw( GetSuppliersWithLateIssues GetLateOrMissingIssues updateClaim can_claim_subscription );
24
use C4::Acquisition;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output;
26
use C4::Context;
25
use C4::Context;
27
use C4::Letters;
26
use C4::Letters qw( GetLetters SendAlerts );
28
use C4::Koha qw( GetAuthorisedValues );
29
27
30
use Koha::AdditionalFields;
28
use Koha::AdditionalFields;
31
use Koha::CsvProfiles;
29
use Koha::CsvProfiles;
(-)a/serials/create-numberpattern.pl (-3 / +5 lines)
Lines 20-28 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Serials::Numberpattern;
23
use C4::Serials::Numberpattern qw(
24
use C4::Auth qw/check_cookie_auth/;
24
    AddSubscriptionNumberpattern
25
use URI::Escape;
25
    ModSubscriptionNumberpattern
26
);
27
use C4::Auth qw( check_cookie_auth );
26
28
27
my $input = CGI->new;
29
my $input = CGI->new;
28
30
(-)a/serials/lateissues-export.pl (-2 / +1 lines)
Lines 18-25 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use C4::Auth;
20
use C4::Auth;
21
use C4::Serials;
21
use C4::Serials qw( GetLateOrMissingIssues updateClaim );
22
use C4::Acquisition;
23
use C4::Output;
22
use C4::Output;
24
use C4::Context;
23
use C4::Context;
25
24
(-)a/serials/routing-preview.pl (-9 / +5 lines)
Lines 21-36 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Koha;
23
use C4::Koha;
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Acquisition;
26
use C4::Reserves qw( AddReserve ModReserve );
27
use C4::Reserves;
28
use C4::Circulation;
29
use C4::Context;
27
use C4::Context;
30
use C4::Members;
28
use C4::Items qw( GetItemsInfo );
31
use C4::Biblio;
29
use C4::Serials qw( delroutingmember getroutinglist GetSubscription GetSerials check_routing );
32
use C4::Items;
33
use C4::Serials;
34
use URI::Escape;
30
use URI::Escape;
35
31
36
use Koha::Biblios;
32
use Koha::Biblios;
(-)a/serials/routing.pl (-6 / +3 lines)
Lines 28-41 printed out Link Here
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use C4::Koha;
30
use C4::Koha;
31
use C4::Auth;
31
use C4::Auth qw( get_template_and_user );
32
use C4::Output;
32
use C4::Output qw( output_and_exit output_html_with_http_headers );
33
use C4::Acquisition;
34
use C4::Output;
35
use C4::Context;
33
use C4::Context;
36
34
37
use C4::Members;
35
use C4::Serials qw( GetSubscription delroutingmember addroutingmember getroutinglist GetSerials GetLatestSerials check_routing );
38
use C4::Serials;
39
use Koha::Patrons;
36
use Koha::Patrons;
40
37
41
use URI::Escape;
38
use URI::Escape;
(-)a/serials/serials-collection.pl (-6 / +4 lines)
Lines 21-37 Link Here
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
25
use C4::Serials qw( ModSerialStatus GetSubscription GetNextExpected GetNextSeq GetNextDate NewIssue HasSubscriptionExpired abouttoexpire check_routing GetFullSubscription PrepareSerialsData CountSubscriptionFromBiblionumber GetSubscriptionsFromBiblionumber GetFullSubscriptionsFromBiblionumber );
26
use C4::Serials;
26
use C4::Output qw( output_and_exit output_html_with_http_headers );
27
use C4::Letters;
28
use C4::Output;
29
use C4::Context;
27
use C4::Context;
30
use Koha::Serial::Items;
28
use Koha::Serial::Items;
31
29
32
use Koha::DateUtils qw( dt_from_string );
30
use Koha::DateUtils qw( dt_from_string );
33
31
34
use List::MoreUtils qw/uniq/;
32
use List::MoreUtils qw( uniq );
35
33
36
34
37
my $query = CGI->new;
35
my $query = CGI->new;
(-)a/serials/serials-edit.pl (-10 / +9 lines)
Lines 63-83 op can be : Link Here
63
63
64
use Modern::Perl;
64
use Modern::Perl;
65
use CGI qw ( -utf8 );
65
use CGI qw ( -utf8 );
66
use Encode qw( decode is_utf8 );
66
use Encode;
67
use C4::Auth;
67
use C4::Auth qw( get_template_and_user haspermission );
68
use C4::Biblio;
68
use C4::Biblio qw( GetMarcFromKohaField TransformHtmlToXml );
69
use C4::Items;
69
use C4::Items qw( AddItemFromMarc ModItemFromMarc PrepareItemrecordDisplay );
70
use C4::Koha;
70
use C4::Output qw( output_html_with_http_headers );
71
use C4::Output;
72
use C4::Context;
71
use C4::Context;
73
use C4::Serials;
72
use C4::Serials qw( GetSerials GetSerials2 GetSerialInformation HasSubscriptionExpired GetSubscription abouttoexpire NewIssue ModSerialStatus GetPreviousSerialid AddItem2Serial );
74
use C4::Search qw/enabled_staff_search_views/;
73
use C4::Search qw( enabled_staff_search_views );
75
74
76
use Koha::DateUtils;
75
use Koha::DateUtils qw( dt_from_string output_pref );
77
use Koha::Items;
76
use Koha::Items;
78
use Koha::Serial::Items;
77
use Koha::Serial::Items;
79
78
80
use List::MoreUtils qw/uniq/;
79
use List::MoreUtils qw( uniq );
81
80
82
my $query           = CGI->new();
81
my $query           = CGI->new();
83
my $dbh             = C4::Context->dbh;
82
my $dbh             = C4::Context->dbh;
(-)a/serials/serials-home.pl (-2 / +2 lines)
Lines 30-38 this script is the main page for serials/ Link Here
30
30
31
use Modern::Perl;
31
use Modern::Perl;
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Context;
34
use C4::Context;
35
use C4::Output;
35
use C4::Output qw( output_html_with_http_headers );
36
use C4::Serials;
36
use C4::Serials;
37
37
38
my $query   = CGI->new;
38
my $query   = CGI->new;
(-)a/serials/serials-search.pl (-5 / +4 lines)
Lines 30-43 this script is the search page for serials Link Here
30
30
31
use Modern::Perl;
31
use Modern::Perl;
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Context;
34
use C4::Context;
35
use C4::Koha qw( GetAuthorisedValues );
35
use C4::Output qw( output_html_with_http_headers );
36
use C4::Output;
36
use C4::Serials qw( CloseSubscription ReopenSubscription SearchSubscriptions check_routing );
37
use C4::Serials;
38
use Koha::AdditionalFields;
37
use Koha::AdditionalFields;
39
38
40
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string );
41
use Koha::SharedContent;
40
use Koha::SharedContent;
42
41
43
my $query         = CGI->new;
42
my $query         = CGI->new;
(-)a/serials/showpredictionpattern.pl (-5 / +5 lines)
Lines 31-42 publication date, based on frequency and first publication date. Link Here
31
use Modern::Perl;
31
use Modern::Perl;
32
32
33
use CGI qw ( -utf8 );
33
use CGI qw ( -utf8 );
34
use Date::Calc qw(Today Day_of_Year Week_of_Year Day_of_Week Days_in_Year Delta_Days Add_Delta_Days Add_Delta_YM);
34
use Date::Calc qw( Add_Delta_Days Add_Delta_YM Day_of_Week Delta_Days );
35
use C4::Auth;
35
use C4::Auth qw( get_template_and_user );
36
use C4::Output;
36
use C4::Output qw( output_html_with_http_headers );
37
use C4::Serials;
37
use C4::Serials qw( GetSubscription GetFictiveIssueNumber GetSeq GetSubscriptionIrregularities GetNextDate GetNextSeq );
38
use C4::Serials::Frequency;
38
use C4::Serials::Frequency;
39
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
40
40
41
my $input = CGI->new;
41
my $input = CGI->new;
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/serials/subscription-add.pl (-10 / +9 lines)
Lines 18-39 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Date::Calc qw(Today Day_of_Year Week_of_Year Add_Delta_Days Add_Delta_YM);
21
use Date::Calc qw( Add_Delta_Days Add_Delta_YM );
22
use C4::Koha;
22
use C4::Koha qw( GetAuthorisedValues );
23
use C4::Biblio;
23
use C4::Biblio qw( GetMarcBiblio );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Acquisition;
25
use C4::Output qw( output_and_exit output_html_with_http_headers );
26
use C4::Output;
27
use C4::Context;
26
use C4::Context;
28
use C4::Serials;
27
use C4::Serials qw( GetSubscription GetNextExpected GetSerials GetSubscriptionLength NewSubscription ModNextExpected ModSubscription );
29
use C4::Serials::Frequency;
28
use C4::Serials::Frequency;
30
use C4::Serials::Numberpattern;
29
use C4::Serials::Numberpattern;
31
use C4::Letters;
30
use C4::Letters qw( GetLetters );
32
use Koha::AdditionalFields;
31
use Koha::AdditionalFields;
33
use Koha::Biblios;
32
use Koha::Biblios;
34
use Koha::DateUtils;
33
use Koha::DateUtils qw( output_pref );
35
use Koha::ItemTypes;
34
use Koha::ItemTypes;
36
use Carp;
35
use Carp qw( carp );
37
36
38
use Koha::Subscription::Numberpattern;
37
use Koha::Subscription::Numberpattern;
39
use Koha::Subscription::Frequency;
38
use Koha::Subscription::Frequency;
(-)a/serials/subscription-batchedit.pl (-4 / +4 lines)
Lines 21-33 use Modern::Perl; Link Here
21
21
22
use CGI qw( -utf8 );
22
use CGI qw( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use C4::Serials;
26
use C4::Serials qw( can_edit_subscription );
27
use Koha::Subscriptions;
27
use Koha::Subscriptions;
28
use Koha::Acquisition::Booksellers;
28
use Koha::Acquisition::Booksellers;
29
use Koha::AdditionalFields;
29
use Koha::AdditionalFields;
30
use Koha::DateUtils;
30
use Koha::DateUtils qw( dt_from_string );
31
31
32
my $cgi = CGI->new;
32
my $cgi = CGI->new;
33
33
(-)a/serials/subscription-bib-search.pl (-5 / +5 lines)
Lines 49-60 to multipage gestion. Link Here
49
use Modern::Perl;
49
use Modern::Perl;
50
50
51
use CGI qw ( -utf8 );
51
use CGI qw ( -utf8 );
52
use C4::Koha;
52
use C4::Koha qw( GetAuthorisedValues );
53
use C4::Auth;
53
use C4::Auth qw( get_template_and_user );
54
use C4::Context;
54
use C4::Context;
55
use C4::Output;
55
use C4::Output qw( output_html_with_http_headers );
56
use C4::Search;
56
use C4::Search qw( new_record_from_zebra );
57
use C4::Biblio;
57
use C4::Biblio qw( TransformMarcToKoha );
58
58
59
use Koha::ItemTypes;
59
use Koha::ItemTypes;
60
use Koha::SearchEngine;
60
use Koha::SearchEngine;
(-)a/serials/subscription-detail.pl (-10 / +6 lines)
Lines 17-39 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use CGI qw ( -utf8 );
19
use CGI qw ( -utf8 );
20
use C4::Acquisition;
20
use C4::Auth qw( get_template_and_user checkauth );
21
use C4::Auth;
21
use C4::Serials qw( CloseSubscription ReopenSubscription GetSubscription GetExpirationDate GetSerials HasSubscriptionStrictlyExpired CountIssues HasItems DelSubscription check_routing abouttoexpire can_edit_subscription );
22
use C4::Budgets;
22
use C4::Output qw( output_and_exit output_html_with_http_headers );
23
use C4::Koha;
24
use C4::Serials;
25
use C4::Output;
26
use C4::Context;
23
use C4::Context;
27
use C4::Search qw/enabled_staff_search_views/;
24
use C4::Search qw( enabled_staff_search_views );
28
25
29
use Koha::AdditionalFields;
26
use Koha::AdditionalFields;
30
use Koha::AuthorisedValues;
27
use Koha::AuthorisedValues;
31
use Koha::DateUtils;
28
use Koha::DateUtils qw( output_pref );
32
use Koha::Acquisition::Bookseller;
29
use Koha::Acquisition::Bookseller;
33
use Koha::Subscriptions;
30
use Koha::Subscriptions;
34
31
35
use Date::Calc qw/Today Day_of_Year Week_of_Year Add_Delta_Days/;
32
use Carp qw( carp );
36
use Carp;
37
33
38
use Koha::SharedContent;
34
use Koha::SharedContent;
39
35
(-)a/serials/subscription-frequencies.pl (-3 / +3 lines)
Lines 31-39 use Modern::Perl; Link Here
31
31
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
33
34
use C4::Auth;
34
use C4::Auth qw( get_template_and_user );
35
use C4::Output;
35
use C4::Output qw( output_html_with_http_headers );
36
use C4::Serials;
36
use C4::Serials qw( GetSubscription ModSubscription DelSubscription );
37
use C4::Serials::Frequency;
37
use C4::Serials::Frequency;
38
38
39
my $input = CGI->new;
39
my $input = CGI->new;
(-)a/serials/subscription-frequency.pl (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Serials::Frequency;
23
use C4::Serials::Frequency qw( GetSubscriptionFrequency );
24
use C4::Auth qw/check_cookie_auth/;
24
use C4::Auth qw( check_cookie_auth );
25
use JSON qw( to_json );
25
use JSON qw( to_json );
26
26
27
my $input=CGI->new;
27
my $input=CGI->new;
(-)a/serials/subscription-history.pl (-5 / +4 lines)
Lines 30-42 Modify subscription history Link Here
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
35
36
use C4::Biblio;
36
use C4::Serials qw( ModSubscriptionHistory ModSubscription GetSubscriptionHistoryFromSubscriptionId GetSubscription );
37
use C4::Serials;
38
use Koha::Biblios;
37
use Koha::Biblios;
39
use Koha::DateUtils;
38
use Koha::DateUtils qw( output_pref );
40
39
41
my $input = CGI->new;
40
my $input = CGI->new;
42
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
41
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/serials/subscription-numberpattern.pl (-2 / +2 lines)
Lines 19-26 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Serials::Numberpattern;
22
use C4::Serials::Numberpattern qw( GetSubscriptionNumberpattern );
23
use C4::Auth qw/check_cookie_auth/;
23
use C4::Auth qw( check_cookie_auth );
24
use JSON qw( to_json );
24
use JSON qw( to_json );
25
25
26
my $input=CGI->new;
26
my $input=CGI->new;
(-)a/serials/subscription-numberpatterns.pl (-4 / +12 lines)
Lines 30-39 Manage numbering patterns Link Here
30
use Modern::Perl;
30
use Modern::Perl;
31
use CGI qw ( -utf8 );
31
use CGI qw ( -utf8 );
32
32
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Serials::Numberpattern;
35
use C4::Serials::Numberpattern qw(
36
use C4::Serials::Frequency;
36
    AddSubscriptionNumberpattern
37
    DelSubscriptionNumberpattern
38
    GetSubscriptionNumberpattern
39
    GetSubscriptionNumberpatternByName
40
    GetSubscriptionNumberpatterns
41
    GetSubscriptionsWithNumberpattern
42
    ModSubscriptionNumberpattern
43
);
44
use C4::Serials::Frequency qw( GetSubscriptionFrequencies );
37
45
38
my $input = CGI->new;
46
my $input = CGI->new;
39
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
47
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/serials/subscription-renew.pl (-6 / +6 lines)
Lines 46-59 Id of the subscription this script has to renew Link Here
46
use Modern::Perl;
46
use Modern::Perl;
47
47
48
use CGI qw ( -utf8 );
48
use CGI qw ( -utf8 );
49
use Carp;
49
use Carp qw( carp );
50
use C4::Koha;
50
use C4::Koha;
51
use C4::Auth;
51
use C4::Auth qw( get_template_and_user );
52
use C4::Context;
52
use C4::Context;
53
use C4::Auth;
53
use C4::Auth qw( get_template_and_user );
54
use C4::Output;
54
use C4::Output qw( output_and_exit output_html_with_http_headers );
55
use C4::Serials;
55
use C4::Serials qw( GetSubscription GetSubscriptionLength NewSubscription ReNewSubscription );
56
use Koha::DateUtils;
56
use Koha::DateUtils qw( dt_from_string output_pref );
57
57
58
my $query = CGI->new;
58
my $query = CGI->new;
59
my $dbh   = C4::Context->dbh;
59
my $dbh   = C4::Context->dbh;
(-)a/serials/viewalerts.pl (-2 / +2 lines)
Lines 20-28 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
26
27
use Koha::Subscriptions;
27
use Koha::Subscriptions;
28
28
(-)a/services/itemrecorddisplay.pl (-3 / +3 lines)
Lines 30-38 It uses PrepareItemrecordDisplay Link Here
30
use Modern::Perl;
30
use Modern::Perl;
31
31
32
use CGI qw ( -utf8 );
32
use CGI qw ( -utf8 );
33
use C4::Auth;
33
use C4::Auth qw( get_template_and_user );
34
use C4::Output;
34
use C4::Output qw( output_html_with_http_headers );
35
use C4::Items;
35
use C4::Items qw( PrepareItemrecordDisplay );
36
36
37
my $input = CGI->new;
37
my $input = CGI->new;
38
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
38
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
(-)a/suggestion/add_user_search.pl (-2 / +2 lines)
Lines 18-25 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Members;
23
use C4::Members;
24
24
25
use Koha::Patron::Categories;
25
use Koha::Patron::Categories;
(-)a/suggestion/suggestion.pl (-6 / +6 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
require Exporter;
21
require Exporter;
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Auth;    # get_template_and_user
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Suggestions;
25
use C4::Suggestions;
26
use C4::Koha;
26
use C4::Koha qw( GetAuthorisedValues );
27
use C4::Budgets;
27
use C4::Budgets qw( GetBudget GetBudgets GetBudgetHierarchy CanUserUseBudget );
28
use C4::Search;
28
use C4::Search qw( FindDuplicate GetDistinctValues );
29
use C4::Members;
29
use C4::Members;
30
use Koha::DateUtils qw( dt_from_string );
30
use Koha::DateUtils qw( dt_from_string );
31
use Koha::AuthorisedValues;
31
use Koha::AuthorisedValues;
Lines 33-39 use Koha::Acquisition::Currencies; Link Here
33
use Koha::Libraries;
33
use Koha::Libraries;
34
use Koha::Patrons;
34
use Koha::Patrons;
35
35
36
use URI::Escape;
36
use URI::Escape qw( uri_escape );
37
37
38
sub Init{
38
sub Init{
39
    my $suggestion= shift @_;
39
    my $suggestion= shift @_;
(-)a/svc/authorised_values (-1 lines)
Lines 23-29 use JSON qw( to_json ); Link Here
23
use CGI;
23
use CGI;
24
use C4::Service;
24
use C4::Service;
25
use C4::Auth qw( check_cookie_auth );
25
use C4::Auth qw( check_cookie_auth );
26
use C4::Output qw(:DEFAULT :ajax);
27
use Koha::AuthorisedValues;
26
use Koha::AuthorisedValues;
28
27
29
=head1 NAME
28
=head1 NAME
(-)a/svc/cataloguing/automatic_linker.pl (-3 / +3 lines)
Lines 19-27 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI;
21
use CGI;
22
use JSON;
22
use JSON qw( to_json );
23
use C4::Auth qw(check_cookie_auth);
23
use C4::Auth qw( check_cookie_auth );
24
use C4::Biblio;
24
use C4::Biblio qw( BiblioAutoLink TransformHtmlToMarc );
25
use C4::Context;
25
use C4::Context;
26
26
27
my $input = CGI->new;
27
my $input = CGI->new;
(-)a/svc/checkout_notes (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use JSON qw( to_json );
22
use JSON qw( to_json );
23
use CGI;
23
use CGI;
24
use C4::Service;
24
use C4::Service;
25
use C4::Auth qw /check_cookie_auth/;
25
use C4::Auth qw ( check_cookie_auth );
26
use C4::Output qw(:DEFAULT :ajax);
26
use C4::Output qw( is_ajax output_with_http_headers );
27
use Koha::Checkouts;
27
use Koha::Checkouts;
28
28
29
=head1 NAME
29
=head1 NAME
(-)a/svc/creator_batches (-2 / +2 lines)
Lines 23-30 use JSON qw( encode_json ); Link Here
23
use CGI;
23
use CGI;
24
use C4::Service;
24
use C4::Service;
25
use C4::Context;
25
use C4::Context;
26
use C4::Auth qw /check_cookie_auth/;
26
use C4::Auth qw( check_cookie_auth );
27
use C4::Output qw(:DEFAULT :ajax);
27
use C4::Output qw( is_ajax output_with_http_headers );
28
use C4::Patroncards::Batch;
28
use C4::Patroncards::Batch;
29
use C4::Labels::Batch;
29
use C4::Labels::Batch;
30
30
(-)a/svc/problem_reports (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use JSON qw( to_json );
22
use JSON qw( to_json );
23
use CGI;
23
use CGI;
24
use C4::Service;
24
use C4::Service;
25
use C4::Auth qw /check_cookie_auth/;
25
use C4::Auth qw( check_cookie_auth );
26
use C4::Output qw(:DEFAULT :ajax);
26
use C4::Output qw( is_ajax output_with_http_headers );
27
use Koha::ProblemReports;
27
use Koha::ProblemReports;
28
28
29
=head1 NAME
29
=head1 NAME
(-)a/t/Acquisition/CanUserManageBasket.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 43;
4
use Test::More tests => 43;
5
5
6
use C4::Acquisition;
6
use C4::Acquisition qw( GetBasket GetBasketUsers CanUserManageBasket );
7
7
8
# Avoid "redefined subroutine" warnings
8
# Avoid "redefined subroutine" warnings
9
local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /redefined/ };
9
local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /redefined/ };
(-)a/t/Auth.t (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
use Test::More tests => 12;
19
use Test::More tests => 12;
20
use Test::Warn;
20
use Test::Warn;
21
21
22
use C4::Auth qw / in_iprange /;
22
use C4::Auth qw( in_iprange );
23
23
24
$ENV{REMOTE_ADDR} = '192.168.1.30';
24
$ENV{REMOTE_ADDR} = '192.168.1.30';
25
25
(-)a/t/Auth_with_shibboleth.t (-1 / +1 lines)
Lines 94-100 $database->mock( 'schema', \&mockedSchema ); Link Here
94
my $logger = t::lib::Mocks::Logger->new();
94
my $logger = t::lib::Mocks::Logger->new();
95
95
96
# Can module load
96
# Can module load
97
use C4::Auth_with_shibboleth;
97
use C4::Auth_with_shibboleth qw( shib_ok login_shib_url get_login_shib checkpw_shib );
98
require_ok('C4::Auth_with_shibboleth');
98
require_ok('C4::Auth_with_shibboleth');
99
99
100
# Subroutine tests
100
# Subroutine tests
(-)a/t/AuthoritiesMarc_MARC21.t (-1 / +1 lines)
Lines 10-16 use Test::More tests => 4; Link Here
10
use MARC::Record;
10
use MARC::Record;
11
11
12
BEGIN {
12
BEGIN {
13
        use_ok('C4::AuthoritiesMarc::MARC21');
13
        use_ok('C4::AuthoritiesMarc::MARC21', qw( default_auth_type_location fix_marc21_auth_type_location ));
14
}
14
}
15
15
16
my @result = C4::AuthoritiesMarc::MARC21::default_auth_type_location();
16
my @result = C4::AuthoritiesMarc::MARC21::default_auth_type_location();
(-)a/t/AuthoritiesMarc_UNIMARC.t (-1 / +1 lines)
Lines 9-15 use warnings; Link Here
9
use Test::More tests => 2;
9
use Test::More tests => 2;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::AuthoritiesMarc::UNIMARC');
12
        use_ok('C4::AuthoritiesMarc::UNIMARC', qw( default_auth_type_location ));
13
}
13
}
14
14
15
my @test = C4::AuthoritiesMarc::UNIMARC::default_auth_type_location();
15
my @test = C4::AuthoritiesMarc::UNIMARC::default_auth_type_location();
(-)a/t/Biblio.t (-1 / +2 lines)
Lines 23-29 use Test::Warn; Link Here
23
23
24
plan tests => 39;
24
plan tests => 39;
25
25
26
use_ok('C4::Biblio');
26
27
use_ok('C4::Biblio', qw( AddBiblio ModBiblio BiblioAutoLink LinkBibHeadingsToAuthorities GetMarcPrice GetMarcQuantity GetMarcControlnumber GetMarcISBN GetMarcISSN GetMarcSubjects GetMarcAuthors GetMarcUrls GetMarcSeries TransformMarcToKoha ModBiblioMarc RemoveAllNsb GetMarcBiblio UpdateTotalIssues ));
27
28
28
my $db = Test::MockModule->new('Koha::Database');
29
my $db = Test::MockModule->new('Koha::Database');
29
$db->mock( _new_schema => sub { return Schema(); } );
30
$db->mock( _new_schema => sub { return Schema(); } );
(-)a/t/Biblio/TransformHtmlToXml.t (-1 / +1 lines)
Lines 22-28 use t::lib::Mocks; Link Here
22
22
23
use XML::Simple;
23
use XML::Simple;
24
24
25
use C4::Biblio qw/TransformHtmlToXml/;
25
use C4::Biblio qw( TransformHtmlToXml );
26
26
27
27
28
sub run_tests {
28
sub run_tests {
(-)a/t/Biblio2.t (-1 / +1 lines)
Lines 6-12 use Test::MockModule; Link Here
6
6
7
use MARC::Record;
7
use MARC::Record;
8
8
9
use C4::Biblio;
9
use C4::Biblio qw( GetMarcFromKohaField );
10
10
11
subtest "_koha_marc_update_bib_ids basic Field", \&_koha_marc_update_bib_ids_simple;
11
subtest "_koha_marc_update_bib_ids basic Field", \&_koha_marc_update_bib_ids_simple;
12
sub _koha_marc_update_bib_ids_simple {
12
sub _koha_marc_update_bib_ids_simple {
(-)a/t/Budgets/CanUserModifyBudget.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 134;
4
use Test::More tests => 134;
5
5
6
use C4::Budgets;
6
use C4::Budgets qw( GetBudget GetBudgetUsers CanUserModifyBudget );
7
use t::lib::Mocks;
7
use t::lib::Mocks;
8
8
9
# Avoid "redefined subroutine" warnings
9
# Avoid "redefined subroutine" warnings
(-)a/t/Budgets/CanUserUseBudget.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 70;
4
use Test::More tests => 70;
5
5
6
use C4::Budgets;
6
use C4::Budgets qw( GetBudget GetBudgetUsers CanUserUseBudget );
7
use t::lib::Mocks;
7
use t::lib::Mocks;
8
8
9
# Avoid "redefined subroutine" warnings
9
# Avoid "redefined subroutine" warnings
(-)a/t/Charset.t (-1 / +1 lines)
Lines 26-32 use utf8; Link Here
26
use open ':std', ':encoding(utf8)';
26
use open ':std', ':encoding(utf8)';
27
27
28
BEGIN {
28
BEGIN {
29
    use_ok('C4::Charset');
29
    use_ok('C4::Charset', qw( NormalizeString SetUTF8Flag IsStringUTF8ish nsb_clean ));
30
}
30
}
31
31
32
my $string;
32
my $string;
(-)a/t/Circulation/AgeRestrictionMarkers.t (-1 / +1 lines)
Lines 27-33 use Test::Warn; Link Here
27
27
28
use t::lib::Mocks;
28
use t::lib::Mocks;
29
29
30
use C4::Circulation;
30
use C4::Circulation qw( GetAgeRestriction );
31
31
32
t::lib::Mocks::mock_preference( 'AgeRestrictionMarker', 'FSK|PEGI|Age|K' );
32
t::lib::Mocks::mock_preference( 'AgeRestrictionMarker', 'FSK|PEGI|Age|K' );
33
33
(-)a/t/Circulation_barcodedecode.t (-1 / +1 lines)
Lines 22-28 use Test::More tests => 26; Link Here
22
use C4::Context;
22
use C4::Context;
23
use t::lib::Mocks;
23
use t::lib::Mocks;
24
24
25
use_ok( 'C4::Circulation' );
25
use_ok('C4::Circulation', qw( barcodedecode ));
26
26
27
t::lib::Mocks::mock_userenv({ branchcode => 'IMS' });
27
t::lib::Mocks::mock_userenv({ branchcode => 'IMS' });
28
28
(-)a/t/ClassSortRoutine_Dewey.t (-1 / +1 lines)
Lines 9-15 use warnings; Link Here
9
use Test::More tests => 10;
9
use Test::More tests => 10;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::ClassSortRoutine::Dewey');
12
        use_ok('C4::ClassSortRoutine::Dewey', qw( get_class_sort_key ));
13
}
13
}
14
14
15
my $cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key(undef, undef );
15
my $cn_sort = C4::ClassSortRoutine::Dewey::get_class_sort_key(undef, undef );
(-)a/t/ClassSortRoutine_Generic.t (-1 / +1 lines)
Lines 9-15 use warnings; Link Here
9
use Test::More tests => 3;
9
use Test::More tests => 3;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::ClassSortRoutine::Generic');
12
        use_ok('C4::ClassSortRoutine::Generic', qw( get_class_sort_key ));
13
}
13
}
14
14
15
my $cn_class = "My class ";
15
my $cn_class = "My class ";
(-)a/t/ClassSortRoutine_LCC.t (-1 / +1 lines)
Lines 9-15 use warnings; Link Here
9
use Test::More tests => 10;
9
use Test::More tests => 10;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::ClassSortRoutine::LCC');
12
        use_ok('C4::ClassSortRoutine::LCC', qw( get_class_sort_key ));
13
}
13
}
14
14
15
#Obvious cases
15
#Obvious cases
(-)a/t/Creators.t (-1 / +1 lines)
Lines 18-24 use Test::More tests => 41; Link Here
18
18
19
BEGIN {
19
BEGIN {
20
        use_ok('C4::Creators');
20
        use_ok('C4::Creators');
21
        use_ok('C4::Creators::PDF');
21
        use_ok('C4::Creators::PDF', qw( Init Add Bookmark Compress Font FontSize Page StrWidth Text End ));
22
}
22
}
23
23
24
my $pdf_creator = C4::Creators::PDF->new(InitVars => 0);
24
my $pdf_creator = C4::Creators::PDF->new(InitVars => 0);
(-)a/t/External/BakerTaylor.t (-1 / +1 lines)
Lines 8-14 use Test::More tests => 9; Link Here
8
use t::lib::Mocks;
8
use t::lib::Mocks;
9
9
10
BEGIN {
10
BEGIN {
11
        use_ok('C4::External::BakerTaylor');
11
        use_ok('C4::External::BakerTaylor', qw( link_url image_url content_cafe_url http_jacket_link availability ));
12
}
12
}
13
13
14
# test with mocked prefs
14
# test with mocked prefs
(-)a/t/ImportBatch.t (-1 / +1 lines)
Lines 25-31 use Test::More tests => 3; Link Here
25
use t::lib::Mocks;
25
use t::lib::Mocks;
26
26
27
BEGIN {
27
BEGIN {
28
    use_ok('C4::ImportBatch');
28
    use_ok('C4::ImportBatch', qw( RecordsFromISO2709File RecordsFromMARCXMLFile ));
29
}
29
}
30
30
31
t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
31
t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
(-)a/t/Koha.t (-1 / +1 lines)
Lines 31-37 BEGIN { Link Here
31
    }
31
    }
32
}
32
}
33
33
34
use_ok('C4::Koha');
34
use_ok('C4::Koha', qw( xml_escape GetVariationsOfISBN GetVariationsOfISBNs GetVariationsOfISSN GetVariationsOfISSNs));
35
35
36
use Test::DBIx::Class;
36
use Test::DBIx::Class;
37
37
(-)a/t/Koha/Util/MARC.t (+1 lines)
Lines 18-23 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 2;
20
use Test::More tests => 2;
21
use MARC::Record;
21
22
22
BEGIN { use_ok('Koha::Util::MARC'); }
23
BEGIN { use_ok('Koha::Util::MARC'); }
23
24
(-)a/t/Koha/sleep.pl (-2 lines)
Lines 3-10 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Koha::Script;
5
use Koha::Script;
6
use Fcntl qw(:flock);
7
use Try::Tiny;
8
6
9
# # Lock execution
7
# # Lock execution
10
my $script = Koha::Script->new({ script => 'sleep.pl' });
8
my $script = Koha::Script->new({ script => 'sleep.pl' });
(-)a/t/Koha/wait.pl (-2 lines)
Lines 3-10 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Koha::Script;
5
use Koha::Script;
6
use Fcntl qw(:flock);
7
use Try::Tiny;
8
6
9
# # Lock execution
7
# # Lock execution
10
my $script = Koha::Script->new({ script => 'sleep.pl' });
8
my $script = Koha::Script->new({ script => 'sleep.pl' });
(-)a/t/Koha_Util_MARC.t (+1 lines)
Lines 24-29 use strict; Link Here
24
use warnings;
24
use warnings;
25
25
26
use Test::More tests => 4;
26
use Test::More tests => 4;
27
use MARC::Record;
27
28
28
BEGIN {
29
BEGIN {
29
        use_ok('Koha::Util::MARC');
30
        use_ok('Koha::Util::MARC');
(-)a/t/Labels.t (-2 / +2 lines)
Lines 20-30 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use C4::ClassSplitRoutine::LCC;
23
use C4::ClassSplitRoutine::LCC qw( split_callnumber );
24
use Test::More tests => 11;
24
use Test::More tests => 11;
25
25
26
BEGIN {
26
BEGIN {
27
    use_ok('C4::Labels::Label');
27
    use_ok('C4::Labels::Label', qw( _get_text_fields _check_params _guide_box ));
28
}
28
}
29
29
30
my $format_string = "title, callnumber";
30
my $format_string = "title, callnumber";
(-)a/t/Labels_split_Regex.t (-1 / +1 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 5;
20
use Test::More tests => 5;
21
use C4::ClassSplitRoutine::RegEx;
21
use C4::ClassSplitRoutine::RegEx qw( split_callnumber );
22
22
23
my $callnumbers = {
23
my $callnumbers = {
24
    '830 Han'          => [qw{830 Han}],
24
    '830 Han'          => [qw{830 Han}],
(-)a/t/Labels_split_ddcn.t (-1 / +1 lines)
Lines 42-48 BEGIN { Link Here
42
        $test_num += 4;
42
        $test_num += 4;
43
    }
43
    }
44
    plan tests => $test_num;
44
    plan tests => $test_num;
45
    use_ok('C4::ClassSplitRoutine::Dewey');
45
    use_ok('C4::ClassSplitRoutine::Dewey', qw( split_callnumber ));
46
    use vars qw($ddcns);
46
    use vars qw($ddcns);
47
}
47
}
48
48
(-)a/t/Labels_split_lccn.t (-1 / +1 lines)
Lines 20-26 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
use C4::ClassSplitRoutine::LCC;
23
use C4::ClassSplitRoutine::LCC qw( split_callnumber );
24
use Test::More;
24
use Test::More;
25
25
26
BEGIN {
26
BEGIN {
(-)a/t/Languages.t (-1 / +1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
use Koha::Cache::Memory::Lite;
24
use Koha::Cache::Memory::Lite;
25
25
26
BEGIN {
26
BEGIN {
27
    use_ok('C4::Languages');
27
    use_ok('C4::Languages', qw( getlanguage ));
28
}
28
}
29
29
30
my @languages = (); # stores the list of active languages
30
my @languages = (); # stores the list of active languages
(-)a/t/Letters.t (-1 / +1 lines)
Lines 44-50 fixtures_ok [ Link Here
44
my $db = Test::MockModule->new('Koha::Database');
44
my $db = Test::MockModule->new('Koha::Database');
45
$db->mock( _new_schema => sub { return Schema(); } );
45
$db->mock( _new_schema => sub { return Schema(); } );
46
46
47
use_ok('C4::Letters');
47
use_ok('C4::Letters', qw( GetLetters ));
48
48
49
t::lib::Mocks::mock_preference('dateformat', 'metric');
49
t::lib::Mocks::mock_preference('dateformat', 'metric');
50
50
(-)a/t/Matcher.t (-1 / +1 lines)
Lines 38-44 use Test::DBIx::Class; Link Here
38
my $db = Test::MockModule->new('Koha::Database');
38
my $db = Test::MockModule->new('Koha::Database');
39
$db->mock( _new_schema => sub { return Schema(); } );
39
$db->mock( _new_schema => sub { return Schema(); } );
40
40
41
use_ok('C4::Matcher');
41
use_ok('C4::Matcher', qw( GetMatcherList GetMatcherId ));
42
42
43
fixtures_ok [
43
fixtures_ok [
44
    MarcMatcher => [
44
    MarcMatcher => [
(-)a/t/Members/cardnumber.t (-1 / +1 lines)
Lines 7-13 use Test::MockModule; Link Here
7
7
8
use t::lib::Mocks;
8
use t::lib::Mocks;
9
9
10
use_ok('C4::Members');
10
use_ok('C4::Members', qw( get_cardnumber_length checkcardnumber ));
11
11
12
BEGIN {
12
BEGIN {
13
    if ( check_install( module => 'Test::DBIx::Class' ) ) {
13
    if ( check_install( module => 'Test::DBIx::Class' ) ) {
(-)a/t/Output.t (-1 / +1 lines)
Lines 24-30 use CGI qw ( -utf8 ); Link Here
24
use t::lib::Mocks;
24
use t::lib::Mocks;
25
25
26
BEGIN {
26
BEGIN {
27
    use_ok('C4::Output');
27
    use_ok('C4::Output', qw( output_html_with_http_headers parametrized_url  ));
28
}
28
}
29
29
30
my $query = CGI->new();
30
my $query = CGI->new();
(-)a/t/Prices.t (-1 / +1 lines)
Lines 14-20 BEGIN { Link Here
14
    }
14
    }
15
}
15
}
16
16
17
use_ok('C4::Acquisition');
17
use_ok('C4::Acquisition', qw( populate_order_with_prices ));
18
use_ok('C4::Context');
18
use_ok('C4::Context');
19
use_ok('Koha::Number::Price');
19
use_ok('Koha::Number::Price');
20
20
(-)a/t/SIP/Sip.t (-1 / +1 lines)
Lines 21-27 use Test::More tests => 9; Link Here
21
use Test::Warn;
21
use Test::Warn;
22
22
23
BEGIN {
23
BEGIN {
24
        use_ok('C4::SIP::Sip');
24
        use_ok('C4::SIP::Sip', qw( timestamp ));
25
}
25
}
26
26
27
my $date_time = C4::SIP::Sip::timestamp();
27
my $date_time = C4::SIP::Sip::timestamp();
(-)a/t/SMS.t (-1 / +1 lines)
Lines 22-28 use t::lib::Mocks; Link Here
22
use Test::More tests => 7;
22
use Test::More tests => 7;
23
23
24
BEGIN {
24
BEGIN {
25
    use_ok('C4::SMS');
25
    use_ok('C4::SMS', qw( driver send_sms ));
26
}
26
}
27
27
28
28
(-)a/t/Scheduler.t (-1 / +1 lines)
Lines 9-15 use warnings; Link Here
9
use Test::More tests => 6;
9
use Test::More tests => 6;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::Scheduler');
12
        use_ok('C4::Scheduler', qw( get_jobs get_at_jobs get_at_job add_at_job remove_at_job ));
13
}
13
}
14
14
15
ok(C4::Scheduler::get_jobs(), "testing get_jobs with no arguments");
15
ok(C4::Scheduler::get_jobs(), "testing get_jobs with no arguments");
(-)a/t/Scrubber.t (-3 / +3 lines)
Lines 8-16 use Test::More tests => 29; Link Here
8
use Test::Warn;
8
use Test::Warn;
9
9
10
BEGIN {
10
BEGIN {
11
	use FindBin;
11
    use FindBin;
12
	use lib $FindBin::Bin;
12
    use lib $FindBin::Bin;
13
	use_ok('C4::Scrubber');
13
    use_ok('C4::Scrubber');
14
}
14
}
15
15
16
sub pretty_line {
16
sub pretty_line {
(-)a/t/Search/History.t (-1 / +1 lines)
Lines 7-13 use URI::Escape; Link Here
7
use JSON qw( decode_json );
7
use JSON qw( decode_json );
8
8
9
use_ok('Koha::DateUtils');
9
use_ok('Koha::DateUtils');
10
use_ok('C4::Search::History');
10
use_ok('C4::Search::History', qw( get get_from_session set_to_session delete ));
11
use_ok('C4::Auth', qw/get_session/ );
11
use_ok('C4::Auth', qw/get_session/ );
12
12
13
# Test session
13
# Test session
(-)a/t/Search/buildQuery.t (-1 / +1 lines)
Lines 33-39 BEGIN { Link Here
33
# Mock the DB connection and C4::Context
33
# Mock the DB connection and C4::Context
34
use Test::DBIx::Class;
34
use Test::DBIx::Class;
35
35
36
use_ok('C4::Search');
36
use_ok('C4::Search', qw( buildQuery ));
37
can_ok('C4::Search',
37
can_ok('C4::Search',
38
    qw/buildQuery/);
38
    qw/buildQuery/);
39
use_ok("Net::Z3950::ZOOM");
39
use_ok("Net::Z3950::ZOOM");
(-)a/t/Serials/GetNextSeq.t (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 43;
4
use Test::More tests => 43;
5
use C4::Serials;
5
use C4::Serials qw( GetNextSeq );
6
6
7
# TEST CASE 1 - 1 variable, from 1 to 4
7
# TEST CASE 1 - 1 variable, from 1 to 4
8
my $subscription = {
8
my $subscription = {
(-)a/t/Serials/ModSerialStatus.t (-1 / +1 lines)
Lines 24-30 use Data::Dumper qw/Dumper/; Link Here
24
24
25
use Test::More tests => 8;
25
use Test::More tests => 8;
26
26
27
use C4::Serials qw//;
27
use C4::Serials;
28
28
29
# Testing C4::Serials::_handle_seqno
29
# Testing C4::Serials::_handle_seqno
30
my $list = '2017 (No. 8); 2017 (No. 9); 2017 (No. 10)';
30
my $list = '2017 (No. 8); 2017 (No. 9); 2017 (No. 10)';
(-)a/t/SimpleMARC.t (-1 / +1 lines)
Lines 4-10 use Test::More tests => 11; Link Here
4
4
5
use_ok("MARC::Field");
5
use_ok("MARC::Field");
6
use_ok("MARC::Record");
6
use_ok("MARC::Record");
7
use_ok("Koha::SimpleMARC");
7
use_ok("Koha::SimpleMARC", qw( field_exists read_field update_field copy_field copy_and_replace_field move_field delete_field field_equals ));
8
8
9
sub new_record {
9
sub new_record {
10
    my $record = MARC::Record->new;
10
    my $record = MARC::Record->new;
(-)a/t/SocialData.t (-1 / +1 lines)
Lines 31-37 BEGIN { Link Here
31
}
31
}
32
32
33
BEGIN {
33
BEGIN {
34
    use_ok('C4::SocialData');
34
    use_ok('C4::SocialData', qw( get_data get_report ));
35
}
35
}
36
36
37
use Test::DBIx::Class;
37
use Test::DBIx::Class;
(-)a/t/TmplToken.t (-1 lines)
Lines 5-11 Link Here
5
5
6
use strict;
6
use strict;
7
use warnings;
7
use warnings;
8
use C4::TmplTokenType;
9
use Test::More tests => 19;
8
use Test::More tests => 19;
10
9
11
BEGIN {
10
BEGIN {
(-)a/t/db_dependent/Accounts.t (-1 / +1 lines)
Lines 37-43 use Koha::DateUtils qw( dt_from_string ); Link Here
37
use C4::Circulation qw( MarkIssueReturned );
37
use C4::Circulation qw( MarkIssueReturned );
38
38
39
BEGIN {
39
BEGIN {
40
    use_ok('C4::Accounts');
40
    use_ok('C4::Accounts', qw( chargelostitem purge_zero_balance_fees ));
41
    use_ok('Koha::Object');
41
    use_ok('Koha::Object');
42
    use_ok('Koha::Patron');
42
    use_ok('Koha::Patron');
43
    use_ok('Data::Dumper');
43
    use_ok('Data::Dumper');
(-)a/t/db_dependent/Acquisition.t (-3 / +3 lines)
Lines 28-36 use Koha::Acquisition::Basket; Link Here
28
use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'MARC21' );
28
use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'MARC21' );
29
29
30
BEGIN {
30
BEGIN {
31
    use_ok('C4::Acquisition');
31
    use_ok('C4::Acquisition', qw( NewBasket GetBasket AddInvoice GetInvoice ModReceiveOrder SearchOrders GetOrder GetHistory ModOrder get_rounding_sql get_rounded_price ReopenBasket ModBasket ModBasketHeader ModBasketUsers ));
32
    use_ok('C4::Biblio');
32
    use_ok('C4::Biblio', qw( AddBiblio GetMarcSubfieldStructure ));
33
    use_ok('C4::Budgets');
33
    use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget GetBudget GetBudgetByOrderNumber GetBudgetsReport GetBudgets GetBudgetReport ));
34
    use_ok('Koha::Acquisition::Orders');
34
    use_ok('Koha::Acquisition::Orders');
35
    use_ok('Koha::Acquisition::Booksellers');
35
    use_ok('Koha::Acquisition::Booksellers');
36
    use_ok('t::lib::TestBuilder');
36
    use_ok('t::lib::TestBuilder');
(-)a/t/db_dependent/Acquisition/CancelReceipt.t (-3 / +3 lines)
Lines 21-30 use Test::More tests => 12; Link Here
21
use t::lib::TestBuilder;
21
use t::lib::TestBuilder;
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Acquisition;
24
use C4::Acquisition qw( NewBasket ModReceiveOrder CancelReceipt );
25
use C4::Biblio;
25
use C4::Biblio qw( AddBiblio );
26
use C4::Items;
26
use C4::Items;
27
use C4::Budgets;
27
use C4::Budgets qw( AddBudget GetBudget );
28
use t::lib::Mocks;
28
use t::lib::Mocks;
29
29
30
use Koha::Database;
30
use Koha::Database;
(-)a/t/db_dependent/Acquisition/GetBasketAsCSV.t (-2 / +2 lines)
Lines 6-13 use CGI; Link Here
6
6
7
use Test::More tests => 4;
7
use Test::More tests => 4;
8
8
9
use C4::Acquisition;
9
use C4::Acquisition qw( NewBasket GetBasket GetBasketAsCSV );
10
use C4::Biblio;
10
use C4::Biblio qw( AddBiblio );
11
use Koha::Database;
11
use Koha::Database;
12
use Koha::CsvProfiles;
12
use Koha::CsvProfiles;
13
use Koha::Acquisition::Orders;
13
use Koha::Acquisition::Orders;
(-)a/t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t (-2 / +2 lines)
Lines 4-12 use Modern::Perl; Link Here
4
use Test::More tests => 43;
4
use Test::More tests => 43;
5
use Data::Dumper;
5
use Data::Dumper;
6
6
7
use C4::Acquisition qw( NewBasket GetBasketsInfosByBookseller );
7
use C4::Acquisition qw( NewBasket GetBasket GetBasketsInfosByBookseller ReopenBasket AddInvoice GetInvoice ModReceiveOrder );
8
use C4::Biblio qw( AddBiblio );
8
use C4::Biblio qw( AddBiblio );
9
use C4::Budgets qw( AddBudget );
9
use C4::Budgets qw( AddBudget GetBudget );
10
use C4::Context;
10
use C4::Context;
11
use Koha::Database;
11
use Koha::Database;
12
use Koha::Acquisition::Orders;
12
use Koha::Acquisition::Orders;
(-)a/t/db_dependent/Acquisition/GetOrdersByBiblionumber.t (-3 / +3 lines)
Lines 3-11 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More;
5
use Test::More;
6
use C4::Acquisition;
6
use C4::Acquisition qw( NewBasket GetOrders GetOrdersByBiblionumber GetOrder );
7
use C4::Biblio;
7
use C4::Biblio qw( AddBiblio );
8
use C4::Budgets;
8
use C4::Budgets qw( AddBudget GetBudget );
9
use Koha::Database;
9
use Koha::Database;
10
use Koha::Acquisition::Orders;
10
use Koha::Acquisition::Orders;
11
11
(-)a/t/db_dependent/Acquisition/Invoices.t (-1 / +1 lines)
Lines 11-17 use Koha::Database; Link Here
11
use Test::More tests => 24;
11
use Test::More tests => 24;
12
12
13
BEGIN {
13
BEGIN {
14
    use_ok('C4::Acquisition');
14
    use_ok('C4::Acquisition', qw( NewBasket GetBasket AddInvoice GetInvoice ModReceiveOrder GetInvoiceDetails GetInvoices ModInvoice CloseInvoice ReopenInvoice MergeInvoices DelInvoice ));
15
}
15
}
16
16
17
my $schema = Koha::Database->new()->schema();
17
my $schema = Koha::Database->new()->schema();
(-)a/t/db_dependent/Acquisition/NewOrder.t (-3 / +3 lines)
Lines 3-11 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 8;
5
use Test::More tests => 8;
6
use C4::Acquisition;
6
use C4::Acquisition qw( NewBasket );
7
use C4::Biblio;
7
use C4::Biblio qw( AddBiblio );
8
use C4::Budgets;
8
use C4::Budgets qw( AddBudget GetBudget );
9
use MARC::Record;
9
use MARC::Record;
10
use Koha::Database;
10
use Koha::Database;
11
use Koha::DateUtils qw( dt_from_string output_pref );
11
use Koha::DateUtils qw( dt_from_string output_pref );
(-)a/t/db_dependent/Acquisition/OrderFromSubscription.t (-4 / +4 lines)
Lines 4-13 use Test::More tests => 12; Link Here
4
4
5
use t::lib::TestBuilder;
5
use t::lib::TestBuilder;
6
6
7
use_ok('C4::Acquisition');
7
use_ok('C4::Acquisition', qw( NewBasket AddInvoice GetInvoice ModReceiveOrder GetInvoices ));
8
use_ok('C4::Biblio');
8
use_ok('C4::Biblio', qw( AddBiblio ));
9
use_ok('C4::Budgets');
9
use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget ));
10
use_ok('C4::Serials');
10
use_ok('C4::Serials', qw( NewSubscription GetSubscription subscriptionCurrentlyOnOrder ));
11
11
12
use Koha::Acquisition::Orders;
12
use Koha::Acquisition::Orders;
13
use Koha::Database;
13
use Koha::Database;
(-)a/t/db_dependent/Acquisition/OrderUsers.t (-3 / +3 lines)
Lines 1-9 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
use Test::More tests => 3;
2
use Test::More tests => 3;
3
3
4
use C4::Acquisition;
4
use C4::Acquisition qw( NewBasket AddInvoice ModOrder ModOrderUsers GetOrder GetOrderUsers ModReceiveOrder );
5
use C4::Biblio;
5
use C4::Biblio qw( AddBiblio );
6
use C4::Letters;
6
use C4::Letters qw( GetQueuedMessages );
7
use Koha::Database;
7
use Koha::Database;
8
use Koha::Acquisition::Booksellers;
8
use Koha::Acquisition::Booksellers;
9
use Koha::Acquisition::Orders;
9
use Koha::Acquisition::Orders;
(-)a/t/db_dependent/Acquisition/StandingOrders.t (-2 / +2 lines)
Lines 4-11 use Modern::Perl; Link Here
4
4
5
use Test::More tests => 14;
5
use Test::More tests => 14;
6
use C4::Context;
6
use C4::Context;
7
use C4::Acquisition;
7
use C4::Acquisition qw( NewBasket GetBasket SearchOrders AddInvoice ModReceiveOrder CancelReceipt );
8
use C4::Biblio;
8
use C4::Biblio qw( AddBiblio );
9
use C4::Items;
9
use C4::Items;
10
use C4::Budgets;
10
use C4::Budgets;
11
use Koha::Acquisition::Orders;
11
use Koha::Acquisition::Orders;
(-)a/t/db_dependent/Acquisition/TransferOrder.t (-2 / +2 lines)
Lines 4-13 use Modern::Perl; Link Here
4
4
5
use Test::More tests => 13;
5
use Test::More tests => 13;
6
use C4::Context;
6
use C4::Context;
7
use C4::Acquisition;
7
use C4::Acquisition qw( NewBasket GetOrders GetOrder TransferOrder SearchOrders ModReceiveOrder CancelReceipt );
8
use C4::Biblio;
8
use C4::Biblio;
9
use C4::Items;
9
use C4::Items;
10
use C4::Budgets;
10
use C4::Budgets qw( AddBudget GetBudget );
11
use Koha::Database;
11
use Koha::Database;
12
use Koha::DateUtils;
12
use Koha::DateUtils;
13
use Koha::Acquisition::Booksellers;
13
use Koha::Acquisition::Booksellers;
(-)a/t/db_dependent/Acquisition/close_reopen_basket.t (-3 / +3 lines)
Lines 3-11 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 14;
5
use Test::More tests => 14;
6
use C4::Acquisition;
6
use C4::Acquisition qw( NewBasket GetBiblioCountByBasketno GetOrders GetOrder ReopenBasket );
7
use C4::Biblio qw( AddBiblio DelBiblio );
7
use C4::Biblio qw( AddBiblio );
8
use C4::Budgets;
8
use C4::Budgets qw( AddBudget GetBudget );
9
use C4::Context;
9
use C4::Context;
10
use Koha::Database;
10
use Koha::Database;
11
use Koha::Acquisition::Booksellers;
11
use Koha::Acquisition::Booksellers;
(-)a/t/db_dependent/Acquisition/populate_order_with_prices.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 44;
5
use Test::More tests => 44;
6
use C4::Acquisition;
6
use C4::Acquisition qw( populate_order_with_prices );
7
use C4::Context;
7
use C4::Context;
8
use Koha::Database;
8
use Koha::Database;
9
use t::lib::TestBuilder;
9
use t::lib::TestBuilder;
(-)a/t/db_dependent/Amazon.t (-1 / +1 lines)
Lines 11-17 use t::lib::Mocks; Link Here
11
use C4::Context;
11
use C4::Context;
12
12
13
BEGIN {
13
BEGIN {
14
    use_ok('C4::External::Amazon');
14
    use_ok('C4::External::Amazon', qw( get_amazon_tld ));
15
}
15
}
16
16
17
my $context = C4::Context->new();
17
my $context = C4::Context->new();
(-)a/t/db_dependent/Auth.t (-2 / +1 lines)
Lines 15-28 use Test::Warn; Link Here
15
use t::lib::Mocks;
15
use t::lib::Mocks;
16
use t::lib::TestBuilder;
16
use t::lib::TestBuilder;
17
17
18
use C4::Auth qw(checkpw);
19
use C4::Members;
18
use C4::Members;
20
use Koha::AuthUtils qw/hash_password/;
19
use Koha::AuthUtils qw/hash_password/;
21
use Koha::Database;
20
use Koha::Database;
22
use Koha::Patrons;
21
use Koha::Patrons;
23
22
24
BEGIN {
23
BEGIN {
25
    use_ok('C4::Auth');
24
    use_ok('C4::Auth', qw( checkauth haspermission track_login_daily checkpw get_template_and_user checkpw_hash ));
26
}
25
}
27
26
28
my $schema  = Koha::Database->schema;
27
my $schema  = Koha::Database->schema;
(-)a/t/db_dependent/Auth/haspermission.t (-1 / +1 lines)
Lines 25-31 use Test::Exception; Link Here
25
25
26
use Koha::Database;
26
use Koha::Database;
27
use t::lib::TestBuilder;
27
use t::lib::TestBuilder;
28
use C4::Auth qw(haspermission);
28
use C4::Auth qw( haspermission );
29
29
30
my $schema = Koha::Database->new->schema;
30
my $schema = Koha::Database->new->schema;
31
$schema->storage->txn_begin;
31
$schema->storage->txn_begin;
(-)a/t/db_dependent/Auth_with_cas.t (-1 / +1 lines)
Lines 28-34 use C4::Context; Link Here
28
use Koha::Database;
28
use Koha::Database;
29
29
30
BEGIN {
30
BEGIN {
31
    use_ok('C4::Auth_with_cas');
31
    use_ok('C4::Auth_with_cas', qw( check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url ));
32
    can_ok('C4::Auth_with_cas', qw/
32
    can_ok('C4::Auth_with_cas', qw/
33
            check_api_auth_cas
33
            check_api_auth_cas
34
            checkpw_cas
34
            checkpw_cas
(-)a/t/db_dependent/Auth_with_ldap.t (-1 / +1 lines)
Lines 120-126 $builder->build( Link Here
120
my $patron = Koha::Patrons->find($borrower->{borrowernumber});
120
my $patron = Koha::Patrons->find($borrower->{borrowernumber});
121
121
122
# C4::Auth_with_ldap needs several stuff set first ^^^
122
# C4::Auth_with_ldap needs several stuff set first ^^^
123
use_ok('C4::Auth_with_ldap');
123
use_ok('C4::Auth_with_ldap', qw( checkpw_ldap ));
124
can_ok(
124
can_ok(
125
    'C4::Auth_with_ldap', qw/
125
    'C4::Auth_with_ldap', qw/
126
      checkpw_ldap
126
      checkpw_ldap
(-)a/t/db_dependent/AuthoritiesMarc.t (-1 / +1 lines)
Lines 17-23 use Koha::Database; Link Here
17
use Koha::Authority::Types;
17
use Koha::Authority::Types;
18
18
19
BEGIN {
19
BEGIN {
20
        use_ok('C4::AuthoritiesMarc');
20
        use_ok('C4::AuthoritiesMarc', qw( GetHeaderAuthority AddAuthority AddAuthorityTrees GetAuthority BuildAuthHierarchies GenerateHierarchy BuildSummary DelAuthority CompareFieldWithAuthority ModAuthority merge ));
21
}
21
}
22
22
23
# We are now going to be testing the authorities hierarchy code, and
23
# We are now going to be testing the authorities hierarchy code, and
(-)a/t/db_dependent/Authority/Merge.t (-2 / +2 lines)
Lines 13-26 use Test::MockModule; Link Here
13
use t::lib::Mocks;
13
use t::lib::Mocks;
14
use t::lib::TestBuilder;
14
use t::lib::TestBuilder;
15
15
16
use C4::Biblio;
16
use C4::Biblio qw( AddBiblio GetMarcBiblio ModBiblio );
17
use Koha::Authorities;
17
use Koha::Authorities;
18
use Koha::Authority::ControlledIndicators;
18
use Koha::Authority::ControlledIndicators;
19
use Koha::Authority::MergeRequests;
19
use Koha::Authority::MergeRequests;
20
use Koha::Database;
20
use Koha::Database;
21
21
22
BEGIN {
22
BEGIN {
23
        use_ok('C4::AuthoritiesMarc');
23
        use_ok('C4::AuthoritiesMarc', qw( merge AddAuthority compare_fields DelAuthority ));
24
}
24
}
25
25
26
# Optionally change marc flavour
26
# Optionally change marc flavour
(-)a/t/db_dependent/BackgroundJob.t (-2 / +2 lines)
Lines 1-14 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Auth;
4
use C4::Auth qw( get_session );
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
use Test::More tests => 18;
6
use Test::More tests => 18;
7
7
8
use Koha::Database;
8
use Koha::Database;
9
9
10
BEGIN {
10
BEGIN {
11
    use_ok('C4::BackgroundJob');
11
    use_ok('C4::BackgroundJob', qw( get id fetch name invoker progress status size set finish results clear ));
12
}
12
}
13
my $query = CGI->new;
13
my $query = CGI->new;
14
14
(-)a/t/db_dependent/Barcodes.t (-1 / +1 lines)
Lines 29-35 $| = 1; Link Here
29
BEGIN {
29
BEGIN {
30
    use FindBin;
30
    use FindBin;
31
    use lib $FindBin::Bin;
31
    use lib $FindBin::Bin;
32
    use_ok('C4::Barcodes');
32
    use_ok('C4::Barcodes', qw( value initial max db_max next_value next previous serial autoBarcode is_max ));
33
}
33
}
34
34
35
my $builder = t::lib::TestBuilder->new;
35
my $builder = t::lib::TestBuilder->new;
(-)a/t/db_dependent/Barcodes_ValueBuilder.t (-1 / +1 lines)
Lines 23-29 use t::lib::TestBuilder; Link Here
23
use Koha::Database;
23
use Koha::Database;
24
24
25
BEGIN {
25
BEGIN {
26
    use_ok('C4::Barcodes::ValueBuilder');
26
    use_ok('C4::Barcodes::ValueBuilder', qw( get_barcode ));
27
};
27
};
28
28
29
my $schema  = Koha::Database->new->schema;
29
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/Biblio.t (-3 / +3 lines)
Lines 30-39 use Koha::Database; Link Here
30
use Koha::Caches;
30
use Koha::Caches;
31
use Koha::MarcSubfieldStructures;
31
use Koha::MarcSubfieldStructures;
32
32
33
use C4::Linker::Default;
33
use C4::Linker::Default qw( get_link );
34
34
35
BEGIN {
35
BEGIN {
36
    use_ok('C4::Biblio');
36
    use_ok('C4::Biblio', qw( AddBiblio GetMarcFromKohaField BiblioAutoLink GetMarcSubfieldStructure GetMarcSubfieldStructureFromKohaField LinkBibHeadingsToAuthorities GetBiblioData GetMarcBiblio ModBiblio GetMarcISSN GetMarcControlnumber GetMarcISBN GetMarcPrice GetFrameworkCode GetMarcUrls IsMarcStructureInternal GetMarcStructure GetXmlBiblio DelBiblio ));
37
}
37
}
38
38
39
my $schema = Koha::Database->new->schema;
39
my $schema = Koha::Database->new->schema;
Lines 472-478 sub run_tests { Link Here
472
    my $authid = $field->subfield('9');
472
    my $authid = $field->subfield('9');
473
    ok($authid, 'ModBiblio adds authority id');
473
    ok($authid, 'ModBiblio adds authority id');
474
474
475
    use_ok('C4::AuthoritiesMarc');
475
    use_ok('C4::AuthoritiesMarc', qw( GetAuthority ));
476
    my $auth_record = C4::AuthoritiesMarc::GetAuthority($authid);
476
    my $auth_record = C4::AuthoritiesMarc::GetAuthority($authid);
477
    ok($auth_record, 'Authority record successfully retrieved');
477
    ok($auth_record, 'Authority record successfully retrieved');
478
478
(-)a/t/db_dependent/Biblio/Isbd.t (-1 / +1 lines)
Lines 25-31 use t::lib::Mocks qw( mock_preference ); Link Here
25
use Koha::Database;
25
use Koha::Database;
26
26
27
BEGIN {
27
BEGIN {
28
        use_ok('C4::Biblio');
28
        use_ok('C4::Biblio', qw( GetISBDView ));
29
}
29
}
30
30
31
my $schema  = Koha::Database->new->schema;
31
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/Biblio/ModBiblioMarc.t (-1 / +1 lines)
Lines 22-28 use t::lib::Mocks; Link Here
22
use t::lib::TestBuilder;
22
use t::lib::TestBuilder;
23
use MARC::Record;
23
use MARC::Record;
24
24
25
use C4::Biblio;
25
use C4::Biblio qw( ModBiblio ModBiblioMarc GetMarcBiblio );
26
use Koha::Database;
26
use Koha::Database;
27
27
28
my $schema  = Koha::Database->new->schema;
28
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/Biblio/TransformHtmlToMarc.t (-1 / +1 lines)
Lines 8-14 use Test::More tests => 2; Link Here
8
use Koha::Caches;
8
use Koha::Caches;
9
use Koha::Database;
9
use Koha::Database;
10
use Koha::MarcSubfieldStructures;
10
use Koha::MarcSubfieldStructures;
11
use C4::Biblio;
11
use C4::Biblio qw( GetMarcFromKohaField TransformHtmlToMarc );
12
12
13
our ( $biblionumbertagfield, $biblionumbertagsubfield );
13
our ( $biblionumbertagfield, $biblionumbertagsubfield );
14
my $schema  = Koha::Database->new->schema;
14
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/Biblio/TransformKohaToMarc.t (-1 / +1 lines)
Lines 8-14 use t::lib::TestBuilder; Link Here
8
use Koha::Database;
8
use Koha::Database;
9
use Koha::Caches;
9
use Koha::Caches;
10
use Koha::MarcSubfieldStructures;
10
use Koha::MarcSubfieldStructures;
11
use C4::Biblio;
11
use C4::Biblio qw( TransformKohaToMarc );
12
12
13
my $schema  = Koha::Database->new->schema;
13
my $schema  = Koha::Database->new->schema;
14
$schema->storage->txn_begin;
14
$schema->storage->txn_begin;
(-)a/t/db_dependent/Biblio/TransformMarcToKoha.t (-1 / +1 lines)
Lines 28-34 use t::lib::TestBuilder; Link Here
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::Caches;
29
use Koha::Caches;
30
use Koha::MarcSubfieldStructures;
30
use Koha::MarcSubfieldStructures;
31
use C4::Biblio;
31
use C4::Biblio qw( TransformMarcToKoha TransformMarcToKohaOneField );
32
32
33
my $schema  = Koha::Database->new->schema;
33
my $schema  = Koha::Database->new->schema;
34
$schema->storage->txn_begin;
34
$schema->storage->txn_begin;
(-)a/t/db_dependent/Budgets.t (-3 / +3 lines)
Lines 3-13 use Modern::Perl; Link Here
3
use Test::More tests => 144;
3
use Test::More tests => 144;
4
4
5
BEGIN {
5
BEGIN {
6
    use_ok('C4::Budgets')
6
    use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget GetBudgetPeriods GetBudgetPeriod GetBudget ModBudgetPeriod ModBudget DelBudgetPeriod DelBudget GetBudgets GetBudgetName GetBudgetByCode GetBudgetHierarchy GetBudgetHierarchySpent GetBudgetSpent GetBudgetOrdered CloneBudgetPeriod GetBudgetsByActivity MoveOrders GetBudgetByOrderNumber SetOwnerToFundHierarchy GetBudgetAuthCats GetBudgetsPlanCell ));
7
}
7
}
8
use C4::Context;
8
use C4::Context;
9
use C4::Biblio;
9
use C4::Biblio qw( AddBiblio );
10
use C4::Acquisition;
10
use C4::Acquisition qw( NewBasket AddInvoice GetInvoice ModReceiveOrder populate_order_with_prices );
11
11
12
use Koha::Acquisition::Booksellers;
12
use Koha::Acquisition::Booksellers;
13
use Koha::Acquisition::Orders;
13
use Koha::Acquisition::Orders;
(-)a/t/db_dependent/Charset.t (-1 / +1 lines)
Lines 2-8 use Modern::Perl; Link Here
2
use Test::More tests => 4;
2
use Test::More tests => 4;
3
use MARC::Record;
3
use MARC::Record;
4
4
5
use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
5
use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
6
use C4::Context;
6
use C4::Context;
7
use C4::Charset qw( SanitizeRecord );
7
use C4::Charset qw( SanitizeRecord );
8
8
(-)a/t/db_dependent/Circulation.t (-5 / +5 lines)
Lines 32-44 use t::lib::Mocks; Link Here
32
use t::lib::TestBuilder;
32
use t::lib::TestBuilder;
33
33
34
use C4::Accounts;
34
use C4::Accounts;
35
use C4::Calendar;
35
use C4::Calendar qw( new insert_single_holiday insert_week_day_holiday delete_holiday );
36
use C4::Circulation;
36
use C4::Circulation qw( AddIssue AddReturn CanBookBeRenewed GetIssuingCharges AddRenewal GetSoonestRenewDate GetLatestAutoRenewDate LostItem GetUpcomingDueIssues CanBookBeIssued AddIssuingCharge ProcessOfflinePayment transferbook updateWrongTransfer );
37
use C4::Biblio;
37
use C4::Biblio;
38
use C4::Items;
38
use C4::Items qw( ModItemTransfer );
39
use C4::Log;
39
use C4::Log;
40
use C4::Reserves;
40
use C4::Reserves qw( AddReserve ModReserve ModReserveCancelAll ModReserveAffect CheckReserves GetOtherReserves );
41
use C4::Overdues qw(UpdateFine CalcFine);
41
use C4::Overdues qw( CalcFine UpdateFine get_chargeable_units );
42
use Koha::DateUtils;
42
use Koha::DateUtils;
43
use Koha::Database;
43
use Koha::Database;
44
use Koha::Items;
44
use Koha::Items;
(-)a/t/db_dependent/Circulation/Branch.t (-4 / +4 lines)
Lines 17-25 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use C4::Circulation;
20
use C4::Circulation qw( AddIssue AddReturn GetBranchBorrowerCircRule GetBranchItemRule );
21
use C4::Items;
21
use C4::Items qw( ModItemTransfer );
22
use C4::Biblio;
22
use C4::Biblio qw( AddBiblio );
23
use C4::Context;
23
use C4::Context;
24
use Koha::CirculationRules;
24
use Koha::CirculationRules;
25
25
Lines 30-36 use t::lib::Mocks; Link Here
30
use t::lib::TestBuilder;
30
use t::lib::TestBuilder;
31
31
32
BEGIN {
32
BEGIN {
33
    use_ok('C4::Circulation');
33
    use_ok('C4::Circulation', qw( AddIssue AddReturn GetBranchBorrowerCircRule GetBranchItemRule ));
34
}
34
}
35
35
36
can_ok( 'C4::Circulation', qw(
36
can_ok( 'C4::Circulation', qw(
(-)a/t/db_dependent/Circulation/CalcDateDue.t (-2 / +2 lines)
Lines 8-18 use DBI; Link Here
8
use DateTime;
8
use DateTime;
9
use t::lib::Mocks;
9
use t::lib::Mocks;
10
use t::lib::TestBuilder;
10
use t::lib::TestBuilder;
11
use C4::Calendar;
11
use C4::Calendar qw( new insert_single_holiday delete_holiday insert_week_day_holiday );
12
12
13
use Koha::CirculationRules;
13
use Koha::CirculationRules;
14
14
15
use_ok('C4::Circulation');
15
use_ok('C4::Circulation', qw( CalcDateDue ));
16
16
17
my $schema = Koha::Database->new->schema;
17
my $schema = Koha::Database->new->schema;
18
$schema->storage->txn_begin;
18
$schema->storage->txn_begin;
(-)a/t/db_dependent/Circulation/CalcFine.t (-1 / +1 lines)
Lines 5-11 use Modern::Perl; Link Here
5
use Test::More tests => 3;
5
use Test::More tests => 3;
6
6
7
use C4::Context;
7
use C4::Context;
8
use C4::Overdues;
8
use C4::Overdues qw( CalcFine );
9
9
10
use Koha::DateUtils qw( dt_from_string );
10
use Koha::DateUtils qw( dt_from_string );
11
11
(-)a/t/db_dependent/Circulation/CheckIfIssuedToPatron.t (-2 / +2 lines)
Lines 21-29 use Test::More tests => 21; Link Here
21
use Test::MockModule;
21
use Test::MockModule;
22
use t::lib::TestBuilder;
22
use t::lib::TestBuilder;
23
23
24
use C4::Circulation;
24
use C4::Circulation qw( CheckIfIssuedToPatron AddIssue );
25
use C4::Items;
25
use C4::Items;
26
use C4::Biblio;
26
use C4::Biblio qw( AddBiblio );
27
use Koha::Library;
27
use Koha::Library;
28
use Koha::Patrons;
28
use Koha::Patrons;
29
use MARC::Record;
29
use MARC::Record;
(-)a/t/db_dependent/Circulation/CheckValidBarcode.t (-3 / +3 lines)
Lines 19-33 use Modern::Perl; Link Here
19
19
20
use Test::More tests => 10;
20
use Test::More tests => 10;
21
21
22
use C4::Circulation;
22
use C4::Circulation qw( CheckValidBarcode );
23
use C4::Biblio;
23
use C4::Biblio qw( AddBiblio );
24
use C4::Items;
24
use C4::Items;
25
use Koha::Database;
25
use Koha::Database;
26
use Koha::Library;
26
use Koha::Library;
27
27
28
28
29
BEGIN {
29
BEGIN {
30
    use_ok('C4::Circulation');
30
    use_ok('C4::Circulation', qw( CheckValidBarcode ));
31
}
31
}
32
32
33
my $schema = Koha::Database->new->schema;
33
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Circulation/GetHardDueDate.t (-1 / +1 lines)
Lines 13-19 use t::lib::TestBuilder; Link Here
13
use Test::More tests => 9;
13
use Test::More tests => 9;
14
14
15
BEGIN {
15
BEGIN {
16
    use_ok('C4::Circulation');
16
    use_ok('C4::Circulation', qw( GetHardDueDate GetLoanLength ));
17
}
17
}
18
can_ok(
18
can_ok(
19
    'C4::Circulation',
19
    'C4::Circulation',
(-)a/t/db_dependent/Circulation/GetPendingOnSiteCheckouts.t (-2 / +2 lines)
Lines 21-28 use Test::More tests => 2; Link Here
21
use Test::MockModule;
21
use Test::MockModule;
22
use t::lib::TestBuilder;
22
use t::lib::TestBuilder;
23
23
24
use C4::Circulation;
24
use C4::Circulation qw( AddIssue GetPendingOnSiteCheckouts );
25
use C4::Biblio;
25
use C4::Biblio qw( AddBiblio );
26
use C4::Items;
26
use C4::Items;
27
use C4::Members;
27
use C4::Members;
28
28
(-)a/t/db_dependent/Circulation/GetTopIssues.t (-2 / +2 lines)
Lines 23-30 use t::lib::Mocks; Link Here
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Circulation;
26
use C4::Circulation qw( AddIssue GetTopIssues );
27
use C4::Biblio;
27
use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
28
use C4::Items;
28
use C4::Items;
29
29
30
use Koha::Database;
30
use Koha::Database;
(-)a/t/db_dependent/Circulation/IsItemIssued.t (-2 / +2 lines)
Lines 20-28 use Modern::Perl; Link Here
20
use Test::More tests => 5;
20
use Test::More tests => 5;
21
use Test::MockModule;
21
use Test::MockModule;
22
22
23
use C4::Circulation;
23
use C4::Circulation qw( IsItemIssued AddIssue AddReturn );
24
use C4::Items;
24
use C4::Items;
25
use C4::Biblio;
25
use C4::Biblio qw( AddBiblio );
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils;
27
use Koha::DateUtils;
28
use Koha::Items;
28
use Koha::Items;
(-)a/t/db_dependent/Circulation/MarkIssueReturned.t (-1 / +1 lines)
Lines 23-29 use Test::Exception; Link Here
23
use t::lib::Mocks;
23
use t::lib::Mocks;
24
use t::lib::TestBuilder;
24
use t::lib::TestBuilder;
25
25
26
use C4::Circulation;
26
use C4::Circulation qw( MarkIssueReturned AddIssue );
27
use C4::Context;
27
use C4::Context;
28
use Koha::Checkouts;
28
use Koha::Checkouts;
29
use Koha::Database;
29
use Koha::Database;
(-)a/t/db_dependent/Circulation/OfflineOperation.t (-2 / +2 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Circulation;
4
use C4::Circulation qw( AddOfflineOperation GetOfflineOperation GetOfflineOperations DeleteOfflineOperation );
5
5
6
use Koha::Database;
6
use Koha::Database;
7
use Koha::DateUtils qw( dt_from_string output_pref );
7
use Koha::DateUtils qw( dt_from_string output_pref );
Lines 10-16 use Koha::Library; Link Here
10
use Test::More tests => 7;
10
use Test::More tests => 7;
11
11
12
BEGIN {
12
BEGIN {
13
    use_ok('C4::Circulation');
13
    use_ok('C4::Circulation', qw( AddOfflineOperation GetOfflineOperation GetOfflineOperations DeleteOfflineOperation ));
14
}
14
}
15
can_ok(
15
can_ok(
16
    'C4::Circulation',
16
    'C4::Circulation',
(-)a/t/db_dependent/Circulation/ReturnClaims.t (-1 / +1 lines)
Lines 24-30 use Test::Warn; Link Here
24
use t::lib::Mocks;
24
use t::lib::Mocks;
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
27
use C4::Circulation;
27
use C4::Circulation qw( LostItem AddIssue );
28
28
29
# Mock userenv, used by AddIssue
29
# Mock userenv, used by AddIssue
30
my $branch;
30
my $branch;
(-)a/t/db_dependent/Circulation/Returns.t (-2 / +2 lines)
Lines 25-33 use t::lib::Mocks; Link Here
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
27
use C4::Members;
27
use C4::Members;
28
use C4::Circulation;
28
use C4::Circulation qw( AddReturn AddIssue LostItem );
29
use C4::Items;
29
use C4::Items;
30
use C4::Biblio;
30
use C4::Biblio qw( AddBiblio );
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::Account::Lines;
32
use Koha::Account::Lines;
33
use Koha::DateUtils;
33
use Koha::DateUtils;
(-)a/t/db_dependent/Circulation/StoreLastBorrower.t (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Test::More tests => 1;
20
use Test::More tests => 1;
21
21
22
use C4::Circulation;
22
use C4::Circulation qw( AddReturn );
23
use C4::Context;
23
use C4::Context;
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::DateUtils;
25
use Koha::DateUtils;
(-)a/t/db_dependent/Circulation/SwitchOnSiteCheckouts.t (-1 / +1 lines)
Lines 18-24 use Modern::Perl; Link Here
18
use Test::More tests => 10;
18
use Test::More tests => 10;
19
use C4::Context;
19
use C4::Context;
20
20
21
use C4::Circulation;
21
use C4::Circulation qw( TooMany AddIssue CanBookBeIssued );
22
use C4::Biblio;
22
use C4::Biblio;
23
use C4::Items;
23
use C4::Items;
24
use C4::Members;
24
use C4::Members;
(-)a/t/db_dependent/Circulation/TooMany.t (-1 / +1 lines)
Lines 21-27 use C4::Context; Link Here
21
use C4::Members;
21
use C4::Members;
22
use C4::Items;
22
use C4::Items;
23
use C4::Biblio;
23
use C4::Biblio;
24
use C4::Circulation;
24
use C4::Circulation qw( TooMany AddIssue );
25
use C4::Context;
25
use C4::Context;
26
26
27
use Koha::DateUtils qw( dt_from_string );
27
use Koha::DateUtils qw( dt_from_string );
(-)a/t/db_dependent/Circulation/issue.t (-3 / +3 lines)
Lines 23-33 use DateTime::Duration; Link Here
23
use t::lib::Mocks;
23
use t::lib::Mocks;
24
use t::lib::TestBuilder;
24
use t::lib::TestBuilder;
25
25
26
use C4::Biblio;
26
use C4::Biblio qw( AddBiblio );
27
use C4::Circulation;
27
use C4::Circulation qw( AddIssue AddIssuingCharge AddRenewal AddReturn GetIssuingCharges GetOpenIssue GetRenewCount GetUpcomingDueIssues );
28
use C4::Context;
28
use C4::Context;
29
use C4::Items;
29
use C4::Items;
30
use C4::Reserves;
30
use C4::Reserves qw( AddReserve );
31
use Koha::Checkouts;
31
use Koha::Checkouts;
32
use Koha::Database;
32
use Koha::Database;
33
use Koha::DateUtils;
33
use Koha::DateUtils;
(-)a/t/db_dependent/Circulation/transferbook.t (-2 / +2 lines)
Lines 21-28 use Test::More tests => 6; Link Here
21
use t::lib::TestBuilder;
21
use t::lib::TestBuilder;
22
use t::lib::Mocks;
22
use t::lib::Mocks;
23
23
24
use C4::Circulation;
24
use C4::Circulation qw( transferbook AddIssue GetTransfers );
25
use C4::Reserves;
25
use C4::Reserves qw( AddReserve );
26
use Koha::DateUtils qw( dt_from_string );
26
use Koha::DateUtils qw( dt_from_string );
27
use Koha::Item::Transfers;
27
use Koha::Item::Transfers;
28
28
(-)a/t/db_dependent/Circulation/transfers.t (-4 / +4 lines)
Lines 17-25 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use C4::Context;
19
use C4::Context;
20
use C4::Circulation;
20
use C4::Circulation qw( CreateBranchTransferLimit DeleteBranchTransferLimits GetTransfers GetTransfersFromTo TransferSlip );
21
use C4::Biblio;
21
use C4::Biblio qw( AddBiblio );
22
use C4::Items;
22
use C4::Items qw( ModItemTransfer );
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::DateUtils;
24
use Koha::DateUtils;
25
use DateTime::Duration;
25
use DateTime::Duration;
Lines 31-37 use Test::More tests => 22; Link Here
31
use Test::Deep;
31
use Test::Deep;
32
32
33
BEGIN {
33
BEGIN {
34
    use_ok('C4::Circulation');
34
    use_ok('C4::Circulation', qw( CreateBranchTransferLimit DeleteBranchTransferLimits GetTransfers GetTransfersFromTo TransferSlip ));
35
}
35
}
36
can_ok(
36
can_ok(
37
    'C4::Circulation',
37
    'C4::Circulation',
(-)a/t/db_dependent/Contract.t (-1 / +1 lines)
Lines 29-35 use DateTime::Duration; Link Here
29
use Test::More tests => 43;
29
use Test::More tests => 43;
30
30
31
BEGIN {
31
BEGIN {
32
    use_ok('C4::Contract');
32
    use_ok('C4::Contract', qw( GetContracts GetContract AddContract ModContract DelContract ));
33
}
33
}
34
34
35
my $schema = Koha::Database->new->schema;
35
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/CourseReserves.t (-2 / +2 lines)
Lines 23-30 use Koha::Database; Link Here
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
24
25
BEGIN {
25
BEGIN {
26
    use_ok('C4::Biblio');
26
    use_ok('C4::Biblio', qw( AddBiblio ));
27
    use_ok('C4::CourseReserves', qw/:all/);
27
    use_ok('C4::CourseReserves', qw( GetCourse ModCourse GetCourses DelCourse GetCourseInstructors ModCourseInstructors GetCourseItem ModCourseItem GetCourseReserve ModCourseReserve GetCourseReserves DelCourseReserve SearchCourses GetItemCourseReservesInfo ));
28
    use_ok('C4::Context');
28
    use_ok('C4::Context');
29
    use_ok('MARC::Field');
29
    use_ok('MARC::Field');
30
    use_ok('MARC::Record');
30
    use_ok('MARC::Record');
(-)a/t/db_dependent/CourseReserves/CourseItems.t (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use t::lib::Mocks;
20
use t::lib::Mocks;
21
use t::lib::TestBuilder;
21
use t::lib::TestBuilder;
22
use C4::CourseReserves qw/ModCourseItem ModCourseReserve DelCourseReserve GetCourseItem/;
22
use C4::CourseReserves qw( ModCourse ModCourseItem ModCourseReserve GetCourse GetCourseItem DelCourse DelCourseReserve );
23
use C4::Context;
23
use C4::Context;
24
use Koha::Items;
24
use Koha::Items;
25
25
(-)a/t/db_dependent/Creators/Lib.t (-1 / +1 lines)
Lines 26-32 use Koha::Database; Link Here
26
use Test::Warn;
26
use Test::Warn;
27
27
28
BEGIN {
28
BEGIN {
29
    use_ok('C4::Creators::Lib');
29
    use_ok('C4::Creators::Lib', qw( get_all_templates get_all_layouts get_all_profiles get_all_image_names get_batch_summary get_label_summary get_card_summary get_barcode_types get_label_types get_font_types get_text_justification_types get_output_formats get_table_names get_unit_values html_table ));
30
    use_ok('C4::Biblio');
30
    use_ok('C4::Biblio');
31
    use_ok('C4::Context');
31
    use_ok('C4::Context');
32
    use_ok('Koha::Patron');
32
    use_ok('Koha::Patron');
(-)a/t/db_dependent/DecreaseLoanHighHolds.t (-1 / +1 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
use DateTime;
19
use DateTime;
20
20
21
use C4::Circulation;
21
use C4::Circulation qw( CalcDateDue checkHighHolds CanBookBeIssued );
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils;
23
use Koha::DateUtils;
24
use Koha::Patrons;
24
use Koha::Patrons;
(-)a/t/db_dependent/Exporter/Record.t (-1 / +1 lines)
Lines 28-34 use MARC::Batch; Link Here
28
use File::Slurp;
28
use File::Slurp;
29
use Encode;
29
use Encode;
30
30
31
use C4::Biblio;
31
use C4::Biblio qw( AddBiblio );
32
use C4::Context;
32
use C4::Context;
33
use Koha::Database;
33
use Koha::Database;
34
use Koha::Biblio;
34
use Koha::Biblio;
(-)a/t/db_dependent/Filter_MARC_ViewPolicy.t (-1 / +1 lines)
Lines 29-35 use List::MoreUtils qw/any/; Link Here
29
use MARC::Record;
29
use MARC::Record;
30
use MARC::Field;
30
use MARC::Field;
31
use C4::Context;
31
use C4::Context;
32
use C4::Biblio;
32
use C4::Biblio qw( GetMarcFromKohaField );
33
use Koha::Caches;
33
use Koha::Caches;
34
use Koha::Database;
34
use Koha::Database;
35
35
(-)a/t/db_dependent/Fines.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use C4::Context;
5
use C4::Context;
6
use C4::Overdues;
6
use C4::Overdues qw( CalcFine );
7
use Koha::Database;
7
use Koha::Database;
8
use Koha::DateUtils;
8
use Koha::DateUtils;
9
9
(-)a/t/db_dependent/FrameworkPlugin.t (-2 / +2 lines)
Lines 8-15 use Test::More tests => 5; Link Here
8
8
9
use t::lib::TestBuilder;
9
use t::lib::TestBuilder;
10
10
11
use C4::Auth;
11
use C4::Auth qw( checkauth );
12
use C4::Output;
12
use C4::Output qw( output_html_with_http_headers );
13
use Koha::Database;
13
use Koha::Database;
14
use Koha::FrameworkPlugin;
14
use Koha::FrameworkPlugin;
15
15
(-)a/t/db_dependent/Heading.t (-1 / +1 lines)
Lines 23-29 use Test::More tests => 3; Link Here
23
use t::lib::Mocks;
23
use t::lib::Mocks;
24
24
25
BEGIN {
25
BEGIN {
26
    use_ok('C4::Heading');
26
    use_ok('C4::Heading', qw( field valid_heading_subfield ));
27
}
27
}
28
28
29
subtest "MARC21 tests" => sub {
29
subtest "MARC21 tests" => sub {
(-)a/t/db_dependent/Heading_MARC21.t (-1 / +1 lines)
Lines 10-16 use Test::More tests => 5; Link Here
10
use C4::Context;
10
use C4::Context;
11
11
12
BEGIN {
12
BEGIN {
13
        use_ok('C4::Heading');
13
        use_ok('C4::Heading', qw( field new_from_field display_form search_form ));
14
}
14
}
15
15
16
SKIP: {
16
SKIP: {
(-)a/t/db_dependent/Hold.t (-1 / +1 lines)
Lines 22-28 use C4::Context; Link Here
22
use C4::Biblio qw( AddBiblio );
22
use C4::Biblio qw( AddBiblio );
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::Libraries;
24
use Koha::Libraries;
25
use C4::Calendar;
25
use C4::Calendar qw( new insert_single_holiday );
26
use Koha::Patrons;
26
use Koha::Patrons;
27
use Koha::Holds;
27
use Koha::Holds;
28
use Koha::Item;
28
use Koha::Item;
(-)a/t/db_dependent/Holds.t (-2 / +2 lines)
Lines 13-20 use MARC::Record; Link Here
13
use C4::Biblio;
13
use C4::Biblio;
14
use C4::Calendar;
14
use C4::Calendar;
15
use C4::Items;
15
use C4::Items;
16
use C4::Reserves;
16
use C4::Reserves qw( AddReserve CalculatePriority ModReserve ToggleSuspend AutoUnsuspendReserves SuspendAll ModReserveMinusPriority AlterPriority CanItemBeReserved CheckReserves );
17
use C4::Circulation;
17
use C4::Circulation qw( CanBookBeRenewed );
18
18
19
use Koha::Biblios;
19
use Koha::Biblios;
20
use Koha::CirculationRules;
20
use Koha::CirculationRules;
(-)a/t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t (-2 / +2 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use C4::Context;
5
use C4::Context;
6
use C4::Circulation;
6
use C4::Circulation qw( AddIssue AddReturn );
7
use C4::Items;
7
use C4::Items;
8
use Koha::Items;
8
use Koha::Items;
9
use Koha::CirculationRules;
9
use Koha::CirculationRules;
Lines 14-20 use t::lib::TestBuilder; Link Here
14
use t::lib::Mocks;
14
use t::lib::Mocks;
15
15
16
BEGIN {
16
BEGIN {
17
    use_ok('C4::Reserves');
17
    use_ok('C4::Reserves', qw( ItemsAnyAvailableAndNotRestricted IsAvailableForItemLevelRequest ));
18
}
18
}
19
19
20
my $schema = Koha::Database->schema;
20
my $schema = Koha::Database->schema;
(-)a/t/db_dependent/Holds/HoldFulfillmentPolicy.t (-1 / +1 lines)
Lines 12-18 use t::lib::Mocks; Link Here
12
use Koha::Holds;
12
use Koha::Holds;
13
13
14
BEGIN {
14
BEGIN {
15
    use_ok('C4::Reserves');
15
    use_ok('C4::Reserves', qw( AddReserve CheckReserves ));
16
}
16
}
17
17
18
my $schema = Koha::Database->schema;
18
my $schema = Koha::Database->schema;
(-)a/t/db_dependent/Holds/HoldItemtypeLimit.t (-1 / +1 lines)
Lines 14-20 use Koha::Holds; Link Here
14
BEGIN {
14
BEGIN {
15
    use FindBin;
15
    use FindBin;
16
    use lib $FindBin::Bin;
16
    use lib $FindBin::Bin;
17
    use_ok('C4::Reserves');
17
    use_ok('C4::Reserves', qw( AddReserve CheckReserves ));
18
}
18
}
19
19
20
my $schema = Koha::Database->schema;
20
my $schema = Koha::Database->schema;
(-)a/t/db_dependent/Holds/LocalHoldsPriority.t (-2 / +2 lines)
Lines 19-25 use t::lib::TestBuilder; Link Here
19
BEGIN {
19
BEGIN {
20
    use FindBin;
20
    use FindBin;
21
    use lib $FindBin::Bin;
21
    use lib $FindBin::Bin;
22
    use_ok('C4::Reserves');
22
    use_ok('C4::Reserves', qw( AddReserve CheckReserves ));
23
}
23
}
24
24
25
my $schema = Koha::Database->schema;
25
my $schema = Koha::Database->schema;
Lines 208-211 subtest "exclude from local holds" => sub { Link Here
208
    is($reserve->{borrowernumber}, $patron_nex_l2->borrowernumber, "Patron from other library is next checkout because item is excluded");
208
    is($reserve->{borrowernumber}, $patron_nex_l2->borrowernumber, "Patron from other library is next checkout because item is excluded");
209
209
210
    $schema->storage->txn_rollback;
210
    $schema->storage->txn_rollback;
211
};
211
};
(-)a/t/db_dependent/Holds/RevertWaitingStatus.t (-1 / +1 lines)
Lines 24-30 use Koha::Patrons; Link Here
24
use C4::Context;
24
use C4::Context;
25
use C4::Items;
25
use C4::Items;
26
use C4::Biblio;
26
use C4::Biblio;
27
use C4::Reserves;
27
use C4::Reserves qw( AddReserve ModReserve ModReserveAffect );
28
28
29
use t::lib::TestBuilder;
29
use t::lib::TestBuilder;
30
use t::lib::Mocks;
30
use t::lib::Mocks;
(-)a/t/db_dependent/Holds/WaitingReserves.t (-2 / +2 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use C4::Reserves;
5
use C4::Reserves qw( ModReserve ModReserveAffect );
6
use Koha::DateUtils;
6
use Koha::DateUtils;
7
7
8
use t::lib::Mocks;
8
use t::lib::Mocks;
Lines 10-16 use t::lib::TestBuilder; Link Here
10
10
11
use Test::More tests => 11;
11
use Test::More tests => 11;
12
12
13
use_ok('C4::Reserves');
13
use_ok('C4::Reserves', qw( ModReserve ModReserveAffect ));
14
14
15
my $schema  = Koha::Database->new->schema;
15
my $schema  = Koha::Database->new->schema;
16
$schema->storage->txn_begin;
16
$schema->storage->txn_begin;
(-)a/t/db_dependent/HoldsQueue.t (-4 / +4 lines)
Lines 11-20 use Modern::Perl; Link Here
11
use Test::More tests => 57;
11
use Test::More tests => 57;
12
use Data::Dumper;
12
use Data::Dumper;
13
13
14
use C4::Calendar;
14
use C4::Calendar qw( new insert_single_holiday );
15
use C4::Context;
15
use C4::Context;
16
use C4::Members;
16
use C4::Members;
17
use C4::Circulation;
17
use C4::Circulation qw( AddIssue AddReturn );
18
use Koha::Database;
18
use Koha::Database;
19
use Koha::DateUtils;
19
use Koha::DateUtils;
20
use Koha::Items;
20
use Koha::Items;
Lines 27-34 use t::lib::Mocks; Link Here
27
BEGIN {
27
BEGIN {
28
    use FindBin;
28
    use FindBin;
29
    use lib $FindBin::Bin;
29
    use lib $FindBin::Bin;
30
    use_ok('C4::Reserves');
30
    use_ok('C4::Reserves', qw( AddReserve ModReserve ModReserveAffect ));
31
    use_ok('C4::HoldsQueue');
31
    use_ok('C4::HoldsQueue', qw( TransportCostMatrix GetHoldsQueueItems CreateQueue UpdateTransportCostMatrix GetPendingHoldRequestsForBib ));
32
}
32
}
33
33
34
my $schema = Koha::Database->schema;
34
my $schema = Koha::Database->schema;
(-)a/t/db_dependent/Holidays.t (-1 / +1 lines)
Lines 30-36 use Koha::DateUtils; Link Here
30
30
31
BEGIN {
31
BEGIN {
32
    use_ok('Koha::Calendar');
32
    use_ok('Koha::Calendar');
33
    use_ok('C4::Calendar');
33
    use_ok('C4::Calendar', qw( insert_exception_holiday insert_week_day_holiday insert_day_month_holiday insert_single_holiday copy_to_branch get_exception_holidays isHoliday ));
34
}
34
}
35
35
36
my $schema = Koha::Database->new->schema;
36
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/ILSDI_Services.t (-2 / +2 lines)
Lines 25-36 use t::lib::Mocks; Link Here
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
27
use C4::Items qw( ModItemTransfer );
27
use C4::Items qw( ModItemTransfer );
28
use C4::Circulation;
28
use C4::Circulation qw( AddIssue );
29
29
30
use Koha::AuthUtils;
30
use Koha::AuthUtils;
31
31
32
BEGIN {
32
BEGIN {
33
    use_ok('C4::ILSDI::Services');
33
    use_ok('C4::ILSDI::Services', qw( AuthenticatePatron GetPatronInfo LookupPatron HoldTitle HoldItem GetRecords RenewLoan ));
34
}
34
}
35
35
36
my $schema  = Koha::Database->schema;
36
my $schema  = Koha::Database->schema;
(-)a/t/db_dependent/Illrequests.t (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use File::Basename qw/basename/;
20
use File::Basename qw/basename/;
21
21
22
use C4::Circulation qw(AddIssue AddReturn);
22
use C4::Circulation qw( AddIssue AddReturn );
23
23
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::Illrequestattributes;
25
use Koha::Illrequestattributes;
(-)a/t/db_dependent/ImportBatch.t (-1 / +1 lines)
Lines 16-22 BEGIN { Link Here
16
    # Mock pluginsdir before loading Plugins module
16
    # Mock pluginsdir before loading Plugins module
17
    my $path = dirname(__FILE__) . '/../lib';
17
    my $path = dirname(__FILE__) . '/../lib';
18
    t::lib::Mocks::mock_config( 'pluginsdir', $path );
18
    t::lib::Mocks::mock_config( 'pluginsdir', $path );
19
    use_ok('C4::ImportBatch');
19
    use_ok('C4::ImportBatch', qw( AddImportBatch GetImportBatch AddBiblioToBatch AddItemsToImportBiblio GetRecordFromImportBiblio SetMatchedBiblionumber GetImportBiblios GetItemNumbersFromImportBatch CleanBatch DeleteBatch RecordsFromMarcPlugin ));
20
}
20
}
21
21
22
# Start transaction
22
# Start transaction
(-)a/t/db_dependent/ImportExportFramework.t (-1 / +1 lines)
Lines 26-32 use File::Basename qw( dirname ); Link Here
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::BiblioFrameworks;
27
use Koha::BiblioFrameworks;
28
use Koha::MarcSubfieldStructures;
28
use Koha::MarcSubfieldStructures;
29
use C4::ImportExportFramework;
29
use C4::ImportExportFramework qw( ImportFramework ExportFramework );
30
30
31
my $schema  = Koha::Database->new->schema;
31
my $schema  = Koha::Database->new->schema;
32
my $builder = t::lib::TestBuilder->new;
32
my $builder = t::lib::TestBuilder->new;
(-)a/t/db_dependent/Installer.t (-1 / +1 lines)
Lines 29-35 use utf8; Link Here
29
use Koha::Database;
29
use Koha::Database;
30
30
31
BEGIN {
31
BEGIN {
32
    use_ok('C4::Installer');
32
    use_ok('C4::Installer', qw( column_exists index_exists foreign_key_exists primary_key_exists marc_framework_sql_list ));
33
}
33
}
34
34
35
ok( my $installer = C4::Installer->new(), 'Testing NewInstaller' );
35
ok( my $installer = C4::Installer->new(), 'Testing NewInstaller' );
(-)a/t/db_dependent/Items.t (-2 / +2 lines)
Lines 19-26 use Modern::Perl; Link Here
19
use Data::Dumper;
19
use Data::Dumper;
20
20
21
use MARC::Record;
21
use MARC::Record;
22
use C4::Items;
22
use C4::Items qw( ModItemTransfer GetHiddenItemnumbers GetItemsInfo SearchItems AddItemFromMarc ModItemFromMarc get_hostitemnumbers_of Item2Marc );
23
use C4::Biblio;
23
use C4::Biblio qw( GetMarcFromKohaField EmbedItemsInMarcBiblio GetMarcBiblio AddBiblio );
24
use Koha::Items;
24
use Koha::Items;
25
use Koha::Database;
25
use Koha::Database;
26
use Koha::DateUtils qw( dt_from_string );
26
use Koha::DateUtils qw( dt_from_string );
(-)a/t/db_dependent/Items/AutomaticItemModificationByAge.t (-2 / +2 lines)
Lines 7-14 use MARC::Field; Link Here
7
use DateTime;
7
use DateTime;
8
use DateTime::Duration;
8
use DateTime::Duration;
9
9
10
use C4::Items;
10
use C4::Items qw( GetMarcItem ToggleNewStatus );
11
use C4::Biblio;
11
use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
12
use C4::Context;
12
use C4::Context;
13
use Koha::DateUtils;
13
use Koha::DateUtils;
14
use Koha::Items;
14
use Koha::Items;
(-)a/t/db_dependent/Items/GetHostItemsInfo.t (-1 / +1 lines)
Lines 4-10 use Test::More tests => 1; Link Here
4
use t::lib::Mocks;
4
use t::lib::Mocks;
5
use t::lib::TestBuilder;
5
use t::lib::TestBuilder;
6
6
7
use C4::Items;
7
use C4::Items qw( GetHostItemsInfo );
8
use Koha::Database;
8
use Koha::Database;
9
9
10
my $schema = Koha::Database->new->schema;
10
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Items/GetItemsForInventory.t (-3 / +3 lines)
Lines 25-32 use t::lib::TestBuilder; Link Here
25
use List::MoreUtils qw( any none );
25
use List::MoreUtils qw( any none );
26
26
27
use C4::Biblio qw(AddBiblio);
27
use C4::Biblio qw(AddBiblio);
28
use C4::Reserves;
28
use C4::Reserves qw( AddReserve );
29
use C4::ClassSource;
29
use C4::ClassSource qw( GetClassSort );
30
use Koha::AuthorisedValues;
30
use Koha::AuthorisedValues;
31
use Koha::Biblios;
31
use Koha::Biblios;
32
use Koha::Database;
32
use Koha::Database;
Lines 34-40 use MARC::Record; Link Here
34
34
35
BEGIN {
35
BEGIN {
36
    use_ok('C4::Context');
36
    use_ok('C4::Context');
37
    use_ok('C4::Items');
37
    use_ok('C4::Items', qw( GetItemsForInventory ));
38
    use_ok('C4::Biblio');
38
    use_ok('C4::Biblio');
39
    use_ok('C4::Koha');
39
    use_ok('C4::Koha');
40
}
40
}
(-)a/t/db_dependent/Items/MoveItemFromBiblio.t (-1 / +1 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
use Test::More tests => 8;
19
use Test::More tests => 8;
20
20
21
use C4::Items;
21
use C4::Items qw( MoveItemFromBiblio );
22
use C4::Reserves;
22
use C4::Reserves;
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::Holds;
24
use Koha::Holds;
(-)a/t/db_dependent/Koha.t (-1 / +1 lines)
Lines 14-20 use Koha::AuthorisedValue; Link Here
14
use Koha::AuthorisedValueCategories;
14
use Koha::AuthorisedValueCategories;
15
15
16
BEGIN {
16
BEGIN {
17
    use_ok('C4::Koha', qw( :DEFAULT GetItemTypesCategorized));
17
    use_ok('C4::Koha', qw( GetAuthorisedValues GetItemTypesCategorized xml_escape ));
18
    use_ok('C4::Members');
18
    use_ok('C4::Members');
19
}
19
}
20
20
(-)a/t/db_dependent/Koha/Account/Line.t (-1 / +1 lines)
Lines 25-31 use Test::MockModule; Link Here
25
25
26
use DateTime;
26
use DateTime;
27
27
28
use C4::Circulation qw/AddIssue AddReturn/;
28
use C4::Circulation qw( AddRenewal CanBookBeRenewed LostItem AddIssue AddReturn );
29
use Koha::Account;
29
use Koha::Account;
30
use Koha::Account::Lines;
30
use Koha::Account::Lines;
31
use Koha::Account::Offsets;
31
use Koha::Account::Offsets;
(-)a/t/db_dependent/Koha/Acquisition/Basket.t (-1 / +1 lines)
Lines 25-31 use Test::Exception; Link Here
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
use t::lib::Mocks;
26
use t::lib::Mocks;
27
27
28
use C4::Acquisition;
28
use C4::Acquisition qw( NewBasket ModBasket ModBasketHeader );
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::DateUtils qw(dt_from_string);
30
use Koha::DateUtils qw(dt_from_string);
31
31
(-)a/t/db_dependent/Koha/Acquisition/Booksellers.t (-4 / +4 lines)
Lines 21-30 use Test::More tests => 3; Link Here
21
21
22
use t::lib::TestBuilder;
22
use t::lib::TestBuilder;
23
23
24
use C4::Acquisition;
24
use C4::Acquisition qw( NewBasket );
25
use C4::Biblio;
25
use C4::Biblio qw( AddBiblio );
26
use C4::Budgets;
26
use C4::Budgets qw( AddBudgetPeriod AddBudget );
27
use C4::Serials;
27
use C4::Serials qw( NewSubscription SearchSubscriptions );
28
28
29
use Koha::Acquisition::Booksellers;
29
use Koha::Acquisition::Booksellers;
30
use Koha::Database;
30
use Koha::Database;
(-)a/t/db_dependent/Koha/Acquisition/Order.t (-1 / +1 lines)
Lines 25-31 use Test::Exception; Link Here
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
use t::lib::Mocks;
26
use t::lib::Mocks;
27
27
28
use C4::Circulation;
28
use C4::Circulation qw( AddIssue AddReturn );
29
29
30
use Koha::Biblios;
30
use Koha::Biblios;
31
use Koha::Database;
31
use Koha::Database;
(-)a/t/db_dependent/Koha/ActionLogs.t (-1 / +1 lines)
Lines 20-26 use Modern::Perl; Link Here
20
use Test::More tests => 3;
20
use Test::More tests => 3;
21
21
22
use C4::Context;
22
use C4::Context;
23
use C4::Log;
23
use C4::Log qw( logaction );
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::DateUtils qw( dt_from_string );
25
use Koha::DateUtils qw( dt_from_string );
26
26
(-)a/t/db_dependent/Koha/Authorities.t (-1 / +1 lines)
Lines 29-35 use Test::MockObject; Link Here
29
use Test::Warn;
29
use Test::Warn;
30
30
31
use C4::Context;
31
use C4::Context;
32
use C4::AuthoritiesMarc;
32
use C4::AuthoritiesMarc qw( merge AddAuthority );
33
use Koha::Authority;
33
use Koha::Authority;
34
use Koha::Authority::ControlledIndicators;
34
use Koha::Authority::ControlledIndicators;
35
use Koha::Authorities;
35
use Koha::Authorities;
(-)a/t/db_dependent/Koha/Biblio.t (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Test::More tests => 14;
20
use Test::More tests => 14;
21
21
22
use C4::Biblio;
22
use C4::Biblio qw( AddBiblio ModBiblio );
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::Acquisition::Orders;
24
use Koha::Acquisition::Orders;
25
25
(-)a/t/db_dependent/Koha/Biblio/Metadata.t (-1 / +1 lines)
Lines 22-28 use Test::Exception; Link Here
22
22
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
24
25
use C4::Biblio;
25
use C4::Biblio qw( AddBiblio );
26
use Koha::Database;
26
use Koha::Database;
27
27
28
BEGIN {
28
BEGIN {
(-)a/t/db_dependent/Koha/Biblios.t (-2 / +2 lines)
Lines 27-34 use Test::MockModule; Link Here
27
use MARC::Field;
27
use MARC::Field;
28
28
29
use C4::Items;
29
use C4::Items;
30
use C4::Biblio;
30
use C4::Biblio qw( AddBiblio ModBiblio );
31
use C4::Reserves;
31
use C4::Reserves qw( AddReserve );
32
32
33
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::DateUtils qw( dt_from_string output_pref );
34
use Koha::Biblios;
34
use Koha::Biblios;
(-)a/t/db_dependent/Koha/Charges/Fees.t (-1 / +1 lines)
Lines 28-34 use t::lib::TestBuilder; Link Here
28
use t::lib::Dates;
28
use t::lib::Dates;
29
29
30
use Time::Fake;
30
use Time::Fake;
31
use C4::Calendar;
31
use C4::Calendar qw( new insert_week_day_holiday delete_holiday );
32
use Koha::DateUtils qw(dt_from_string);
32
use Koha::DateUtils qw(dt_from_string);
33
33
34
BEGIN {
34
BEGIN {
(-)a/t/db_dependent/Koha/Checkouts.t (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use Test::More tests => 10;
22
use Test::More tests => 10;
23
23
24
use C4::Circulation;
24
use C4::Circulation qw( MarkIssueReturned AddReturn );
25
use Koha::Checkouts;
25
use Koha::Checkouts;
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils qw( dt_from_string );
27
use Koha::DateUtils qw( dt_from_string );
(-)a/t/db_dependent/Koha/Club/Enrollment.t (-1 / +1 lines)
Lines 45-48 subtest 'is_canceled' => sub { Link Here
45
    ok($enrollment->is_canceled, 'Enrollment should be canceled');
45
    ok($enrollment->is_canceled, 'Enrollment should be canceled');
46
46
47
    $schema->storage->txn_rollback;
47
    $schema->storage->txn_rollback;
48
}
48
}
(-)a/t/db_dependent/Koha/Filter/EmbedItems.t (-1 / +1 lines)
Lines 21-27 use Test::More tests => 1; Link Here
21
21
22
use t::lib::TestBuilder;
22
use t::lib::TestBuilder;
23
23
24
use C4::Biblio;
24
use C4::Biblio qw( GetMarcSubfieldStructure );
25
25
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::RecordProcessor;
27
use Koha::RecordProcessor;
(-)a/t/db_dependent/Koha/Filter/EmbedItemsAvailability.t (-1 / +1 lines)
Lines 25-31 use t::lib::TestBuilder; Link Here
25
25
26
use MARC::Record;
26
use MARC::Record;
27
27
28
use C4::Biblio qw/AddBiblio GetMarcBiblio/;
28
use C4::Biblio qw( GetMarcFromKohaField AddBiblio GetMarcBiblio );
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::RecordProcessor;
30
use Koha::RecordProcessor;
31
31
(-)a/t/db_dependent/Koha/Holds.t (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use Test::More tests => 6;
22
use Test::More tests => 6;
23
use Test::Warn;
23
use Test::Warn;
24
24
25
use C4::Circulation;
25
use C4::Circulation qw( AddIssue );
26
use C4::Reserves;
26
use C4::Reserves qw( AddReserve ModReserve ModReserveCancelAll );
27
use Koha::AuthorisedValueCategory;
27
use Koha::AuthorisedValueCategory;
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::Holds;
29
use Koha::Holds;
(-)a/t/db_dependent/Koha/Item.t (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use Test::More tests => 9;
22
use Test::More tests => 9;
23
use Test::Exception;
23
use Test::Exception;
24
24
25
use C4::Biblio;
25
use C4::Biblio qw( GetMarcSubfieldStructure );
26
use C4::Circulation;
26
use C4::Circulation qw( AddIssue AddReturn );
27
27
28
use Koha::Items;
28
use Koha::Items;
29
use Koha::Database;
29
use Koha::Database;
(-)a/t/db_dependent/Koha/ItemTypes.t (-1 / +1 lines)
Lines 25-31 use Test::More tests => 14; Link Here
25
use t::lib::Mocks;
25
use t::lib::Mocks;
26
use t::lib::TestBuilder;
26
use t::lib::TestBuilder;
27
27
28
use C4::Calendar;
28
use C4::Calendar qw( new );
29
use Koha::Biblioitems;
29
use Koha::Biblioitems;
30
use Koha::Libraries;
30
use Koha::Libraries;
31
use Koha::Database;
31
use Koha::Database;
(-)a/t/db_dependent/Koha/Items.t (-1 / +1 lines)
Lines 25-31 use Test::MockModule; Link Here
25
use Test::Exception;
25
use Test::Exception;
26
use Time::Fake;
26
use Time::Fake;
27
27
28
use C4::Circulation;
28
use C4::Circulation qw( AddIssue LostItem AddReturn );
29
use C4::Context;
29
use C4::Context;
30
use Koha::Item;
30
use Koha::Item;
31
use Koha::Item::Transfer::Limits;
31
use Koha::Item::Transfer::Limits;
(-)a/t/db_dependent/Koha/Object.t (-2 / +2 lines)
Lines 23-30 use Test::Warn; Link Here
23
use DateTime;
23
use DateTime;
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Circulation; # AddIssue
26
use C4::Circulation qw( AddIssue );
27
use C4::Biblio; # AddBiblio
27
use C4::Biblio qw( AddBiblio );
28
28
29
use Koha::Database;
29
use Koha::Database;
30
30
(-)a/t/db_dependent/Koha/Patron/Category.t (-1 / +1 lines)
Lines 201-204 subtest 'effective_require_strong_password' => sub { Link Here
201
  is($category->effective_require_strong_password, 1, 'Patron should be required strong password from category');
201
  is($category->effective_require_strong_password, 1, 'Patron should be required strong password from category');
202
202
203
  $schema->storage->txn_rollback;
203
  $schema->storage->txn_rollback;
204
};
204
};
(-)a/t/db_dependent/Koha/Patrons.t (-2 / +2 lines)
Lines 29-37 use JSON; Link Here
29
use Data::Dumper;
29
use Data::Dumper;
30
use utf8;
30
use utf8;
31
31
32
use C4::Circulation;
32
use C4::Circulation qw( AddIssue AddReturn );
33
use C4::Biblio;
33
use C4::Biblio;
34
use C4::Auth qw(checkpw_hash);
34
use C4::Auth qw( checkpw checkpw_hash );
35
35
36
use Koha::ActionLogs;
36
use Koha::ActionLogs;
37
use Koha::Holds;
37
use Koha::Holds;
(-)a/t/db_dependent/Koha/Plugins/Circulation_hooks.t (-1 / +1 lines)
Lines 22-28 use Test::Warn; Link Here
22
22
23
use File::Basename;
23
use File::Basename;
24
24
25
use C4::Circulation qw(AddIssue AddRenewal AddReturn);
25
use C4::Circulation qw( AddIssue AddRenewal AddReturn );
26
26
27
use t::lib::Mocks;
27
use t::lib::Mocks;
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
(-)a/t/db_dependent/Koha/Plugins/Holds_hooks.t (-1 / +1 lines)
Lines 22-28 use Test::Warn; Link Here
22
22
23
use File::Basename;
23
use File::Basename;
24
24
25
use C4::Reserves qw(AddReserve);
25
use C4::Reserves qw( AddReserve );
26
26
27
use t::lib::Mocks;
27
use t::lib::Mocks;
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
(-)a/t/db_dependent/Koha/Pseudonymization.t (-2 / +2 lines)
Lines 22-29 use Modern::Perl; Link Here
22
use Test::More tests => 3;
22
use Test::More tests => 3;
23
use Try::Tiny;
23
use Try::Tiny;
24
24
25
use C4::Circulation;
25
use C4::Circulation qw( AddIssue AddReturn );
26
use C4::Stats;
26
use C4::Stats qw( UpdateStats );
27
27
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::DateUtils qw( dt_from_string );
29
use Koha::DateUtils qw( dt_from_string );
(-)a/t/db_dependent/Koha/SearchEngine/Indexer.t (-4 / +4 lines)
Lines 15-24 use Test::MockObject; Link Here
15
use t::lib::Mocks;
15
use t::lib::Mocks;
16
16
17
#use C4::Biblio qw//;
17
#use C4::Biblio qw//;
18
use C4::AuthoritiesMarc;
18
use C4::AuthoritiesMarc qw( AddAuthority DelAuthority merge );
19
use C4::Biblio;
19
use C4::Biblio qw( ModZebra ModBiblio ModBiblioMarc DelBiblio );
20
use C4::Circulation;
20
use C4::Circulation qw( MarkIssueReturned AddReturn LostItem );
21
use C4::Items;
21
use C4::Items qw( ModDateLastSeen ModItemTransfer );
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils;
23
use Koha::DateUtils;
24
use Koha::SearchEngine::Elasticsearch;
24
use Koha::SearchEngine::Elasticsearch;
(-)a/t/db_dependent/Koha/Statistics.t (-1 / +1 lines)
Lines 23-29 use Test::More tests => 4; Link Here
23
23
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::Statistics;
25
use Koha::Statistics;
26
use C4::Stats;
26
use C4::Stats qw( UpdateStats );
27
27
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
29
29
(-)a/t/db_dependent/Koha/Z3950Responder/Session.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 3;
4
use Test::More tests => 3;
5
use t::lib::TestBuilder;
5
use t::lib::TestBuilder;
6
use C4::Items;
6
use C4::Items qw( GetMarcItem );
7
7
8
BEGIN {
8
BEGIN {
9
    use_ok('Koha::Z3950Responder');
9
    use_ok('Koha::Z3950Responder');
(-)a/t/db_dependent/Koha/Z3950Responder/Session2.t (-1 / +1 lines)
Lines 3-9 Link Here
3
use Modern::Perl;
3
use Modern::Perl;
4
use Test::More tests => 3;
4
use Test::More tests => 3;
5
use t::lib::TestBuilder;
5
use t::lib::TestBuilder;
6
use C4::Items;
6
use C4::Items qw( GetMarcItem );
7
7
8
use Koha::Caches;
8
use Koha::Caches;
9
9
(-)a/t/db_dependent/Koha_Authority.t (-2 / +2 lines)
Lines 20-27 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use C4::Context;
22
use C4::Context;
23
use C4::Charset;
23
use C4::Charset qw( MarcToUTF8Record );
24
use C4::AuthoritiesMarc;
24
use C4::AuthoritiesMarc qw( AddAuthority );
25
use Koha::Database;
25
use Koha::Database;
26
use Test::More;
26
use Test::More;
27
use File::Basename;
27
use File::Basename;
(-)a/t/db_dependent/Koha_ExternalContent_RecordedBooks.t (-1 / +1 lines)
Lines 3-9 use Modern::Perl; Link Here
3
use t::lib::Mocks;
3
use t::lib::Mocks;
4
use t::lib::TestBuilder;
4
use t::lib::TestBuilder;
5
use Test::More tests => 3;                      # last test to print
5
use Test::More tests => 3;                      # last test to print
6
use C4::Auth;
6
use C4::Auth qw( get_session );
7
use Koha::Database;
7
use Koha::Database;
8
8
9
use Module::Load::Conditional qw( can_load );
9
use Module::Load::Conditional qw( can_load );
(-)a/t/db_dependent/Labels/t_Batch.t (-3 / +3 lines)
Lines 27-39 use MARC::Field; Link Here
27
use t::lib::TestBuilder;
27
use t::lib::TestBuilder;
28
28
29
use C4::Context;
29
use C4::Context;
30
use C4::Items;
30
use C4::Items qw( AddItemBatchFromMarc );
31
use C4::Biblio;
31
use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
32
use Koha::Database;
32
use Koha::Database;
33
use Koha::Libraries;
33
use Koha::Libraries;
34
34
35
BEGIN {
35
BEGIN {
36
    use_ok('C4::Labels::Batch');
36
    use_ok('C4::Labels::Batch', qw( save retrieve delete ));
37
}
37
}
38
38
39
my $schema = Koha::Database->new->schema;
39
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Languages.t (-1 / +1 lines)
Lines 13-19 use t::lib::Mocks; Link Here
13
use Koha::Database;
13
use Koha::Database;
14
14
15
BEGIN {
15
BEGIN {
16
    use_ok('C4::Languages');
16
    use_ok('C4::Languages', qw( accept_language getAllLanguages getLanguages getTranslatedLanguages get_rfc4646_from_iso639 ));
17
}
17
}
18
18
19
my $schema = Koha::Database->new->schema;
19
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Letters.t (-4 / +4 lines)
Lines 44-52 $email_sender_module->mock( Link Here
44
44
45
use_ok('C4::Context');
45
use_ok('C4::Context');
46
use_ok('C4::Members');
46
use_ok('C4::Members');
47
use_ok('C4::Acquisition');
47
use_ok('C4::Acquisition', qw( NewBasket ));
48
use_ok('C4::Biblio');
48
use_ok('C4::Biblio', qw( AddBiblio GetBiblioData ));
49
use_ok('C4::Letters');
49
use_ok('C4::Letters', qw( GetMessageTransportTypes GetMessage EnqueueLetter GetQueuedMessages SendQueuedMessages ResendMessage GetLetters GetPreparedLetter SendAlerts ));
50
use t::lib::Mocks;
50
use t::lib::Mocks;
51
use t::lib::TestBuilder;
51
use t::lib::TestBuilder;
52
use Koha::Database;
52
use Koha::Database;
Lines 472-478 is($err->{error}, 'something went wrong', "Send exception, error message returne Link Here
472
}
472
}
473
473
474
{
474
{
475
use C4::Serials;
475
use C4::Serials qw( NewSubscription GetSerials findSerialsByStatus ModSerialStatus );
476
476
477
my $notes = 'notes';
477
my $notes = 'notes';
478
my $internalnotes = 'intnotes';
478
my $internalnotes = 'intnotes';
(-)a/t/db_dependent/Letters/GetLettersAvailableForALibrary.t (-1 / +1 lines)
Lines 2-8 use Modern::Perl; Link Here
2
use Test::More tests => 19;
2
use Test::More tests => 19;
3
3
4
use C4::Context;
4
use C4::Context;
5
use C4::Letters qw( GetLettersAvailableForALibrary DelLetter );
5
use C4::Letters qw( GetLetters GetLettersAvailableForALibrary DelLetter );
6
use Koha::Database;
6
use Koha::Database;
7
7
8
my $schema = Koha::Database->new->schema;
8
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Letters/TemplateToolkit.t (-3 / +3 lines)
Lines 28-36 use MARC::Record; Link Here
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
29
use t::lib::Mocks;
29
use t::lib::Mocks;
30
30
31
use C4::Circulation;
31
use C4::Circulation qw( AddIssue AddReturn );
32
use C4::Letters;
32
use C4::Letters qw( GetPreparedLetter );
33
use C4::Members;
33
use C4::Members qw( IssueSlip );
34
use C4::Biblio;
34
use C4::Biblio;
35
use Koha::Database;
35
use Koha::Database;
36
use Koha::DateUtils;
36
use Koha::DateUtils;
(-)a/t/db_dependent/LibraryGroups.t (-1 / +1 lines)
Lines 162-165 subtest 'Koha::Library::Groups->get_root_ancestor' => sub { Link Here
162
162
163
    is($ancestor1->id, $groupY->id, "Get root ancestor should return group's root ancestor");
163
    is($ancestor1->id, $groupY->id, "Get root ancestor should return group's root ancestor");
164
    ok($ancestor1->id ne $ancestor2->id, "Both root groups should have different ids");
164
    ok($ancestor1->id ne $ancestor2->id, "Both root groups should have different ids");
165
};
165
};
(-)a/t/db_dependent/Linker_Default.t (-2 / +2 lines)
Lines 21-28 use Test::More tests => 2; Link Here
21
use MARC::Record;
21
use MARC::Record;
22
use MARC::Field;
22
use MARC::Field;
23
use MARC::File::XML;
23
use MARC::File::XML;
24
use C4::Heading;
24
use C4::Heading qw( authorities field new_from_field auth_type search_form );
25
use C4::Linker::FirstMatch;
25
use C4::Linker::Default;
26
use Test::MockModule;
26
use Test::MockModule;
27
use t::lib::Mocks qw( mock_preference );
27
use t::lib::Mocks qw( mock_preference );
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
(-)a/t/db_dependent/Linker_FirstMatch.t (-1 / +1 lines)
Lines 24-30 use Test::More tests => 3; Link Here
24
use MARC::Record;
24
use MARC::Record;
25
use MARC::Field;
25
use MARC::Field;
26
use MARC::File::XML;
26
use MARC::File::XML;
27
use C4::Heading;
27
use C4::Heading qw( authorities field new_from_field );
28
use C4::Linker::FirstMatch;
28
use C4::Linker::FirstMatch;
29
use Test::MockModule;
29
use Test::MockModule;
30
use t::lib::Mocks qw( mock_preference );
30
use t::lib::Mocks qw( mock_preference );
(-)a/t/db_dependent/Log.t (-2 / +2 lines)
Lines 18-25 use Modern::Perl; Link Here
18
use Test::More tests => 3;
18
use Test::More tests => 3;
19
19
20
use C4::Context;
20
use C4::Context;
21
use C4::Log;
21
use C4::Log qw( logaction cronlogaction );
22
use C4::Auth qw/checkpw/;
22
use C4::Auth qw( checkpw );
23
use Koha::Database;
23
use Koha::Database;
24
use Koha::DateUtils;
24
use Koha::DateUtils;
25
use Koha::ActionLogs;
25
use Koha::ActionLogs;
(-)a/t/db_dependent/MarcModificationTemplates.t (-1 / +1 lines)
Lines 9-15 use t::lib::Mocks; Link Here
9
9
10
use_ok("MARC::Field");
10
use_ok("MARC::Field");
11
use_ok("MARC::Record");
11
use_ok("MARC::Record");
12
use_ok("C4::MarcModificationTemplates");
12
use_ok('C4::MarcModificationTemplates', qw( AddModificationTemplate AddModificationTemplateAction GetModificationTemplateAction GetModificationTemplateActions ModModificationTemplateAction MoveModificationTemplateAction DelModificationTemplate DelModificationTemplateAction ModifyRecordWithTemplate GetModificationTemplates ));
13
13
14
my $schema = Koha::Database->new->schema;
14
my $schema = Koha::Database->new->schema;
15
$schema->storage->txn_begin;
15
$schema->storage->txn_begin;
(-)a/t/db_dependent/Members.t (-1 / +1 lines)
Lines 33-39 use t::lib::Mocks; Link Here
33
use t::lib::TestBuilder;
33
use t::lib::TestBuilder;
34
34
35
BEGIN {
35
BEGIN {
36
        use_ok('C4::Members');
36
        use_ok('C4::Members', qw( checkcardnumber GetBorrowersToExpunge DeleteUnverifiedOpacRegistrations DeleteExpiredOpacRegistrations ));
37
}
37
}
38
38
39
my $schema = Koha::Database->schema;
39
my $schema = Koha::Database->schema;
(-)a/t/db_dependent/Members/GetAllIssues.t (-3 / +3 lines)
Lines 22-31 use Test::MockModule; Link Here
22
22
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
24
25
use C4::Circulation;
25
use C4::Circulation qw( AddIssue );
26
use C4::Biblio;
26
use C4::Biblio qw( AddBiblio );
27
use C4::Items;
27
use C4::Items;
28
use C4::Members;
28
use C4::Members qw( GetAllIssues );
29
use Koha::Libraries;
29
use Koha::Libraries;
30
use Koha::Patrons;
30
use Koha::Patrons;
31
use MARC::Record;
31
use MARC::Record;
(-)a/t/db_dependent/Members/IssueSlip.t (-3 / +3 lines)
Lines 24-33 use Test::MockModule; Link Here
24
use Test::MockTime qw( set_fixed_time );
24
use Test::MockTime qw( set_fixed_time );
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
27
use C4::Circulation;
27
use C4::Circulation qw( AddIssue AddReturn );
28
use C4::Biblio;
28
use C4::Biblio qw( AddBiblio );
29
use C4::Items;
29
use C4::Items;
30
use C4::Members;
30
use C4::Members qw( IssueSlip );
31
31
32
use Koha::DateUtils qw( dt_from_string output_pref );
32
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::Library;
33
use Koha::Library;
(-)a/t/db_dependent/Members/Statistics.t (-1 / +1 lines)
Lines 5-11 use Test::More tests => 2; Link Here
5
5
6
use t::lib::Mocks;
6
use t::lib::Mocks;
7
7
8
use C4::Members::Statistics;
8
use C4::Members::Statistics qw( get_fields );
9
use Koha::Database; # we need the db here; get_fields looks for the item columns
9
use Koha::Database; # we need the db here; get_fields looks for the item columns
10
10
11
my $schema = Koha::Database->schema;
11
my $schema = Koha::Database->schema;
(-)a/t/db_dependent/Message.t (-1 / +1 lines)
Lines 22-28 use utf8; Link Here
22
22
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
24
25
use C4::Letters;
25
use C4::Letters qw( GetPreparedLetter );
26
use Koha::Database;
26
use Koha::Database;
27
27
28
my $schema = Koha::Database->schema;
28
my $schema = Koha::Database->schema;
(-)a/t/db_dependent/MungeMarcPrice.t (-1 / +1 lines)
Lines 1-7 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Biblio;
4
use C4::Biblio qw( MungeMarcPrice );
5
use Koha::Database;
5
use Koha::Database;
6
use Koha::Acquisition::Currencies;
6
use Koha::Acquisition::Currencies;
7
use Test::More;
7
use Test::More;
(-)a/t/db_dependent/OAI/AndSets.t (-2 / +2 lines)
Lines 25-32 use MARC::Record; Link Here
25
use Data::Dumper;
25
use Data::Dumper;
26
26
27
use Koha::Database;
27
use Koha::Database;
28
use C4::Biblio;
28
use C4::Biblio qw( GetMarcBiblio );
29
use C4::OAI::Sets;
29
use C4::OAI::Sets qw( AddOAISet ModOAISet ModOAISetMappings CalcOAISetsBiblio );
30
30
31
use t::lib::TestBuilder;
31
use t::lib::TestBuilder;
32
32
(-)a/t/db_dependent/OAI/Server.t (-1 / +1 lines)
Lines 32-38 use YAML::XS; Link Here
32
32
33
use t::lib::Mocks;
33
use t::lib::Mocks;
34
34
35
use C4::Biblio;
35
use C4::Biblio qw( AddBiblio GetMarcBiblio ModBiblio );
36
use C4::Context;
36
use C4::Context;
37
37
38
use Koha::Biblio::Metadatas;
38
use Koha::Biblio::Metadatas;
(-)a/t/db_dependent/OAI/Sets.t (-2 / +2 lines)
Lines 24-31 use Test::Warn; Link Here
24
use MARC::Record;
24
use MARC::Record;
25
25
26
use Koha::Database;
26
use Koha::Database;
27
use C4::Biblio;
27
use C4::Biblio qw( GetMarcBiblio );
28
use C4::OAI::Sets;
28
use C4::OAI::Sets qw( AddOAISet GetOAISets GetOAISet GetOAISetBySpec ModOAISet ModOAISetMappings GetOAISetsMappings GetOAISetMappings AddOAISetsBiblios GetOAISetsBiblio ModOAISetsBiblios DelOAISet DelOAISetsBiblio UpdateOAISetsBiblio CalcOAISetsBiblio );
29
29
30
use t::lib::TestBuilder;
30
use t::lib::TestBuilder;
31
use t::lib::Mocks;
31
use t::lib::Mocks;
(-)a/t/db_dependent/Overdues.t (-1 / +1 lines)
Lines 11-17 use Koha::Libraries; Link Here
11
use t::lib::Mocks;
11
use t::lib::Mocks;
12
use t::lib::TestBuilder;
12
use t::lib::TestBuilder;
13
13
14
use_ok('C4::Overdues');
14
use_ok('C4::Overdues', qw( GetOverdueMessageTransportTypes GetBranchcodesWithOverdueRules UpdateFine ));
15
can_ok('C4::Overdues', 'GetOverdueMessageTransportTypes');
15
can_ok('C4::Overdues', 'GetOverdueMessageTransportTypes');
16
can_ok('C4::Overdues', 'GetBranchcodesWithOverdueRules');
16
can_ok('C4::Overdues', 'GetBranchcodesWithOverdueRules');
17
17
(-)a/t/db_dependent/Passwordrecovery.t (-1 / +1 lines)
Lines 18-24 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use C4::Context;
20
use C4::Context;
21
use C4::Letters;
21
use C4::Letters qw( GetQueuedMessages );
22
use Koha::Database;
22
use Koha::Database;
23
use Koha::DateUtils;
23
use Koha::DateUtils;
24
use Koha::Patrons;
24
use Koha::Patrons;
(-)a/t/db_dependent/Patron/Borrower_PrevCheckout.t (-1 / +1 lines)
Lines 2-8 Link Here
2
use Modern::Perl;
2
use Modern::Perl;
3
3
4
use C4::Members;
4
use C4::Members;
5
use C4::Circulation;
5
use C4::Circulation qw( AddIssue AddReturn CanBookBeIssued );
6
use Koha::Database;
6
use Koha::Database;
7
use Koha::DateUtils;
7
use Koha::DateUtils;
8
use Koha::Patrons;
8
use Koha::Patrons;
(-)a/t/db_dependent/Patron/Messages.t (-1 / +1 lines)
Lines 47-50 subtest 'Delete a patron having messages' => sub { Link Here
47
    is(Koha::Patron::Messages->find($message->{message_id}), undef, 'Message is deleted');
47
    is(Koha::Patron::Messages->find($message->{message_id}), undef, 'Message is deleted');
48
};
48
};
49
49
50
$schema->storage->txn_rollback;
50
$schema->storage->txn_rollback;
(-)a/t/db_dependent/Patroncards.t (-1 / +1 lines)
Lines 20-26 use Test::MockModule; Link Here
20
use t::lib::Mocks;
20
use t::lib::Mocks;
21
use t::lib::TestBuilder;
21
use t::lib::TestBuilder;
22
22
23
use C4::Patroncards::Layout;
23
use C4::Patroncards::Layout qw( save new );
24
24
25
subtest '->save' => sub {
25
subtest '->save' => sub {
26
    plan tests => 1;
26
    plan tests => 1;
(-)a/t/db_dependent/Record.t (-1 / +1 lines)
Lines 10-16 use C4::Context; Link Here
10
use Koha::Database;
10
use Koha::Database;
11
11
12
BEGIN {
12
BEGIN {
13
        use_ok('C4::Record');
13
    use_ok('C4::Record', qw( marc2marc marc2marcxml marcxml2marc marc2dcxml marc2modsxml marc2bibtex ));
14
}
14
}
15
15
16
my $schema = Koha::Database->new->schema;
16
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Record/Record.t (-1 / +1 lines)
Lines 27-33 use constant WHEREAMI => 't/db_dependent/Record/testrecords'; Link Here
27
# specify the number of tests
27
# specify the number of tests
28
use Test::More tests => 21; #FIXME Commented out two failing tests
28
use Test::More tests => 21; #FIXME Commented out two failing tests
29
#use C4::Context;
29
#use C4::Context;
30
use C4::Record;
30
use C4::Record qw( marc2marc marc2marcxml marc2dcxml changeEncoding );
31
31
32
=head1 NAME
32
=head1 NAME
33
33
(-)a/t/db_dependent/Record/marcrecord2csv.t (-3 / +3 lines)
Lines 7-18 use MARC::Record; Link Here
7
use MARC::Field;
7
use MARC::Field;
8
use Text::CSV::Encoded;
8
use Text::CSV::Encoded;
9
9
10
use C4::Biblio qw( AddBiblio );
10
use C4::Biblio qw( AddBiblio GetMarcBiblio );
11
use C4::Context;
11
use C4::Context;
12
use C4::Record;
12
use C4::Record qw( marcrecord2csv );
13
use Koha::Database;
13
use Koha::Database;
14
14
15
use C4::Items;
15
use C4::Items qw( AddItemFromMarc );
16
16
17
use t::lib::TestBuilder;
17
use t::lib::TestBuilder;
18
18
(-)a/t/db_dependent/Reports.t (-1 / +1 lines)
Lines 9-15 use warnings; Link Here
9
use Test::More tests => 2;
9
use Test::More tests => 2;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::Reports');
12
        use_ok('C4::Reports', qw( GetDelimiterChoices ));
13
}
13
}
14
14
15
15
(-)a/t/db_dependent/Reports/Guided.t (-1 / +1 lines)
Lines 28-34 use Koha::Items; Link Here
28
use Koha::Reports;
28
use Koha::Reports;
29
use Koha::Notice::Messages;
29
use Koha::Notice::Messages;
30
30
31
use_ok('C4::Reports::Guided');
31
use_ok('C4::Reports::Guided', qw( execute_query save_report delete_report strip_limit GetReservedAuthorisedValues IsAuthorisedValueValid GetParametersFromSQL ValidateSQLParameters get_saved_reports update_sql get_report_areas convert_sql EmailReport nb_rows ));
32
can_ok(
32
can_ok(
33
    'C4::Reports::Guided',
33
    'C4::Reports::Guided',
34
    qw(save_report delete_report execute_query)
34
    qw(save_report delete_report execute_query)
(-)a/t/db_dependent/Reserves.t (-3 / +3 lines)
Lines 27-37 use t::lib::TestBuilder; Link Here
27
use MARC::Record;
27
use MARC::Record;
28
use DateTime::Duration;
28
use DateTime::Duration;
29
29
30
use C4::Circulation;
30
use C4::Circulation qw( AddReturn AddIssue );
31
use C4::Items;
31
use C4::Items;
32
use C4::Biblio;
32
use C4::Biblio qw( GetMarcBiblio GetMarcFromKohaField ModBiblio );
33
use C4::Members;
33
use C4::Members;
34
use C4::Reserves;
34
use C4::Reserves qw( AddReserve CheckReserves GetReservesControlBranch ModReserve ModReserveAffect ReserveSlip CalculatePriority CanReserveBeCanceledFromOpac CanBookBeReserved IsAvailableForItemLevelRequest MoveReserve ChargeReserveFee RevertWaitingStatus CanItemBeReserved MergeHolds );
35
use Koha::ActionLogs;
35
use Koha::ActionLogs;
36
use Koha::Caches;
36
use Koha::Caches;
37
use Koha::DateUtils;
37
use Koha::DateUtils;
(-)a/t/db_dependent/Reserves/AutoUnsuspendReserves.t (-1 / +1 lines)
Lines 22-28 use Test::More tests => 1; Link Here
22
use t::lib::Mocks;
22
use t::lib::Mocks;
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
24
25
use C4::Reserves;
25
use C4::Reserves qw( AutoUnsuspendReserves );
26
use Koha::Database;
26
use Koha::Database;
27
use Koha::DateUtils;
27
use Koha::DateUtils;
28
use Koha::Holds;
28
use Koha::Holds;
(-)a/t/db_dependent/Reserves/CancelExpiredReserves.t (-1 / +1 lines)
Lines 7-13 use t::lib::Mocks; Link Here
7
use t::lib::TestBuilder;
7
use t::lib::TestBuilder;
8
8
9
use C4::Members;
9
use C4::Members;
10
use C4::Reserves;
10
use C4::Reserves qw( CancelExpiredReserves );
11
use Koha::Database;
11
use Koha::Database;
12
use Koha::DateUtils;
12
use Koha::DateUtils;
13
use Koha::Holds;
13
use Koha::Holds;
(-)a/t/db_dependent/Reserves/GetReserveFee.t (-2 / +2 lines)
Lines 26-33 use Test::MockModule; Link Here
26
use t::lib::TestBuilder;
26
use t::lib::TestBuilder;
27
use t::lib::Mocks;
27
use t::lib::Mocks;
28
28
29
use C4::Circulation;
29
use C4::Circulation qw( AddIssue );
30
use C4::Reserves qw|AddReserve|;
30
use C4::Reserves qw( GetReserveFee ChargeReserveFee AddReserve );
31
use Koha::Database;
31
use Koha::Database;
32
32
33
my $schema = Koha::Database->new->schema;
33
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Reserves/MultiplePerRecord.t (-1 / +1 lines)
Lines 23-29 use Test::More tests => 16; Link Here
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
use t::lib::Mocks;
24
use t::lib::Mocks;
25
25
26
use C4::Reserves qw( GetMaxPatronHoldsForRecord AddReserve CanBookBeReserved );
26
use C4::Reserves qw( GetMaxPatronHoldsForRecord CanBookBeReserved AddReserve );
27
use Koha::Database;
27
use Koha::Database;
28
use Koha::Holds;
28
use Koha::Holds;
29
29
(-)a/t/db_dependent/RotatingCollections.t (-2 / +2 lines)
Lines 19-26 use Modern::Perl; Link Here
19
19
20
use Test::More tests => 53;
20
use Test::More tests => 53;
21
use C4::Context;
21
use C4::Context;
22
use C4::RotatingCollections;
22
use C4::RotatingCollections qw( AddItemToCollection CreateCollection DeleteCollection GetCollection GetCollectionItemBranches GetCollections GetItemsInCollection RemoveItemFromCollection TransferCollection UpdateCollection isItemInAnyCollection isItemInThisCollection );
23
use C4::Biblio;
23
use C4::Biblio qw( AddBiblio );
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::Library;
25
use Koha::Library;
26
26
(-)a/t/db_dependent/SIP/ILS.t (-2 / +2 lines)
Lines 25-32 use Test::More tests => 13; Link Here
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
use t::lib::Mocks;
26
use t::lib::Mocks;
27
27
28
use C4::Reserves;
28
use C4::Reserves qw( AddReserve );
29
use C4::Circulation;
29
use C4::Circulation qw( AddIssue );
30
use Koha::CirculationRules;
30
use Koha::CirculationRules;
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::DateUtils;
32
use Koha::DateUtils;
(-)a/t/db_dependent/SIP/Message.t (-1 / +1 lines)
Lines 30-36 use Test::Warn; Link Here
30
use t::lib::Mocks;
30
use t::lib::Mocks;
31
use t::lib::TestBuilder;
31
use t::lib::TestBuilder;
32
32
33
use C4::Reserves qw(AddReserve);
33
use C4::Reserves qw( AddReserve );
34
use C4::Circulation qw( AddReturn );
34
use C4::Circulation qw( AddReturn );
35
use Koha::Database;
35
use Koha::Database;
36
use Koha::AuthUtils qw(hash_password);
36
use Koha::AuthUtils qw(hash_password);
(-)a/t/db_dependent/SIP/SIPServer.t (-1 / +1 lines)
Lines 37-43 BEGIN { Link Here
37
    $mockPrefork->mock( 'run', sub {} );
37
    $mockPrefork->mock( 'run', sub {} );
38
}
38
}
39
39
40
use C4::SIP::SIPServer;
40
use C4::SIP::SIPServer qw( get_timeout );
41
41
42
# Start testing !
42
# Start testing !
43
# TODO We should include more tests here.
43
# TODO We should include more tests here.
(-)a/t/db_dependent/SIP/Transaction.t (-1 / +1 lines)
Lines 18-24 use C4::SIP::ILS::Transaction::Hold; Link Here
18
use C4::SIP::ILS::Transaction::Checkout;
18
use C4::SIP::ILS::Transaction::Checkout;
19
use C4::SIP::ILS::Transaction::Checkin;
19
use C4::SIP::ILS::Transaction::Checkin;
20
20
21
use C4::Reserves;
21
use C4::Reserves qw( AddReserve ModReserve ModReserveAffect RevertWaitingStatus );
22
use Koha::CirculationRules;
22
use Koha::CirculationRules;
23
use Koha::Item::Transfer;
23
use Koha::Item::Transfer;
24
use Koha::DateUtils qw( dt_from_string output_pref );
24
use Koha::DateUtils qw( dt_from_string output_pref );
(-)a/t/db_dependent/Search.t (-3 / +3 lines)
Lines 262-268 sub run_marc21_search_tests { Link Here
262
    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
262
    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
263
    $context->set_context();
263
    $context->set_context();
264
264
265
    use_ok('C4::Search');
265
    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
266
266
267
    # set search syspreferences to a known starting point
267
    # set search syspreferences to a known starting point
268
    $QueryStemming = 0;
268
    $QueryStemming = 0;
Lines 836-842 sub run_unimarc_search_tests { Link Here
836
    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
836
    my $context = C4::Context->new("$datadir/etc/koha-conf.xml");
837
    $context->set_context();
837
    $context->set_context();
838
838
839
    use_ok('C4::Search');
839
    use_ok('C4::Search', qw( getIndexes FindDuplicate SimpleSearch getRecords buildQuery searchResults ));
840
840
841
    # set search syspreferences to a known starting point
841
    # set search syspreferences to a known starting point
842
    $QueryStemming = 0;
842
    $QueryStemming = 0;
Lines 859-865 sub run_unimarc_search_tests { Link Here
859
    is($total_hits, 1, 'UNIMARC generic item index (bug 10037)');
859
    is($total_hits, 1, 'UNIMARC generic item index (bug 10037)');
860
860
861
    # authority records
861
    # authority records
862
    use_ok('C4::AuthoritiesMarc');
862
    use_ok('C4::AuthoritiesMarc', qw( SearchAuthorities ));
863
863
864
    my ($auths, $count) = SearchAuthorities(
864
    my ($auths, $count) = SearchAuthorities(
865
        ['mainentry'], ['and'], [''], ['contains'],
865
        ['mainentry'], ['and'], [''], ['contains'],
(-)a/t/db_dependent/Search/History.t (-2 / +2 lines)
Lines 8-14 use List::MoreUtils qw/all any none/; Link Here
8
use t::lib::Mocks;
8
use t::lib::Mocks;
9
use t::lib::TestBuilder;
9
use t::lib::TestBuilder;
10
10
11
use C4::Auth;
11
use C4::Auth qw( get_session checkauth get_template_and_user );
12
use Koha::Database;
12
use Koha::Database;
13
13
14
use Test::More tests => 27;
14
use Test::More tests => 27;
Lines 28-34 my $dbh = C4::Context->dbh; Link Here
28
t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' );
28
t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' );
29
29
30
use_ok('Koha::DateUtils');
30
use_ok('Koha::DateUtils');
31
use_ok('C4::Search::History');
31
use_ok('C4::Search::History', qw( add get delete get_from_session ));
32
32
33
my $userid = 123;
33
my $userid = 123;
34
my $previous_sessionid = "PREVIOUS_SESSIONID";
34
my $previous_sessionid = "PREVIOUS_SESSIONID";
(-)a/t/db_dependent/Serials.t (-5 / +5 lines)
Lines 5-16 Link Here
5
5
6
use Modern::Perl;
6
use Modern::Perl;
7
7
8
use C4::Serials;
8
use C4::Serials qw( updateClaim NewSubscription GetSubscription GetSubscriptionHistoryFromSubscriptionId SearchSubscriptions ModSubscription GetExpirationDate GetSerials GetSerialInformation NewIssue AddItem2Serial DelSubscription GetFullSubscription PrepareSerialsData GetSubscriptionsFromBiblionumber ModSubscriptionHistory GetSerials2 GetLatestSerials GetNextSeq GetSeq CountSubscriptionFromBiblionumber ModSerialStatus findSerialsByStatus HasSubscriptionStrictlyExpired HasSubscriptionExpired GetLateOrMissingIssues check_routing addroutingmember GetNextDate );
9
use C4::Serials::Frequency;
9
use C4::Serials::Frequency;
10
use C4::Serials::Numberpattern;
10
use C4::Serials::Numberpattern;
11
use C4::Biblio;
11
use C4::Biblio qw( AddBiblio GetMarcFromKohaField );
12
use C4::Budgets;
12
use C4::Budgets qw( AddBudgetPeriod AddBudget );
13
use C4::Items;
13
use C4::Items qw( AddItemFromMarc );
14
use Koha::Database;
14
use Koha::Database;
15
use Koha::DateUtils;
15
use Koha::DateUtils;
16
use Koha::Acquisition::Booksellers;
16
use Koha::Acquisition::Booksellers;
Lines 19-25 use t::lib::TestBuilder; Link Here
19
use Test::More tests => 49;
19
use Test::More tests => 49;
20
20
21
BEGIN {
21
BEGIN {
22
    use_ok('C4::Serials');
22
    use_ok('C4::Serials', qw( updateClaim NewSubscription GetSubscription GetSubscriptionHistoryFromSubscriptionId SearchSubscriptions ModSubscription GetExpirationDate GetSerials GetSerialInformation NewIssue AddItem2Serial DelSubscription GetFullSubscription PrepareSerialsData GetSubscriptionsFromBiblionumber ModSubscriptionHistory GetSerials2 GetLatestSerials GetNextSeq GetSeq CountSubscriptionFromBiblionumber ModSerialStatus findSerialsByStatus HasSubscriptionStrictlyExpired HasSubscriptionExpired GetLateOrMissingIssues check_routing addroutingmember GetNextDate ));
23
}
23
}
24
24
25
my $schema = Koha::Database->new->schema;
25
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/Serials/Claims.t (-2 / +2 lines)
Lines 2-11 use Modern::Perl; Link Here
2
use Test::More tests => 17;
2
use Test::More tests => 17;
3
3
4
use C4::Acquisition;
4
use C4::Acquisition;
5
use C4::Budgets;
5
use C4::Budgets qw( AddBudgetPeriod AddBudget );
6
use Koha::Database;
6
use Koha::Database;
7
use Koha::Acquisition::Booksellers;
7
use Koha::Acquisition::Booksellers;
8
use_ok('C4::Serials');
8
use_ok('C4::Serials', qw( GetSuppliersWithLateIssues NewSubscription GetLateOrMissingIssues updateClaim ));
9
9
10
use Koha::DateUtils qw( dt_from_string output_pref );
10
use Koha::DateUtils qw( dt_from_string output_pref );
11
11
(-)a/t/db_dependent/Serials/Frequency.t (-1 / +1 lines)
Lines 8-14 use Modern::Perl; Link Here
8
my $schema = Koha::Database->new->schema;
8
my $schema = Koha::Database->new->schema;
9
$schema->storage->txn_begin;
9
$schema->storage->txn_begin;
10
10
11
use C4::Serials::Frequency;
11
use C4::Serials::Frequency qw( GetSubscriptionFrequencies DelSubscriptionFrequency GetSubscriptionFrequency ModSubscriptionFrequency AddSubscriptionFrequency );
12
12
13
# Start by deleting all frequencies.
13
# Start by deleting all frequencies.
14
my @frequencies = GetSubscriptionFrequencies();
14
my @frequencies = GetSubscriptionFrequencies();
(-)a/t/db_dependent/Serials/GetFictiveIssueNumber.t (-1 / +1 lines)
Lines 6-12 use Modern::Perl; Link Here
6
use Test::More tests => 5;
6
use Test::More tests => 5;
7
7
8
use Koha::Database;
8
use Koha::Database;
9
use C4::Serials;
9
use C4::Serials qw( GetFictiveIssueNumber GetSubscription );
10
use C4::Serials::Frequency;
10
use C4::Serials::Frequency;
11
11
12
my $schema  = Koha::Database->new->schema;
12
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/Serials/GetNextDate.t (-1 / +1 lines)
Lines 4-10 use Modern::Perl; Link Here
4
use Test::More tests => 102;
4
use Test::More tests => 102;
5
5
6
use Koha::Database;
6
use Koha::Database;
7
use C4::Serials;
7
use C4::Serials qw( GetNextDate );
8
use C4::Serials::Frequency;
8
use C4::Serials::Frequency;
9
9
10
my $schema  = Koha::Database->new->schema;
10
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/Serials/GetNextSeq.t (-1 / +1 lines)
Lines 9-15 my $schema = Koha::Database->new->schema; Link Here
9
$schema->storage->txn_begin;
9
$schema->storage->txn_begin;
10
10
11
use C4::Serials::Frequency;
11
use C4::Serials::Frequency;
12
use C4::Serials;
12
use C4::Serials qw( GetNextDate GetNextSeq );
13
13
14
my $frequency = {
14
my $frequency = {
15
    description => "One issue per day",
15
    description => "One issue per day",
(-)a/t/db_dependent/Serials/Numberpattern.t (-1 / +1 lines)
Lines 9-15 use Koha::Database; Link Here
9
my $schema = Koha::Database->new->schema;
9
my $schema = Koha::Database->new->schema;
10
$schema->storage->txn_begin;
10
$schema->storage->txn_begin;
11
11
12
use C4::Serials::Numberpattern;
12
use C4::Serials::Numberpattern qw( GetSubscriptionNumberpatterns GetSubscriptionNumberpattern DelSubscriptionNumberpattern ModSubscriptionNumberpattern AddSubscriptionNumberpattern );
13
13
14
# Start by deleting all numberpatterns.
14
# Start by deleting all numberpatterns.
15
my @numberpatterns = GetSubscriptionNumberpatterns();
15
my @numberpatterns = GetSubscriptionNumberpatterns();
(-)a/t/db_dependent/Serials/ReNewSubscription.t (-1 / +1 lines)
Lines 27-33 use Test::MockModule; Link Here
27
use t::lib::TestBuilder;
27
use t::lib::TestBuilder;
28
use t::lib::Mocks;
28
use t::lib::Mocks;
29
29
30
use C4::Serials;
30
use C4::Serials qw( NewSubscription ReNewSubscription GetSubscription GetSubscriptionLength );
31
31
32
use Koha::Database;
32
use Koha::Database;
33
use Koha::Subscription::Histories;
33
use Koha::Subscription::Histories;
(-)a/t/db_dependent/Serials_2.t (-2 / +2 lines)
Lines 10-17 use Koha::Database; Link Here
10
use Koha::Patrons;
10
use Koha::Patrons;
11
use t::lib::Mocks;
11
use t::lib::Mocks;
12
use t::lib::TestBuilder;
12
use t::lib::TestBuilder;
13
use_ok('C4::Serials');
13
use_ok('C4::Serials', qw( NewSubscription GetSubscription NewIssue GetPreviousSerialid ));
14
use_ok('C4::Budgets');
14
use_ok('C4::Budgets', qw( AddBudgetPeriod AddBudget ));
15
15
16
# Mock userenv
16
# Mock userenv
17
local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /redefined/ };
17
local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /redefined/ };
(-)a/t/db_dependent/ShelfBrowser.t (-2 / +2 lines)
Lines 8-19 use MARC::Record; Link Here
8
8
9
use C4::Context;
9
use C4::Context;
10
use C4::Items;
10
use C4::Items;
11
use C4::Biblio;
11
use C4::Biblio qw( AddBiblio );
12
use Koha::Database;
12
use Koha::Database;
13
13
14
use t::lib::TestBuilder;
14
use t::lib::TestBuilder;
15
15
16
use_ok('C4::ShelfBrowser');
16
use_ok('C4::ShelfBrowser', qw( GetNearbyItems ));
17
17
18
my $schema = Koha::Database->schema;
18
my $schema = Koha::Database->schema;
19
$schema->storage->txn_begin;
19
$schema->storage->txn_begin;
(-)a/t/db_dependent/Stats.t (-2 / +2 lines)
Lines 1-13 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Stats;
4
use C4::Stats qw( UpdateStats );
5
use Koha::Database;
5
use Koha::Database;
6
6
7
use Test::More tests => 18;
7
use Test::More tests => 18;
8
8
9
BEGIN {
9
BEGIN {
10
    use_ok('C4::Stats');
10
    use_ok('C4::Stats', qw( UpdateStats ));
11
}
11
}
12
can_ok(
12
can_ok(
13
    'C4::Stats',
13
    'C4::Stats',
(-)a/t/db_dependent/Suggestions.t (-2 / +2 lines)
Lines 25-31 use t::lib::Mocks; Link Here
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
27
use C4::Context;
27
use C4::Context;
28
use C4::Letters;
28
use C4::Letters qw( GetQueuedMessages GetMessage );
29
use C4::Budgets qw( AddBudgetPeriod AddBudget GetBudget );
29
use C4::Budgets qw( AddBudgetPeriod AddBudget GetBudget );
30
use Koha::Database;
30
use Koha::Database;
31
use Koha::DateUtils qw( dt_from_string output_pref );
31
use Koha::DateUtils qw( dt_from_string output_pref );
Lines 34-40 use Koha::Patrons; Link Here
34
use Koha::Suggestions;
34
use Koha::Suggestions;
35
35
36
BEGIN {
36
BEGIN {
37
    use_ok('C4::Suggestions');
37
    use_ok('C4::Suggestions', qw( NewSuggestion GetSuggestion ModSuggestion GetSuggestionInfo GetSuggestionFromBiblionumber GetSuggestionInfoFromBiblionumber GetSuggestionByStatus ConnectSuggestionAndBiblio SearchSuggestion DelSuggestion MarcRecordFromNewSuggestion GetUnprocessedSuggestions DelSuggestionsOlderThan ));
38
}
38
}
39
39
40
my $schema  = Koha::Database->new->schema;
40
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/Tags.t (-1 / +1 lines)
Lines 30-36 use Koha::Tags; Link Here
30
use Koha::Tags::Approvals;
30
use Koha::Tags::Approvals;
31
use Koha::Tags::Indexes;
31
use Koha::Tags::Indexes;
32
32
33
use C4::Tags;
33
use C4::Tags qw( add_tag_approval add_tag add_tag_index get_tag_rows get_tag stratify_tags );
34
34
35
# So any output is readable :-D
35
# So any output is readable :-D
36
binmode STDOUT, ':encoding(utf8)';
36
binmode STDOUT, ':encoding(utf8)';
(-)a/t/db_dependent/Templates.t (-2 / +2 lines)
Lines 27-36 use File::Temp qw/tempfile/; Link Here
27
27
28
use t::lib::Mocks;
28
use t::lib::Mocks;
29
29
30
use C4::Auth qw//;
30
use C4::Auth qw( get_template_and_user );
31
31
32
BEGIN {
32
BEGIN {
33
    use_ok( 'C4::Templates' );
33
    use_ok('C4::Templates', qw( GetColumnDefs getlanguagecookie setlanguagecookie themelanguage gettemplate param output availablethemes badtemplatecheck ));
34
    can_ok( 'C4::Templates',
34
    can_ok( 'C4::Templates',
35
         qw/ GetColumnDefs
35
         qw/ GetColumnDefs
36
             getlanguagecookie
36
             getlanguagecookie
(-)a/t/db_dependent/UsageStats.t (-3 / +3 lines)
Lines 25-35 use Koha::Biblios; Link Here
25
use Koha::Libraries;
25
use Koha::Libraries;
26
26
27
BEGIN {
27
BEGIN {
28
    use_ok('C4::UsageStats');
28
    use_ok('C4::UsageStats', qw( NeedUpdate BuildReport ReportToCommunity _count ));
29
    use_ok('C4::Context');
29
    use_ok('C4::Context');
30
    use_ok('C4::Biblio');
30
    use_ok('C4::Biblio', qw( UpdateTotalIssues ));
31
    use_ok( 'C4::AuthoritiesMarc', qw(AddAuthority) );
31
    use_ok( 'C4::AuthoritiesMarc', qw(AddAuthority) );
32
    use_ok('C4::Reserves');
32
    use_ok('C4::Reserves', qw( AddReserve ));
33
    use_ok('MARC::Record');
33
    use_ok('MARC::Record');
34
    use_ok('Koha::Acquisition::Orders');
34
    use_ok('Koha::Acquisition::Orders');
35
}
35
}
(-)a/t/db_dependent/Utils/Datatables.t (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Test::More tests => 1;
20
use Test::More tests => 1;
21
21
22
use C4::Utils::DataTables;
22
use C4::Utils::DataTables qw( dt_build_orderby );
23
23
24
use t::lib::Mocks;
24
use t::lib::Mocks;
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
(-)a/t/db_dependent/Utils/Datatables_Virtualshelves.t (-1 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
19
20
use Test::More tests => 13;
20
use Test::More tests => 13;
21
21
22
use C4::Biblio;
22
use C4::Biblio qw( AddBiblio );
23
use C4::Context;
23
use C4::Context;
24
24
25
use Koha::Library;
25
use Koha::Library;
(-)a/t/db_dependent/XISBN.t (-3 / +3 lines)
Lines 8-15 use Modern::Perl; Link Here
8
use Test::More tests => 6;
8
use Test::More tests => 6;
9
use List::MoreUtils qw(any none);
9
use List::MoreUtils qw(any none);
10
use MARC::Record;
10
use MARC::Record;
11
use C4::Biblio;
11
use C4::Biblio qw( GetMarcFromKohaField AddBiblio );
12
use C4::XISBN;
12
use C4::XISBN qw( get_xisbns );
13
use C4::Context;
13
use C4::Context;
14
use C4::Search;
14
use C4::Search;
15
use Koha::Database;
15
use Koha::Database;
Lines 17-23 use t::lib::Mocks; Link Here
17
use Test::MockModule;
17
use Test::MockModule;
18
18
19
BEGIN {
19
BEGIN {
20
    use_ok('C4::XISBN');
20
    use_ok('C4::XISBN', qw( get_xisbns ));
21
}
21
}
22
22
23
my $schema = Koha::Database->new->schema;
23
my $schema = Koha::Database->new->schema;
(-)a/t/db_dependent/XSLT.t (-1 / +1 lines)
Lines 26-32 use t::lib::Mocks; Link Here
26
use Koha::ItemTypes;
26
use Koha::ItemTypes;
27
27
28
BEGIN {
28
BEGIN {
29
    use_ok('C4::XSLT');
29
    use_ok('C4::XSLT', qw( transformMARCXML4XSLT getAuthorisedValues4MARCSubfields buildKohaItemsNamespace ));
30
}
30
}
31
31
32
my $schema  = Koha::Database->new->schema;
32
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/api/v1/auth.t (-1 / +1 lines)
Lines 24-30 use Test::Warn; Link Here
24
use t::lib::TestBuilder;
24
use t::lib::TestBuilder;
25
use t::lib::Mocks;
25
use t::lib::Mocks;
26
26
27
use C4::Auth;
27
use C4::Auth qw( get_session );
28
use Koha::Database;
28
use Koha::Database;
29
29
30
my $schema  = Koha::Database->new->schema;
30
my $schema  = Koha::Database->new->schema;
(-)a/t/db_dependent/api/v1/checkouts.t (-1 / +1 lines)
Lines 26-32 use t::lib::TestBuilder; Link Here
26
use DateTime;
26
use DateTime;
27
27
28
use C4::Context;
28
use C4::Context;
29
use C4::Circulation;
29
use C4::Circulation qw( AddIssue AddReturn );
30
30
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::DateUtils;
32
use Koha::DateUtils;
(-)a/t/db_dependent/api/v1/holds.t (-1 / +1 lines)
Lines 28-34 use Mojo::JSON qw(encode_json); Link Here
28
28
29
use C4::Context;
29
use C4::Context;
30
use Koha::Patrons;
30
use Koha::Patrons;
31
use C4::Reserves;
31
use C4::Reserves qw( AddReserve CanItemBeReserved CanBookBeReserved );
32
use C4::Items;
32
use C4::Items;
33
33
34
use Koha::Database;
34
use Koha::Database;
(-)a/t/db_dependent/api/v1/return_claims.t (-1 / +1 lines)
Lines 24-30 use Test::Warn; Link Here
24
use t::lib::Mocks;
24
use t::lib::Mocks;
25
use t::lib::TestBuilder;
25
use t::lib::TestBuilder;
26
26
27
use C4::Circulation qw(AddIssue);
27
use C4::Circulation qw( AddIssue );
28
28
29
use Koha::Checkouts::ReturnClaims;
29
use Koha::Checkouts::ReturnClaims;
30
use Koha::Database;
30
use Koha::Database;
(-)a/t/db_dependent/rollingloans.t (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use C4::Context;
4
use C4::Context;
5
use C4::Circulation;
5
use C4::Circulation qw( CanBookBeIssued AddIssue AddReturn );
6
use C4::Members;
6
use C4::Members;
7
use C4::Items;
7
use C4::Items;
8
use Koha::DateUtils;
8
use Koha::DateUtils;
(-)a/t/db_dependent/selenium/basic_workflow.t (-1 / +1 lines)
Lines 37-43 use Modern::Perl; Link Here
37
use Time::HiRes qw(gettimeofday);
37
use Time::HiRes qw(gettimeofday);
38
use POSIX qw(strftime);
38
use POSIX qw(strftime);
39
use C4::Context;
39
use C4::Context;
40
use C4::Biblio qw( AddBiblio ); # We shouldn't use it
40
use C4::Biblio qw( AddBiblio );
41
41
42
use Koha::CirculationRules;
42
use Koha::CirculationRules;
43
43
(-)a/t/db_dependent/selenium/regressions.t (-1 / +1 lines)
Lines 25-31 use Test::MockModule; Link Here
25
25
26
use C4::Context;
26
use C4::Context;
27
use C4::Biblio qw( AddBiblio );
27
use C4::Biblio qw( AddBiblio );
28
use C4::Circulation;
28
use C4::Circulation qw( AddIssue );
29
use Koha::AuthUtils;
29
use Koha::AuthUtils;
30
use t::lib::Mocks;
30
use t::lib::Mocks;
31
use t::lib::Selenium;
31
use t::lib::Selenium;
(-)a/t/db_dependent/www/regressions.t (-1 / +1 lines)
Lines 23-29 use t::lib::TestBuilder; Link Here
23
use t::lib::Mocks;
23
use t::lib::Mocks;
24
24
25
use C4::Context;
25
use C4::Context;
26
use C4::Biblio;
26
use C4::Biblio qw( ModBiblio );
27
27
28
use Koha::Database;
28
use Koha::Database;
29
use Koha::Caches;
29
use Koha::Caches;
(-)a/t/db_dependent/zebra_config.pl (-4 / +4 lines)
Lines 2-11 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use File::Copy;
5
use File::Copy qw( copy );
6
use File::Path qw(make_path);
6
use File::Path qw( make_path );
7
use File::Find;
7
use File::Find qw( find );
8
use File::Basename;
8
use File::Basename qw( dirname );
9
use File::Spec;
9
use File::Spec;
10
10
11
use C4::Context;
11
use C4::Context;
(-)a/t/lib/Dates.pm (-1 / +1 lines)
Lines 1-7 Link Here
1
package t::lib::Dates;
1
package t::lib::Dates;
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use Koha::DateUtils;
4
use Koha::DateUtils qw( dt_from_string );
5
use DateTime;
5
use DateTime;
6
6
7
=head1 NAME
7
=head1 NAME
(-)a/t/lib/Koha/BackgroundJob/BatchTest.pm (-1 / +1 lines)
Lines 16-22 package t::lib::Koha::BackgroundJob::BatchTest; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use JSON qw( encode_json decode_json );
19
use JSON qw( decode_json encode_json );
20
20
21
use Koha::BackgroundJobs;
21
use Koha::BackgroundJobs;
22
use Koha::DateUtils qw( dt_from_string );
22
use Koha::DateUtils qw( dt_from_string );
(-)a/t/lib/Koha/Plugin/BadAPIRoute.pm (-1 / +1 lines)
Lines 2-8 package Koha::Plugin::BadAPIRoute; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Mojo::JSON qw(decode_json);
5
use Mojo::JSON qw( decode_json );
6
6
7
use base qw(Koha::Plugins::Base);
7
use base qw(Koha::Plugins::Base);
8
8
(-)a/t/lib/Koha/Plugin/Test.pm (-1 / +1 lines)
Lines 6-12 use Modern::Perl; Link Here
6
use Koha::Exceptions::Exception;
6
use Koha::Exceptions::Exception;
7
use Koha::Plugins::Tab;
7
use Koha::Plugins::Tab;
8
8
9
use Mojo::JSON qw(decode_json);
9
use Mojo::JSON qw( decode_json );
10
10
11
## Required for all plugins
11
## Required for all plugins
12
use base qw(Koha::Plugins::Base);
12
use base qw(Koha::Plugins::Base);
(-)a/t/lib/Mocks.pm (-1 / +1 lines)
Lines 16-22 package t::lib::Mocks; Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use C4::Context;
19
use C4::Context qw( config new preference userenv _new_userenv set_userenv );
20
20
21
use Test::MockModule;
21
use Test::MockModule;
22
use Test::MockObject;
22
use Test::MockObject;
(-)a/t/lib/Selenium.pm (-3 / +1 lines)
Lines 18-27 package t::lib::Selenium; Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
use Carp qw( croak );
20
use Carp qw( croak );
21
use JSON qw( from_json );
22
use File::Slurp qw( write_file );
23
21
24
use C4::Context;
22
use C4::Context qw( new config preference interface );
25
23
26
use base qw(Class::Accessor);
24
use base qw(Class::Accessor);
27
__PACKAGE__->mk_accessors(qw(login password base_url opac_base_url selenium_addr selenium_port driver));
25
__PACKAGE__->mk_accessors(qw(login password base_url opac_base_url selenium_addr selenium_port driver));
(-)a/t/lib/TestBuilder.pm (-7 / +6 lines)
Lines 2-17 package t::lib::TestBuilder; Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Koha::Database;
5
use Koha::Database qw( schema );
6
use C4::Biblio;
6
use C4::Biblio qw( AddBiblio );
7
use C4::Items;
7
use Koha::Biblios qw( _type );
8
use Koha::Biblios;
8
use Koha::Items qw( _type );
9
use Koha::Items;
10
use Koha::DateUtils qw( dt_from_string );
9
use Koha::DateUtils qw( dt_from_string );
11
10
12
use Bytes::Random::Secure;
11
use Bytes::Random::Secure;
13
use Carp;
12
use Carp qw( carp );
14
use Module::Load;
13
use Module::Load qw( load );
15
use String::Random;
14
use String::Random;
16
15
17
use constant {
16
use constant {
(-)a/tags/list.pl (-6 / +5 lines)
Lines 20-32 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth qw(:DEFAULT check_cookie_auth);
23
use C4::Auth qw( get_template_and_user );
24
use C4::Biblio;
24
use C4::Biblio qw( GetBiblioData );
25
use C4::Context;
25
use C4::Context;
26
use C4::Items;
26
use C4::Items qw( GetItemsInfo );
27
use C4::Koha;
27
use C4::Tags qw( get_tag_rows get_tags remove_tag );
28
use C4::Tags qw(get_tags remove_tag get_tag_rows);
28
use C4::Output qw( output_html_with_http_headers );
29
use C4::Output;
30
29
31
my $needed_flags = { tools => 'moderate_tags'
30
my $needed_flags = { tools => 'moderate_tags'
32
};    # FIXME: replace when more specific permission is created.
31
};    # FIXME: replace when more specific permission is created.
(-)a/tags/review.pl (-8 / +12 lines)
Lines 20-36 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
use Data::Dumper;
23
use POSIX qw( ceil exit );
24
use POSIX;
25
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
26
use CGI::Cookie;     # need to check cookies before having CGI parse the POST request
25
use CGI::Cookie;     # need to check cookies before having CGI parse the POST request
27
use URI::Escape;
26
use URI::Escape qw( uri_escape_utf8 );
28
use C4::Auth qw(:DEFAULT check_cookie_auth);
27
use C4::Auth qw( check_cookie_auth get_template_and_user );
29
use C4::Context;
28
use C4::Context;
30
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
31
# use C4::Koha;
30
use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers );
32
use C4::Output qw(:html :ajax pagination_bar);
31
use C4::Tags qw(
33
use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved);
32
    approval_counts
33
    blacklist
34
    get_approval_rows
35
    is_approved
36
    whitelist
37
);
34
38
35
my $script_name = "/cgi-bin/koha/tags/review.pl";
39
my $script_name = "/cgi-bin/koha/tags/review.pl";
36
my $needed_flags = { tools => 'moderate_tags' };    # FIXME: replace when more specific permission is created.
40
my $needed_flags = { tools => 'moderate_tags' };    # FIXME: replace when more specific permission is created.
(-)a/tools/access_files.pl (-6 / +5 lines)
Lines 23-36 Link Here
23
23
24
use Modern::Perl;
24
use Modern::Perl;
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use CGI;
27
use CGI;
28
use C4::Context;
28
use C4::Context;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
use C4::Koha;
30
use File::stat qw( stat );
31
use File::stat qw(stat);
31
use Digest::MD5 qw( md5_hex );
32
use Digest::MD5 qw(md5_hex);
32
use Encode qw( decode );
33
use Encode;
34
33
35
my $input = CGI->new;
34
my $input = CGI->new;
36
my $file_id = $input->param("id");
35
my $file_id = $input->param("id");
(-)a/tools/ajax-inventory.pl (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
use CGI qw ( -utf8 );
4
use CGI qw ( -utf8 );
5
use C4::Auth;
5
use C4::Auth qw( check_api_auth );
6
use C4::Items qw( ModDateLastSeen );
6
use C4::Items qw( ModDateLastSeen );
7
7
8
my $input = CGI->new;
8
my $input = CGI->new;
(-)a/tools/automatic_item_modification_by_age.pl (-4 / +3 lines)
Lines 32-43 This script allows a user to update the new status for items. Link Here
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI;
34
use CGI;
35
use JSON qw( to_json from_json );
35
use JSON qw( to_json );
36
36
37
use C4::Auth;
37
use C4::Auth qw( get_template_and_user );
38
use C4::Context;
38
use C4::Context;
39
use C4::Items;
39
use C4::Output qw( output_html_with_http_headers );
40
use C4::Output;
41
use C4::Koha;
40
use C4::Koha;
42
41
43
use Koha::Items;
42
use Koha::Items;
(-)a/tools/background-job-progress.pl (-2 / +1 lines)
Lines 20-30 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
# standard or CPAN modules used
22
# standard or CPAN modules used
23
use IO::File;
24
use CGI qw ( -utf8 );
23
use CGI qw ( -utf8 );
25
use CGI::Session;
24
use CGI::Session;
26
use C4::Context;
25
use C4::Context;
27
use C4::Auth qw/check_cookie_auth/;
26
use C4::Auth qw( check_cookie_auth );
28
use C4::BackgroundJob;
27
use C4::BackgroundJob;
29
use CGI::Cookie; # need to check cookies before
28
use CGI::Cookie; # need to check cookies before
30
                 # having CGI parse the POST request
29
                 # having CGI parse the POST request
(-)a/tools/batchMod.pl (-11 / +17 lines)
Lines 20-45 Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use Modern::Perl;
22
use Modern::Perl;
23
use Try::Tiny;
23
use Try::Tiny qw( catch try );
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use C4::Biblio;
27
use C4::Biblio qw(
28
use C4::Items;
28
    DelBiblio
29
use C4::Circulation;
29
    GetAuthorisedValueDesc
30
    GetMarcFromKohaField
31
    GetMarcStructure
32
    IsMarcStructureInternal
33
    TransformHtmlToXml
34
);
35
use C4::Items qw( GetItemsInfo Item2Marc ModItemFromMarc );
36
use C4::Circulation qw( LostItem IsItemIssued );
30
use C4::Context;
37
use C4::Context;
31
use C4::Koha;
38
use C4::Koha;
32
use C4::BackgroundJob;
39
use C4::BackgroundJob;
33
use C4::ClassSource;
40
use C4::ClassSource qw( GetClassSources GetClassSource );
34
use C4::Members;
35
use MARC::File::XML;
41
use MARC::File::XML;
36
use List::MoreUtils qw/uniq/;
42
use List::MoreUtils qw( uniq );
37
43
38
use Koha::Database;
44
use Koha::Database;
39
use Koha::Exceptions::Exception;
45
use Koha::Exceptions::Exception;
40
use Koha::AuthorisedValues;
46
use Koha::AuthorisedValues;
41
use Koha::Biblios;
47
use Koha::Biblios;
42
use Koha::DateUtils;
48
use Koha::DateUtils qw( dt_from_string );
43
use Koha::Items;
49
use Koha::Items;
44
use Koha::ItemTypes;
50
use Koha::ItemTypes;
45
use Koha::Patrons;
51
use Koha::Patrons;
(-)a/tools/batch_delete_records.pl (-4 / +4 lines)
Lines 23-32 use Modern::Perl; Link Here
23
use CGI;
23
use CGI;
24
use List::MoreUtils qw( uniq );
24
use List::MoreUtils qw( uniq );
25
25
26
use C4::Auth;
26
use C4::Auth qw( get_template_and_user );
27
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::AuthoritiesMarc;
28
use C4::Auth qw( get_template_and_user );
29
use C4::Biblio;
29
use C4::Biblio qw( GetMarcBiblio );
30
use Koha::Virtualshelves;
30
use Koha::Virtualshelves;
31
31
32
use Koha::Authorities;
32
use Koha::Authorities;
(-)a/tools/batch_record_modification.pl (-5 / +6 lines)
Lines 22-35 use Modern::Perl; Link Here
22
22
23
use CGI;
23
use CGI;
24
use List::MoreUtils qw( uniq );
24
use List::MoreUtils qw( uniq );
25
use JSON qw( encode_json );
25
use Try::Tiny qw( catch try );
26
use Try::Tiny;
27
26
28
use C4::Auth qw( get_template_and_user );
27
use C4::Auth qw( get_template_and_user );
29
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output qw( output_html_with_http_headers );
30
use C4::AuthoritiesMarc qw( BuildSummary ModAuthority );
29
use C4::Auth qw( get_template_and_user );
31
use C4::Biblio qw( GetMarcBiblio ModBiblio );
30
use C4::MarcModificationTemplates qw(
32
use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates );
31
    GetModificationTemplateActions
32
    GetModificationTemplates
33
);
33
34
34
use Koha::Biblios;
35
use Koha::Biblios;
35
use Koha::BackgroundJob::BatchUpdateBiblio;
36
use Koha::BackgroundJob::BatchUpdateBiblio;
(-)a/tools/batch_records_ajax.pl (-4 / +3 lines)
Lines 32-43 the records from an import batch. Link Here
32
use Modern::Perl;
32
use Modern::Perl;
33
33
34
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
35
use JSON qw/ to_json /;
35
use JSON qw( to_json );
36
36
37
use C4::Context;
37
use C4::Context;
38
use C4::Charset;
38
use C4::Auth qw( check_cookie_auth );
39
use C4::Auth qw/check_cookie_auth/;
39
use C4::ImportBatch qw( GetImportBatch GetImportRecordsRange GetImportRecordMatches );
40
use C4::ImportBatch;
41
40
42
my $input = CGI->new;
41
my $input = CGI->new;
43
42
(-)a/tools/cleanborrowers.pl (-7 / +4 lines)
Lines 34-49 This script allows to do 2 things. Link Here
34
use Modern::Perl;
34
use Modern::Perl;
35
35
36
use CGI qw ( -utf8 );
36
use CGI qw ( -utf8 );
37
use C4::Auth;
37
use C4::Auth qw( get_template_and_user );
38
use C4::Output;
38
use C4::Output qw( output_html_with_http_headers );
39
use C4::Members;
39
use C4::Members qw( GetBorrowersToExpunge );
40
use C4::Circulation;    # AnonymiseIssueHistory.
41
use Koha::DateUtils qw( dt_from_string output_pref );
40
use Koha::DateUtils qw( dt_from_string output_pref );
42
use Koha::Patron::Categories;
41
use Koha::Patron::Categories;
43
use Koha::Patrons;
42
use Koha::Patrons;
44
use Date::Calc qw/Today Add_Delta_YM/;
43
use Koha::List::Patron qw( GetPatronLists );
45
use Koha::Patrons;
46
use Koha::List::Patron;
47
44
48
my $cgi = CGI->new;
45
my $cgi = CGI->new;
49
46
(-)a/tools/copy-holidays.pl (-1 / +1 lines)
Lines 21-27 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( checkauth );
25
use C4::Output;
25
use C4::Output;
26
26
27
27
(-)a/tools/csv-profiles.pl (-3 / +2 lines)
Lines 37-47 This script allow the user to define a new profile for CSV export Link Here
37
use Modern::Perl;
37
use Modern::Perl;
38
use Encode;
38
use Encode;
39
39
40
use C4::Auth;
40
use C4::Auth qw( get_template_and_user );
41
use C4::Context;
41
use C4::Context;
42
use C4::Output;
42
use C4::Output qw( output_html_with_http_headers );
43
use CGI qw ( -utf8 );
43
use CGI qw ( -utf8 );
44
use C4::Koha;
45
use Koha::CsvProfiles;
44
use Koha::CsvProfiles;
46
45
47
my $input            = CGI->new;
46
my $input            = CGI->new;
(-)a/tools/exceptionHolidays.pl (-2 / +2 lines)
Lines 4-15 use Modern::Perl; Link Here
4
4
5
use CGI qw ( -utf8 );
5
use CGI qw ( -utf8 );
6
6
7
use C4::Auth;
7
use C4::Auth qw( checkauth );
8
use C4::Output;
8
use C4::Output;
9
use DateTime;
9
use DateTime;
10
10
11
use C4::Calendar;
11
use C4::Calendar;
12
use Koha::DateUtils;
12
use Koha::DateUtils qw( dt_from_string );
13
13
14
my $input = CGI->new;
14
my $input = CGI->new;
15
my $dbh = C4::Context->dbh();
15
my $dbh = C4::Context->dbh();
(-)a/tools/export.pl (-4 / +4 lines)
Lines 19-33 Link Here
19
use Modern::Perl;
19
use Modern::Perl;
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use MARC::File::XML;
21
use MARC::File::XML;
22
use List::MoreUtils qw(uniq);
22
use List::MoreUtils qw( uniq );
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use Koha::Authority::Types;
26
use Koha::Authority::Types;
27
use Koha::Biblioitems;
27
use Koha::Biblioitems;
28
use Koha::CsvProfiles;
28
use Koha::CsvProfiles;
29
use Koha::Database;
29
use Koha::Database;
30
use Koha::DateUtils qw( dt_from_string output_pref );
30
use Koha::DateUtils qw( dt_from_string );
31
use Koha::Exporter::Record;
31
use Koha::Exporter::Record;
32
use Koha::ItemTypes;
32
use Koha::ItemTypes;
33
use Koha::Libraries;
33
use Koha::Libraries;
(-)a/tools/holidays.pl (-3 / +3 lines)
Lines 20-30 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
25
26
use C4::Calendar;
26
use C4::Calendar;
27
use Koha::DateUtils;
27
use Koha::DateUtils qw( dt_from_string output_pref );
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
30
30
(-)a/tools/import_borrowers.pl (-4 / +4 lines)
Lines 36-51 Link Here
36
36
37
use Modern::Perl;
37
use Modern::Perl;
38
38
39
use C4::Auth;
39
use C4::Auth qw( get_template_and_user );
40
use C4::Output;
40
use C4::Output qw( output_and_exit output_html_with_http_headers );
41
use C4::Templates;
41
use C4::Templates;
42
use Koha::Patrons;
42
use Koha::Patrons;
43
use Koha::DateUtils;
43
use Koha::DateUtils qw( dt_from_string );
44
use Koha::Token;
44
use Koha::Token;
45
use Koha::Libraries;
45
use Koha::Libraries;
46
use Koha::Patron::Categories;
46
use Koha::Patron::Categories;
47
use Koha::Patron::Attribute::Types;
47
use Koha::Patron::Attribute::Types;
48
use Koha::List::Patron;
48
use Koha::List::Patron qw( AddPatronList AddPatronsToList );
49
49
50
use Koha::Patrons::Import;
50
use Koha::Patrons::Import;
51
my $Import = Koha::Patrons::Import->new();
51
my $Import = Koha::Patrons::Import->new();
(-)a/tools/inventory.pl (-10 / +9 lines)
Lines 26-43 my $input = CGI->new; Link Here
26
my $uploadbarcodes = $input->param('uploadbarcodes');
26
my $uploadbarcodes = $input->param('uploadbarcodes');
27
my $barcodelist = $input->param('barcodelist');
27
my $barcodelist = $input->param('barcodelist');
28
28
29
use C4::Auth;
29
use C4::Auth qw( get_template_and_user );
30
use C4::Context;
30
use C4::Context;
31
use C4::Output;
31
use C4::Output qw( output_html_with_http_headers );
32
use C4::Biblio;
32
use C4::Items qw( GetItemsForInventory );
33
use C4::Items;
33
use C4::Koha qw( GetAuthorisedValues );
34
use C4::Koha;
34
use C4::Circulation qw( AddReturn );
35
use C4::Circulation;
35
use C4::Reports::Guided qw( );
36
use C4::Reports::Guided;    #_get_column_defs
36
use C4::Charset qw( NormalizeString );
37
use C4::Charset;
38
37
39
use Koha::Biblios;
38
use Koha::Biblios;
40
use Koha::DateUtils;
39
use Koha::DateUtils qw( dt_from_string output_pref );
41
use Koha::AuthorisedValues;
40
use Koha::AuthorisedValues;
42
use Koha::BiblioFrameworks;
41
use Koha::BiblioFrameworks;
43
use Koha::ClassSources;
42
use Koha::ClassSources;
Lines 371-377 $template->param( Link Here
371
370
372
# Export to csv
371
# Export to csv
373
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
372
if (defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on'){
374
    eval {use Text::CSV};
373
    eval {use Text::CSV ();};
375
    my $csv = Text::CSV->new or
374
    my $csv = Text::CSV->new or
376
            die Text::CSV->error_diag ();
375
            die Text::CSV->error_diag ();
377
    binmode STDOUT, ":encoding(UTF-8)";
376
    binmode STDOUT, ":encoding(UTF-8)";
(-)a/tools/koha-news.pl (-6 / +4 lines)
Lines 24-36 Link Here
24
24
25
use Modern::Perl;
25
use Modern::Perl;
26
use CGI qw ( -utf8 );
26
use CGI qw ( -utf8 );
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Koha;
29
use C4::Context;
28
use C4::Context;
30
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
31
use C4::Languages qw(getTranslatedLanguages);
30
use C4::Languages qw( getTranslatedLanguages );
32
use Date::Calc qw/Date_to_Days Today/;
31
use Koha::DateUtils qw( dt_from_string output_pref );
33
use Koha::DateUtils;
34
use Koha::News;
32
use Koha::News;
35
33
36
my $cgi = CGI->new;
34
my $cgi = CGI->new;
(-)a/tools/letter.pl (-4 / +4 lines)
Lines 42-52 Link Here
42
42
43
use Modern::Perl;
43
use Modern::Perl;
44
use CGI qw ( -utf8 );
44
use CGI qw ( -utf8 );
45
use C4::Auth;
45
use C4::Auth qw( get_template_and_user );
46
use C4::Context;
46
use C4::Context;
47
use C4::Output;
47
use C4::Output qw( output_html_with_http_headers );
48
use C4::Letters;
48
use C4::Letters qw( GetMessageTransportTypes );
49
use C4::Log;
49
use C4::Log qw( logaction );
50
50
51
use Koha::Notice::Templates;
51
use Koha::Notice::Templates;
52
use Koha::Patron::Attribute::Types;
52
use Koha::Patron::Attribute::Types;
(-)a/tools/manage-marc-import.pl (-5 / +3 lines)
Lines 27-37 use MARC::File::USMARC; Link Here
27
# Koha modules used
27
# Koha modules used
28
use C4::Context;
28
use C4::Context;
29
use C4::Koha;
29
use C4::Koha;
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::AuthoritiesMarc;
31
use C4::Output qw( output_html_with_http_headers );
32
use C4::Output;
32
use C4::ImportBatch qw( CleanBatch DeleteBatch GetImportBatch GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction BatchFindDuplicates SetImportBatchMatcher GetItemNumbersFromImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches BatchCommitRecords BatchRevertRecords );
33
use C4::Biblio;
34
use C4::ImportBatch;
35
use C4::Matcher;
33
use C4::Matcher;
36
use C4::BackgroundJob;
34
use C4::BackgroundJob;
37
use C4::Labels::Batch;
35
use C4::Labels::Batch;
(-)a/tools/marc_modification_templates.pl (-4 / +12 lines)
Lines 20-29 use Modern::Perl; Link Here
20
20
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Koha;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Output;
25
use C4::MarcModificationTemplates qw(
26
use C4::MarcModificationTemplates;
26
    AddModificationTemplate
27
    AddModificationTemplateAction
28
    DelModificationTemplate
29
    DelModificationTemplateAction
30
    GetModificationTemplateActions
31
    GetModificationTemplates
32
    ModModificationTemplateAction
33
    MoveModificationTemplateAction
34
);
27
35
28
my $cgi = CGI->new;
36
my $cgi = CGI->new;
29
37
(-)a/tools/modborrowers.pl (-6 / +5 lines)
Lines 27-42 Link Here
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
use CGI qw ( -utf8 );
29
use CGI qw ( -utf8 );
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Koha;
31
use C4::Koha qw( GetAuthorisedValues );
32
use C4::Members;
32
use C4::Members;
33
use C4::Output;
33
use C4::Output qw( output_html_with_http_headers );
34
use List::MoreUtils qw /any uniq/;
35
use Koha::DateUtils qw( dt_from_string );
34
use Koha::DateUtils qw( dt_from_string );
36
use Koha::List::Patron;
35
use Koha::List::Patron qw( GetPatronLists );
37
use Koha::Libraries;
36
use Koha::Libraries;
38
use Koha::Patron::Categories;
37
use Koha::Patron::Categories;
39
use Koha::Patron::Debarments;
38
use Koha::Patron::Debarments qw( AddDebarment DelDebarment GetDebarments );
40
use Koha::Patrons;
39
use Koha::Patrons;
41
40
42
my $input = CGI->new;
41
my $input = CGI->new;
(-)a/tools/newHolidays.pl (-2 / +2 lines)
Lines 21-32 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use C4::Auth;
24
use C4::Auth qw( checkauth );
25
use C4::Output;
25
use C4::Output;
26
26
27
use C4::Calendar;
27
use C4::Calendar;
28
use DateTime;
28
use DateTime;
29
use Koha::DateUtils;
29
use Koha::DateUtils qw( dt_from_string output_pref );
30
30
31
my $input               = CGI->new;
31
my $input               = CGI->new;
32
my $dbh                 = C4::Context->dbh();
32
my $dbh                 = C4::Context->dbh();
(-)a/tools/overduerules.pl (-4 / +3 lines)
Lines 20-31 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Context;
22
use C4::Context;
23
use C4::Output;
23
use C4::Output qw( output_html_with_http_headers );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Koha;
26
use C4::Letters;
25
use C4::Letters;
27
use C4::Members;
26
use C4::Members;
28
use C4::Overdues;
27
use C4::Overdues qw( GetOverdueMessageTransportTypes );
29
use Koha::Libraries;
28
use Koha::Libraries;
30
29
31
use Koha::Patron::Categories;
30
use Koha::Patron::Categories;
(-)a/tools/picture-upload.pl (-3 / +2 lines)
Lines 22-33 Link Here
22
use Modern::Perl;
22
use Modern::Perl;
23
23
24
use File::Temp;
24
use File::Temp;
25
use File::Copy;
26
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
27
use GD;
26
use GD;
28
use C4::Context;
27
use C4::Context;
29
use C4::Auth;
28
use C4::Auth qw( get_template_and_user );
30
use C4::Output;
29
use C4::Output qw( output_and_exit output_html_with_http_headers );
31
use C4::Members;
30
use C4::Members;
32
31
33
use Koha::Logger;
32
use Koha::Logger;
(-)a/tools/problem-reports.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Context;
23
use C4::Context;
24
use C4::Output;
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use Koha::ProblemReports;
26
use Koha::ProblemReports;
27
27
28
my $query = CGI->new;
28
my $query = CGI->new;
(-)a/tools/quotes-upload.pl (-3 / +2 lines)
Lines 22-31 use Modern::Perl; Link Here
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use autouse 'Data::Dumper' => qw(Dumper);
23
use autouse 'Data::Dumper' => qw(Dumper);
24
24
25
use C4::Auth;
25
use C4::Auth qw( get_template_and_user );
26
use C4::Koha;
27
use C4::Context;
26
use C4::Context;
28
use C4::Output;
27
use C4::Output qw( output_html_with_http_headers );
29
28
30
my $cgi = CGI->new;
29
my $cgi = CGI->new;
31
30
(-)a/tools/quotes.pl (-3 / +3 lines)
Lines 18-28 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use Try::Tiny;
21
use Try::Tiny qw( catch try );
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use C4::Context;
24
use C4::Context;
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::Quotes;
26
use Koha::Quotes;
27
27
28
my $input = CGI->new;
28
my $input = CGI->new;
(-)a/tools/scheduler.pl (-5 / +5 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use C4::Context;
21
use C4::Context;
22
use C4::Scheduler;
22
use C4::Scheduler qw( add_at_job get_jobs remove_at_job );
23
use C4::Reports::Guided;
23
use C4::Reports::Guided qw( get_saved_reports );
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use CGI qw ( -utf8 );
25
use CGI qw ( -utf8 );
26
use C4::Output;
26
use C4::Output qw( output_html_with_http_headers );
27
use Koha::DateUtils;;
27
use Koha::DateUtils qw( dt_from_string output_pref );;
28
28
29
my $input = CGI->new;
29
my $input = CGI->new;
30
my $base;
30
my $base;
(-)a/tools/showdiffmarc.pl (-5 / +5 lines)
Lines 26-36 use CGI qw(:standard -utf8); Link Here
26
26
27
# Koha modules used
27
# Koha modules used
28
use C4::Context;
28
use C4::Context;
29
use C4::Output;
29
use C4::Output qw( output_html_with_http_headers );
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Biblio;
31
use C4::Biblio qw( GetMarcBiblio );
32
use C4::AuthoritiesMarc;
32
use C4::Auth qw( get_template_and_user );
33
use C4::ImportBatch;
33
use C4::ImportBatch qw( GetRecordFromImportBiblio GetImportBiblios );
34
34
35
use Koha::Biblios;
35
use Koha::Biblios;
36
36
(-)a/tools/stage-marc-import.pl (-5 / +4 lines)
Lines 33-46 use MARC::File::USMARC; Link Here
33
33
34
# Koha modules used
34
# Koha modules used
35
use C4::Context;
35
use C4::Context;
36
use C4::Auth;
36
use C4::Auth qw( get_template_and_user );
37
use C4::Output;
37
use C4::Output qw( output_html_with_http_headers );
38
use C4::Biblio;
38
use C4::ImportBatch qw( RecordsFromMARCXMLFile RecordsFromISO2709File RecordsFromMarcPlugin BatchStageMarcRecords BatchFindDuplicates SetImportBatchMatcher SetImportBatchOverlayAction SetImportBatchNoMatchAction SetImportBatchItemAction );
39
use C4::ImportBatch;
40
use C4::Matcher;
39
use C4::Matcher;
41
use Koha::UploadedFiles;
40
use Koha::UploadedFiles;
42
use C4::BackgroundJob;
41
use C4::BackgroundJob;
43
use C4::MarcModificationTemplates;
42
use C4::MarcModificationTemplates qw( GetModificationTemplates );
44
use Koha::Plugins;
43
use Koha::Plugins;
45
use Koha::ImportBatches;
44
use Koha::ImportBatches;
46
45
(-)a/tools/stockrotation.pl (-3 / +3 lines)
Lines 27-42 Link Here
27
use Modern::Perl;
27
use Modern::Perl;
28
use CGI;
28
use CGI;
29
29
30
use C4::Auth;
30
use C4::Auth qw( get_template_and_user );
31
use C4::Context;
31
use C4::Context;
32
use C4::Output;
32
use C4::Output qw( output_html_with_http_headers );
33
33
34
use Koha::Libraries;
34
use Koha::Libraries;
35
use Koha::StockRotationRotas;
35
use Koha::StockRotationRotas;
36
use Koha::StockRotationItems;
36
use Koha::StockRotationItems;
37
use Koha::StockRotationStages;
37
use Koha::StockRotationStages;
38
use Koha::Item;
38
use Koha::Item;
39
use Koha::Util::StockRotation qw(:ALL);
39
use Koha::Util::StockRotation qw( get_branches get_stages move_to_next_stage toggle_indemand remove_from_stage add_items_to_rota get_barcodes_status );
40
40
41
my $input = CGI->new;
41
my $input = CGI->new;
42
42
(-)a/tools/tools-home.pl (-3 / +3 lines)
Lines 18-26 Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use CGI qw ( -utf8 );
20
use CGI qw ( -utf8 );
21
use C4::Auth;
21
use C4::Auth qw( get_template_and_user );
22
use C4::Output;
22
use C4::Output qw( output_html_with_http_headers );
23
use C4::Tags qw/get_count_by_tag_status/;
23
use C4::Tags qw( get_count_by_tag_status );
24
use Koha::Reviews;
24
use Koha::Reviews;
25
25
26
my $query = CGI->new;
26
my $query = CGI->new;
(-)a/tools/upload-cover-image.pl (-3 / +3 lines)
Lines 43-55 use File::Temp; Link Here
43
use CGI qw ( -utf8 );
43
use CGI qw ( -utf8 );
44
use GD;
44
use GD;
45
use C4::Context;
45
use C4::Context;
46
use C4::Auth;
46
use C4::Auth qw( get_template_and_user );
47
use C4::Output;
47
use C4::Output qw( output_html_with_http_headers );
48
use Koha::Biblios;
48
use Koha::Biblios;
49
use Koha::CoverImages;
49
use Koha::CoverImages;
50
use Koha::Items;
50
use Koha::Items;
51
use Koha::UploadedFiles;
51
use Koha::UploadedFiles;
52
use C4::Log;
52
use C4::Log qw( logaction );
53
53
54
my $input = CGI->new;
54
my $input = CGI->new;
55
55
(-)a/tools/upload-file.pl (-2 / +2 lines)
Lines 23-32 use CGI qw ( -utf8 ); Link Here
23
use CGI::Cookie;
23
use CGI::Cookie;
24
use Encode;
24
use Encode;
25
use JSON;
25
use JSON;
26
use URI::Escape;
26
use URI::Escape qw( uri_unescape );
27
27
28
use C4::Context;
28
use C4::Context;
29
use C4::Auth qw/check_cookie_auth haspermission/;
29
use C4::Auth qw( check_cookie_auth get_session );
30
use Koha::Uploader;
30
use Koha::Uploader;
31
31
32
# upload-file.pl must authenticate the user
32
# upload-file.pl must authenticate the user
(-)a/tools/upload.pl (-2 / +2 lines)
Lines 21-28 use Modern::Perl; Link Here
21
use CGI qw/-utf8/;
21
use CGI qw/-utf8/;
22
use JSON;
22
use JSON;
23
23
24
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
25
use C4::Output;
25
use C4::Output qw( output_html_with_http_headers );
26
use Koha::UploadedFiles;
26
use Koha::UploadedFiles;
27
27
28
use constant ERR_READING     => 'UPLERR_FILE_NOT_READ';
28
use constant ERR_READING     => 'UPLERR_FILE_NOT_READ';
(-)a/tools/viewlog.pl (-7 / +5 lines)
Lines 20-38 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use C4::Auth;
23
use C4::Auth qw( get_template_and_user );
24
use CGI qw ( -utf8 );
24
use CGI qw ( -utf8 );
25
use Text::CSV::Encoded;
25
use Text::CSV::Encoded;
26
use C4::Context;
26
use C4::Context;
27
use C4::Koha;
27
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output;
28
use C4::Serials qw( CountSubscriptionFromBiblionumber );
29
use C4::Items;
29
use C4::Search qw( enabled_staff_search_views );
30
use C4::Serials;
31
use C4::Search;    # enabled_staff_search_views
32
30
33
use Koha::ActionLogs;
31
use Koha::ActionLogs;
34
use Koha::Database;
32
use Koha::Database;
35
use Koha::DateUtils;
33
use Koha::DateUtils qw( dt_from_string );
36
use Koha::Items;
34
use Koha::Items;
37
use Koha::Patrons;
35
use Koha::Patrons;
38
36
(-)a/virtualshelves/addbybiblionumber.pl (-3 / +2 lines)
Lines 59-67 addbybiblionumber.pl Link Here
59
use Modern::Perl;
59
use Modern::Perl;
60
60
61
use CGI qw ( -utf8 );
61
use CGI qw ( -utf8 );
62
use C4::Biblio;
62
use C4::Output qw( output_html_with_http_headers );
63
use C4::Output;
63
use C4::Auth qw( get_template_and_user );
64
use C4::Auth;
65
64
66
use Koha::Biblios;
65
use Koha::Biblios;
67
use Koha::Virtualshelves;
66
use Koha::Virtualshelves;
(-)a/virtualshelves/downloadshelf.pl (-6 / +4 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw(encode);
24
23
25
use C4::Auth;
24
use C4::Auth qw( get_template_and_user );
26
use C4::Biblio;
25
use C4::Biblio qw( GetMarcBiblio );
27
use C4::Items;
26
use C4::Output qw( output_html_with_http_headers );
28
use C4::Output;
29
use C4::Record;
27
use C4::Record;
30
use C4::Ris;
28
use C4::Ris qw( marc2ris );
31
29
32
use Koha::CsvProfiles;
30
use Koha::CsvProfiles;
33
use Koha::Virtualshelves;
31
use Koha::Virtualshelves;
(-)a/virtualshelves/sendshelf.pl (-8 / +14 lines)
Lines 20-33 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use Encode qw( encode );
23
use Encode;
24
use Carp;
24
use Carp qw( carp );
25
use Try::Tiny;
25
use Try::Tiny qw( catch try );
26
26
27
use C4::Auth;
27
use C4::Auth qw( get_template_and_user );
28
use C4::Biblio;
28
use C4::Biblio qw(
29
use C4::Items;
29
    GetBiblioData
30
use C4::Output;
30
    GetMarcAuthors
31
    GetMarcBiblio
32
    GetMarcISBN
33
    GetMarcSubjects
34
);
35
use C4::Items qw( GetItemsInfo );
36
use C4::Output qw( output_html_with_http_headers );
31
use Koha::Email;
37
use Koha::Email;
32
use Koha::Virtualshelves;
38
use Koha::Virtualshelves;
33
39
(-)a/virtualshelves/shelves.pl (-5 / +10 lines)
Lines 19-30 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use CGI qw ( -utf8 );
21
use CGI qw ( -utf8 );
22
use C4::Auth;
22
use C4::Auth qw( get_template_and_user );
23
use C4::Biblio;
23
use C4::Biblio qw( GetMarcBiblio );
24
use C4::Koha;
24
use C4::Koha qw(
25
use C4::Items;
25
    GetNormalizedEAN
26
    GetNormalizedISBN
27
    GetNormalizedOCLCNumber
28
    GetNormalizedUPC
29
);
30
use C4::Items qw( GetItemsLocationInfo );
26
use C4::Members;
31
use C4::Members;
27
use C4::Output;
32
use C4::Output qw( pagination_bar output_html_with_http_headers );
28
use C4::XSLT;
33
use C4::XSLT;
29
34
30
use Koha::Biblios;
35
use Koha::Biblios;
(-)a/xt/yaml_valid.pl (-2 / +1 lines)
Lines 18-24 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
use Getopt::Long;
21
use Getopt::Long qw( GetOptions );
22
use YAML::XS;
22
use YAML::XS;
23
23
24
my $usage = <<EOF;
24
my $usage = <<EOF;
25
- 

Return to bug 17600