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

(-)a/C4/Auth.pm (-9 / +9 lines)
Lines 25-31 use JSON qw/encode_json/; Link Here
25
use URI::Escape;
25
use URI::Escape;
26
use CGI::Session;
26
use CGI::Session;
27
27
28
require Exporter;
29
use C4::Context;
28
use C4::Context;
30
use C4::Templates;    # to get the template
29
use C4::Templates;    # to get the template
31
use C4::Languages;
30
use C4::Languages;
Lines 41-48 use List::MoreUtils qw/ any /; Link Here
41
use Encode qw( encode is_utf8);
40
use Encode qw( encode is_utf8);
42
41
43
# use utf8;
42
# use utf8;
44
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug $ldap $cas $caslogout $shib $shib_login);
43
use vars qw($debug $ldap $cas $caslogout $shib $shib_login);
45
44
our (@ISA, @EXPORT_OK);
46
BEGIN {
45
BEGIN {
47
    sub psgi_env { any { /^psgi\./ } keys %ENV }
46
    sub psgi_env { any { /^psgi\./ } keys %ENV }
48
47
Lines 51-63 BEGIN { Link Here
51
        else            { exit }
50
        else            { exit }
52
    }
51
    }
53
52
54
    $debug     = $ENV{DEBUG};
53
    require Exporter;
55
    @ISA       = qw(Exporter);
54
    @ISA = qw(Exporter);
56
    @EXPORT    = qw(&checkauth &get_template_and_user &haspermission &get_user_subpermissions);
55
    @EXPORT_OK = qw(
57
    @EXPORT_OK = qw(&check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash
56
        &check_api_auth &get_session &check_cookie_auth &checkpw &checkpw_internal &checkpw_hash
58
      &get_all_subpermissions &get_user_subpermissions
57
        &get_all_subpermissions &get_user_subpermissions
59
    );
58
    );
60
    %EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] );
59
60
    $debug     = $ENV{DEBUG};
61
    $ldap      = C4::Context->config('useldapserver') || 0;
61
    $ldap      = C4::Context->config('useldapserver') || 0;
62
    $cas       = C4::Context->preference('casAuthentication');
62
    $cas       = C4::Context->preference('casAuthentication');
63
    $shib      = C4::Context->config('useshibboleth') || 0;
63
    $shib      = C4::Context->config('useshibboleth') || 0;
(-)a/C4/Auth_with_cas.pm (-2 / +3 lines)
Lines 29-41 use FindBin; Link Here
29
use YAML;
29
use YAML;
30
30
31
31
32
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug);
32
use vars qw($debug);
33
our (@ISA, @EXPORT_OK);
33
34
34
BEGIN {
35
BEGIN {
35
	require Exporter;
36
	require Exporter;
36
	$debug = $ENV{DEBUG};
37
	$debug = $ENV{DEBUG};
37
	@ISA    = qw(Exporter);
38
	@ISA    = qw(Exporter);
38
	@EXPORT = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url);
39
	@EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url);
39
}
40
}
40
my $defaultcasserver;
41
my $defaultcasserver;
41
my $casservers;
42
my $casservers;
(-)a/C4/Auth_with_ldap.pm (-3 / +3 lines)
Lines 34-45 use List::MoreUtils qw( any ); Link Here
34
use Net::LDAP;
34
use Net::LDAP;
35
use Net::LDAP::Filter;
35
use Net::LDAP::Filter;
36
36
37
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug);
37
use vars qw($debug);
38
38
our (@ISA, @EXPORT_OK);
39
BEGIN {
39
BEGIN {
40
	require Exporter;
40
	require Exporter;
41
	@ISA    = qw(Exporter);
41
	@ISA    = qw(Exporter);
42
	@EXPORT = qw( checkpw_ldap );
42
	@EXPORT_OK = qw( checkpw_ldap );
43
}
43
}
44
44
45
# Redefine checkpw_ldap:
45
# Redefine checkpw_ldap:
(-)a/C4/Auth_with_shibboleth.pm (-3 / +3 lines)
Lines 26-38 use Koha::Database; Link Here
26
use Carp;
26
use Carp;
27
use CGI;
27
use CGI;
28
28
29
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug);
29
use vars qw($debug);
30
30
our (@ISA, @EXPORT_OK);
31
BEGIN {
31
BEGIN {
32
    require Exporter;
32
    require Exporter;
33
    $debug   = $ENV{DEBUG};
33
    $debug   = $ENV{DEBUG};
34
    @ISA     = qw(Exporter);
34
    @ISA     = qw(Exporter);
35
    @EXPORT =
35
    @EXPORT_OK =
36
      qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
36
      qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
37
}
37
}
38
38
(-)a/C4/Barcodes.pm (-7 lines)
Lines 29-44 use C4::Barcodes::annual; Link Here
29
use C4::Barcodes::incremental;
29
use C4::Barcodes::incremental;
30
use C4::Barcodes::EAN13;
30
use C4::Barcodes::EAN13;
31
31
32
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
33
use vars qw($debug $cgi_debug);	# from C4::Debug, of course
32
use vars qw($debug $cgi_debug);	# from C4::Debug, of course
34
use vars qw($max $prefformat);
33
use vars qw($max $prefformat);
35
34
36
BEGIN {
37
	require Exporter;
38
    @ISA = qw(Exporter);
39
    @EXPORT_OK = qw();
40
}
41
42
sub _prefformat {
35
sub _prefformat {
43
	unless (defined $prefformat) {
36
	unless (defined $prefformat) {
44
		unless ($prefformat = C4::Context->preference('autoBarcode')) {
37
		unless ($prefformat = C4::Context->preference('autoBarcode')) {
(-)a/C4/Biblio.pm (-30 / +6 lines)
Lines 32-42 use Module::Load::Conditional qw(can_load); Link Here
32
use C4::Koha;
32
use C4::Koha;
33
use C4::Log;    # logaction
33
use C4::Log;    # logaction
34
use C4::Budgets;
34
use C4::Budgets;
35
use C4::ClassSource;
35
use C4::ClassSource qw( GetClassSort );
36
use C4::Charset;
36
use C4::Charset qw( SetUTF8Flag );
37
use C4::Linker;
37
use C4::Linker;
38
use C4::OAI::Sets;
38
use C4::OAI::Sets;
39
use C4::Debug;
39
use C4::Debug;
40
use C4::Items;
40
41
41
use Koha::Caches;
42
use Koha::Caches;
42
use Koha::Authority::Types;
43
use Koha::Authority::Types;
Lines 44-52 use Koha::Acquisition::Currencies; Link Here
44
use Koha::SearchEngine;
45
use Koha::SearchEngine;
45
use Koha::Libraries;
46
use Koha::Libraries;
46
47
47
use vars qw(@ISA @EXPORT);
48
use vars qw($debug $cgi_debug);
48
use vars qw($debug $cgi_debug);
49
49
our (@ISA, @EXPORT_OK);
50
BEGIN {
50
BEGIN {
51
51
52
    require Exporter;
52
    require Exporter;
Lines 54-65 BEGIN { Link Here
54
54
55
    # to add biblios
55
    # to add biblios
56
    # EXPORTED FUNCTIONS.
56
    # EXPORTED FUNCTIONS.
57
    push @EXPORT, qw(
57
    @EXPORT_OK = qw(
58
      &AddBiblio
58
      AddBiblio
59
    );
60
61
    # to get something
62
    push @EXPORT, qw(
63
      GetBiblio
59
      GetBiblio
64
      GetBiblioData
60
      GetBiblioData
65
      GetMarcBiblio
61
      GetMarcBiblio
Lines 105-143 BEGIN { Link Here
105
      &CountBiblioInOrders
101
      &CountBiblioInOrders
106
      &GetSubscriptionsId
102
      &GetSubscriptionsId
107
      &GetHolds
103
      &GetHolds
108
    );
109
104
110
    # To modify something
111
    push @EXPORT, qw(
112
      &ModBiblio
105
      &ModBiblio
113
      &ModBiblioframework
106
      &ModBiblioframework
114
      &ModZebra
107
      &ModZebra
115
      &UpdateTotalIssues
108
      &UpdateTotalIssues
116
      &RemoveAllNsb
109
      &RemoveAllNsb
117
    );
118
110
119
    # To delete something
120
    push @EXPORT, qw(
121
      &DelBiblio
111
      &DelBiblio
122
    );
123
112
124
    # To link headings in a bib record
125
    # to authority records.
126
    push @EXPORT, qw(
127
      &BiblioAutoLink
113
      &BiblioAutoLink
128
      &LinkBibHeadingsToAuthorities
114
      &LinkBibHeadingsToAuthorities
129
    );
130
115
131
    # Internal functions
132
    # those functions are exported but should not be used
133
    # they are useful in a few circumstances, so they are exported,
134
    # but don't use them unless you are a core developer ;-)
135
    push @EXPORT, qw(
136
      &ModBiblioMarc
116
      &ModBiblioMarc
137
    );
138
117
139
    # Others functions
140
    push @EXPORT, qw(
141
      &TransformMarcToKoha
118
      &TransformMarcToKoha
142
      &TransformHtmlToMarc
119
      &TransformHtmlToMarc
143
      &TransformHtmlToXml
120
      &TransformHtmlToXml
Lines 2334-2340 sub PrepHostMarcField { Link Here
2334
    my ($hostbiblionumber,$hostitemnumber, $marcflavour) = @_;
2311
    my ($hostbiblionumber,$hostitemnumber, $marcflavour) = @_;
2335
    $marcflavour ||="MARC21";
2312
    $marcflavour ||="MARC21";
2336
    
2313
    
2337
    require C4::Items;
2338
    my $hostrecord = GetMarcBiblio($hostbiblionumber);
2314
    my $hostrecord = GetMarcBiblio($hostbiblionumber);
2339
	my $item = C4::Items::GetItem($hostitemnumber);
2315
	my $item = C4::Items::GetItem($hostitemnumber);
2340
	
2316
	
(-)a/C4/Bookseller.pm (-9 lines)
Lines 21-37 package C4::Bookseller; Link Here
21
use strict;
21
use strict;
22
use warnings;
22
use warnings;
23
23
24
use base qw( Exporter );
25
26
use C4::Bookseller::Contact;
24
use C4::Bookseller::Contact;
27
25
28
our @EXPORT_OK = qw(
29
  GetBooksellersWithLateOrders
30
  ModBookseller
31
  DelBookseller
32
  AddBookseller
33
);
34
35
=head1 NAME
26
=head1 NAME
36
27
37
C4::Bookseller - Koha functions for dealing with booksellers.
28
C4::Bookseller - Koha functions for dealing with booksellers.
(-)a/C4/Boolean.pm (-3 / +6 lines)
Lines 25-33 use strict; Link Here
25
use warnings;
25
use warnings;
26
26
27
use Carp;
27
use Carp;
28
use base qw(Exporter);
28
our (@ISA, @EXPORT_OK);
29
29
BEGIN {
30
our    @EXPORT_OK = qw( true_p);
30
    require Exporter;
31
    @ISA = qw( Exporter );
32
    @EXPORT_OK = qw( true_p );
33
};
31
34
32
=head1 NAME
35
=head1 NAME
33
36
(-)a/C4/Breeding.pm (-3 / +2 lines)
Lines 31-42 use C4::Languages; Link Here
31
use Koha::Database;
31
use Koha::Database;
32
use Koha::XSLT_Handler;
32
use Koha::XSLT_Handler;
33
33
34
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
34
our (@ISA, @EXPORT_OK);
35
36
BEGIN {
35
BEGIN {
37
	require Exporter;
36
	require Exporter;
38
	@ISA = qw(Exporter);
37
	@ISA = qw(Exporter);
39
    @EXPORT = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth);
38
    @EXPORT_OK = qw(&BreedingSearch &Z3950Search &Z3950SearchAuth);
40
}
39
}
41
40
42
=head1 NAME
41
=head1 NAME
(-)a/C4/Charset.pm (-3 / +2 lines)
Lines 26-37 use C4::Debug; Link Here
26
use Unicode::Normalize;
26
use Unicode::Normalize;
27
use Encode qw( decode encode is_utf8 );
27
use Encode qw( decode encode is_utf8 );
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 (-56 / +43 lines)
Lines 64-126 use Date::Calc qw( Link Here
64
  Day_of_Week
64
  Day_of_Week
65
  Add_Delta_Days
65
  Add_Delta_Days
66
);
66
);
67
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
67
our (@ISA, @EXPORT_OK);
68
69
BEGIN {
68
BEGIN {
70
	require Exporter;
69
    require Exporter;
71
	@ISA    = qw(Exporter);
70
    @ISA = qw(Exporter);
72
71
73
	# FIXME subs that should probably be elsewhere
72
    # FIXME subs that should probably be elsewhere
74
	push @EXPORT, qw(
73
    push @EXPORT_OK, qw(
75
		&barcodedecode
74
      &barcodedecode
76
        &LostItem
75
      &LostItem
77
        &ReturnLostItem
76
      &ReturnLostItem
78
        &GetPendingOnSiteCheckouts
77
      &GetPendingOnSiteCheckouts
79
	);
78
80
79
      &CanBookBeIssued
81
	# subs to deal with issuing a book
80
      &CanBookBeRenewed
82
	push @EXPORT, qw(
81
      &AddIssue
83
		&CanBookBeIssued
82
      &AddRenewal
84
		&CanBookBeRenewed
83
      &GetRenewCount
85
		&AddIssue
84
      &GetSoonestRenewDate
86
		&AddRenewal
85
      &GetLatestAutoRenewDate
87
		&GetRenewCount
86
      &GetItemIssue
88
        &GetSoonestRenewDate
87
      &GetItemIssues
89
        &GetLatestAutoRenewDate
88
      &GetIssuingCharges
90
		&GetItemIssue
89
      &GetBranchBorrowerCircRule
91
		&GetItemIssues
90
      &GetBranchItemRule
92
		&GetIssuingCharges
91
      &GetBiblioIssues
93
        &GetBranchBorrowerCircRule
92
      &GetOpenIssue
94
        &GetBranchItemRule
93
      &AnonymiseIssueHistory
95
		&GetBiblioIssues
94
      &CheckIfIssuedToPatron
96
		&GetOpenIssue
95
      &IsItemIssued
97
		&AnonymiseIssueHistory
96
      GetTopIssues
98
        &CheckIfIssuedToPatron
97
99
        &IsItemIssued
98
      &AddReturn
100
        GetTopIssues
99
      &MarkIssueReturned
101
	);
100
102
101
      &transferbook
103
	# subs to deal with returns
102
      &GetTransfers
104
	push @EXPORT, qw(
103
      &GetTransfersFromTo
105
		&AddReturn
104
      &updateWrongTransfer
106
        &MarkIssueReturned
105
      &DeleteTransfer
107
	);
106
      &IsBranchTransferAllowed
108
107
      &CreateBranchTransferLimit
109
	# subs to deal with transfers
108
      &DeleteBranchTransferLimits
110
	push @EXPORT, qw(
109
      &TransferSlip
111
		&transferbook
110
112
		&GetTransfers
113
		&GetTransfersFromTo
114
		&updateWrongTransfer
115
		&DeleteTransfer
116
                &IsBranchTransferAllowed
117
                &CreateBranchTransferLimit
118
                &DeleteBranchTransferLimits
119
        &TransferSlip
120
	);
121
122
    # subs to deal with offline circulation
123
    push @EXPORT, qw(
124
      &GetOfflineOperations
111
      &GetOfflineOperations
125
      &GetOfflineOperation
112
      &GetOfflineOperation
126
      &AddOfflineOperation
113
      &AddOfflineOperation
(-)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/ClassSource.pm (-24 / +22 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
        &AddClassSource
33
        &GetClassSource
34
        &ModClassSource
35
        &DelClassSource
36
        &GetClassSortRules
37
        &AddClassSortRule
38
        &GetClassSortRule
39
        &ModClassSortRule
40
        &DelClassSortRule
41
42
        &GetSourcesForSortRule
43
        &GetClassSort
44
    );
45
}
29
46
30
=head1 NAME
47
=head1 NAME
31
48
Lines 44-68 sources and sorting rules. Link Here
44
61
45
=cut
62
=cut
46
63
47
48
@ISA    = qw(Exporter);
49
@EXPORT = qw(
50
    &GetClassSources
51
    &AddClassSource
52
    &GetClassSource
53
    &ModClassSource
54
    &DelClassSource
55
    &GetClassSortRules
56
    &AddClassSortRule
57
    &GetClassSortRule
58
    &ModClassSortRule
59
    &DelClassSortRule
60
  
61
    &GetSourcesForSortRule
62
    &GetClassSort
63
    
64
);
65
66
=head2 GetClassSources
64
=head2 GetClassSources
67
65
68
  my $sources = GetClassSources();
66
  my $sources = GetClassSources();
(-)a/C4/CourseReserves.pm (-3 / +3 lines)
Lines 24-31 use C4::Items qw(GetItem ModItem); Link Here
24
use C4::Biblio qw(GetBiblioFromItemNumber);
24
use C4::Biblio qw(GetBiblioFromItemNumber);
25
use C4::Circulation qw(GetOpenIssue);
25
use C4::Circulation qw(GetOpenIssue);
26
26
27
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG @FIELDS);
27
use vars qw($DEBUG @FIELDS);
28
28
our (@ISA, @EXPORT_OK);
29
BEGIN {
29
BEGIN {
30
    require Exporter;
30
    require Exporter;
31
    @ISA       = qw(Exporter);
31
    @ISA       = qw(Exporter);
Lines 50-56 BEGIN { Link Here
50
50
51
      &GetItemCourseReservesInfo
51
      &GetItemCourseReservesInfo
52
    );
52
    );
53
    %EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
53
    #%EXPORT_TAGS = ( 'all' => \@EXPORT_OK );
54
54
55
    $DEBUG = 0;
55
    $DEBUG = 0;
56
    @FIELDS = ( 'itype', 'ccode', 'holdingbranch', 'location' );
56
    @FIELDS = ( 'itype', 'ccode', 'holdingbranch', 'location' );
(-)a/C4/External/BakerTaylor.pm (-5 / +6 lines)
Lines 27-40 use C4::Debug; Link Here
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
29
30
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
30
use vars qw(%EXPORT_TAGS $VERSION);
31
our (@ISA, @EXPORT_OK);
31
32
32
BEGIN {
33
BEGIN {
33
	require Exporter;
34
    require Exporter;
34
	@ISA = qw(Exporter);
35
    @ISA = qw(Exporter);
35
    $VERSION = 3.07.00.049;
36
    $VERSION = 3.07.00.049;
36
	@EXPORT_OK = qw(&availability &content_cafe &image_url &link_url &http_jacket_link);
37
    @EXPORT_OK = qw(&availability &content_cafe &image_url &link_url &http_jacket_link);
37
	%EXPORT_TAGS = (all=>\@EXPORT_OK);
38
#	%EXPORT_TAGS = (all=>\@EXPORT_OK);
38
}
39
}
39
40
40
# These variables are plack safe: they are initialized each time
41
# These variables are plack safe: they are initialized each time
(-)a/C4/HoldsQueue.pm (-1 / +1 lines)
Lines 34-40 use List::Util qw(shuffle); Link Here
34
use List::MoreUtils qw(any);
34
use List::MoreUtils qw(any);
35
use Data::Dumper;
35
use Data::Dumper;
36
36
37
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
37
our (@ISA, @EXPORT_OK);
38
BEGIN {
38
BEGIN {
39
    require Exporter;
39
    require Exporter;
40
    @ISA = qw(Exporter);
40
    @ISA = qw(Exporter);
(-)a/C4/ImportBatch.pm (-3 / +2 lines)
Lines 30-41 use C4::MarcModificationTemplates; Link Here
30
use Koha::Plugins::Handler;
30
use Koha::Plugins::Handler;
31
use Koha::Logger;
31
use Koha::Logger;
32
32
33
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
33
our (@ISA, @EXPORT_OK);
34
35
BEGIN {
34
BEGIN {
36
	require Exporter;
35
	require Exporter;
37
	@ISA    = qw(Exporter);
36
	@ISA    = qw(Exporter);
38
	@EXPORT = qw(
37
	@EXPORT_OK = qw(
39
    GetZ3950BatchId
38
    GetZ3950BatchId
40
    GetWebserviceBatchId
39
    GetWebserviceBatchId
41
    GetImportRecordMarc
40
    GetImportRecordMarc
(-)a/C4/ImportExportFramework.pm (-3 / +2 lines)
Lines 28-39 use C4::Context; Link Here
28
use C4::Debug;
28
use C4::Debug;
29
29
30
30
31
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
31
our (@ISA, @EXPORT_OK);
32
33
BEGIN {
32
BEGIN {
34
    require Exporter;
33
    require Exporter;
35
    @ISA    = qw(Exporter);
34
    @ISA    = qw(Exporter);
36
    @EXPORT = qw(
35
    @EXPORT_OK = qw(
37
        &ExportFramework
36
        &ExportFramework
38
        &ImportFramework
37
        &ImportFramework
39
        &createODS
38
        &createODS
(-)a/C4/InstallAuth.pm (-9 / +8 lines)
Lines 21-35 use strict; Link Here
21
#use warnings; FIXME - Bug 2505
21
#use warnings; FIXME - Bug 2505
22
use Digest::MD5 qw(md5_base64);
22
use Digest::MD5 qw(md5_base64);
23
23
24
require Exporter;
25
use C4::Context;
24
use C4::Context;
26
use C4::Output;
25
use C4::Output;
27
use C4::Templates;
26
use C4::Templates;
28
use C4::Koha;
27
use C4::Koha;
29
use CGI::Session;
28
use CGI::Session;
30
29
31
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
30
our (@ISA, @EXPORT_OK);
32
31
BEGIN {
32
    @ISA    = qw(Exporter);
33
    @EXPORT_OK = qw(
34
      &checkauth
35
      &get_template_and_user
36
    );
37
}
33
38
34
=head1 NAME
39
=head1 NAME
35
40
Lines 71-82 InstallAuth - Authenticates Koha users for Install process Link Here
71
76
72
=cut
77
=cut
73
78
74
@ISA    = qw(Exporter);
75
@EXPORT = qw(
76
  &checkauth
77
  &get_template_and_user
78
);
79
80
=item get_template_and_user
79
=item get_template_and_user
81
80
82
    my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
81
    my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
(-)a/C4/Items.pm (-3 / +3 lines)
Lines 24-30 use strict; Link Here
24
use Carp;
24
use Carp;
25
use C4::Context;
25
use C4::Context;
26
use C4::Koha;
26
use C4::Koha;
27
use C4::Biblio;
27
use C4::Biblio qw( GetFrameworkCode );
28
use Koha::DateUtils;
28
use Koha::DateUtils;
29
use MARC::Record;
29
use MARC::Record;
30
use C4::ClassSource;
30
use C4::ClassSource;
Lines 45-51 use Koha::SearchEngine; Link Here
45
use Koha::SearchEngine::Search;
45
use Koha::SearchEngine::Search;
46
use Koha::Libraries;
46
use Koha::Libraries;
47
47
48
use vars qw(@ISA @EXPORT);
48
our (@ISA, @EXPORT_OK);
49
49
50
BEGIN {
50
BEGIN {
51
51
Lines 53-59 BEGIN { Link Here
53
    @ISA = qw( Exporter );
53
    @ISA = qw( Exporter );
54
54
55
    # function exports
55
    # function exports
56
    @EXPORT = qw(
56
    @EXPORT_OK = qw(
57
        GetItem
57
        GetItem
58
        AddItemFromMarc
58
        AddItemFromMarc
59
        AddItem
59
        AddItem
(-)a/C4/Koha.pm (-7 / +4 lines)
Lines 34-45 use Business::ISBN; Link Here
34
use Business::ISSN;
34
use Business::ISSN;
35
use autouse 'Data::cselectall_arrayref' => qw(Dumper);
35
use autouse 'Data::cselectall_arrayref' => qw(Dumper);
36
use DBI qw(:sql_types);
36
use DBI qw(:sql_types);
37
use vars qw(@ISA @EXPORT @EXPORT_OK $DEBUG);
37
our (@ISA, @EXPORT_OK);
38
39
BEGIN {
38
BEGIN {
40
	require Exporter;
39
	require Exporter;
41
	@ISA    = qw(Exporter);
40
	@ISA    = qw(Exporter);
42
	@EXPORT = qw(
41
    @EXPORT_OK = qw(
43
        &GetPrinters &GetPrinter
42
        &GetPrinters &GetPrinter
44
        &GetItemTypes &getitemtypeinfo
43
        &GetItemTypes &getitemtypeinfo
45
                &GetItemTypesCategorized &GetItemTypesByCategory
44
                &GetItemTypesCategorized &GetItemTypesByCategory
Lines 65-74 BEGIN { Link Here
65
        &GetVariationsOfISSNs
64
        &GetVariationsOfISSNs
66
        &NormalizeISSN
65
        &NormalizeISSN
67
66
68
		$DEBUG
67
        GetDailyQuote
68
69
	);
69
	);
70
	$DEBUG = 0;
71
@EXPORT_OK = qw( GetDailyQuote );
72
}
70
}
73
71
74
=head1 NAME
72
=head1 NAME
Lines 399-405 sub getImageSets { Link Here
399
    my @imagesets = (); # list of hasrefs of image set data to pass to template
397
    my @imagesets = (); # list of hasrefs of image set data to pass to template
400
    my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
398
    my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
401
    foreach my $imagesubdir ( @subdirectories ) {
399
    foreach my $imagesubdir ( @subdirectories ) {
402
    warn $imagesubdir if $DEBUG;
403
        my @imagelist     = (); # hashrefs of image info
400
        my @imagelist     = (); # hashrefs of image info
404
        my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
401
        my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
405
        my $imagesetactive = 0;
402
        my $imagesetactive = 0;
(-)a/C4/Languages.pm (-4 / +4 lines)
Lines 27-44 use CGI; Link Here
27
use List::MoreUtils qw( any );
27
use List::MoreUtils qw( any );
28
use C4::Context;
28
use C4::Context;
29
use Koha::Cache::Memory::Lite;
29
use Koha::Cache::Memory::Lite;
30
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
30
use vars qw($DEBUG);
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 = qw(
35
    @EXPORT_OK = qw(
36
        &getFrameworkLanguages
36
        &getFrameworkLanguages
37
        &getTranslatedLanguages
37
        &getTranslatedLanguages
38
        &getLanguages
38
        &getLanguages
39
        &getAllLanguages
39
        &getAllLanguages
40
    );
40
    );
41
    @EXPORT_OK = qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage);
41
    push @EXPORT_OK, qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages getLanguages get_bidi regex_lang_subtags language_get_description accept_language getlanguage);
42
    $DEBUG = 0;
42
    $DEBUG = 0;
43
}
43
}
44
44
(-)a/C4/Letters.pm (-3 / +2 lines)
Lines 38-49 use Koha::SMS::Providers; Link Here
38
use Koha::Email;
38
use Koha::Email;
39
use Koha::DateUtils qw( format_sqldatetime dt_from_string );
39
use Koha::DateUtils qw( format_sqldatetime dt_from_string );
40
40
41
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
41
our (@ISA, @EXPORT_OK);
42
43
BEGIN {
42
BEGIN {
44
    require Exporter;
43
    require Exporter;
45
    @ISA = qw(Exporter);
44
    @ISA = qw(Exporter);
46
    @EXPORT = qw(
45
    @EXPORT_OK = qw(
47
        &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages &GetMessageTransportTypes
46
        &GetLetters &GetLettersAvailableForALibrary &GetLetterTemplates &DelLetter &GetPreparedLetter &GetWrappedLetter &addalert &getalert &delalert &findrelatedto &SendAlerts &GetPrintMessages &GetMessageTransportTypes
48
    );
47
    );
49
}
48
}
(-)a/C4/Members.pm (-13 / +3 lines)
Lines 46-65 use Koha::Patrons; Link Here
46
use Koha::Patron::Categories;
46
use Koha::Patron::Categories;
47
use Koha::Schema;
47
use Koha::Schema;
48
48
49
our (@ISA,@EXPORT,@EXPORT_OK,$debug);
49
our ($debug);
50
50
51
use Module::Load::Conditional qw( can_load );
51
use Module::Load::Conditional qw( can_load );
52
if ( ! can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) {
52
if ( ! can_load( modules => { 'Koha::NorwegianPatronDB' => undef } ) ) {
53
   $debug && warn "Unable to load Koha::NorwegianPatronDB";
53
   $debug && warn "Unable to load Koha::NorwegianPatronDB";
54
}
54
}
55
55
56
56
our (@ISA, @EXPORT_OK);
57
BEGIN {
57
BEGIN {
58
    $debug = $ENV{DEBUG} || 0;
58
    $debug = $ENV{DEBUG} || 0;
59
    require Exporter;
59
    require Exporter;
60
    @ISA = qw(Exporter);
60
    @ISA = qw(Exporter);
61
    #Get data
61
    @EXPORT_OK = qw(
62
    push @EXPORT, qw(
63
        &GetMemberDetails
62
        &GetMemberDetails
64
        &GetMember
63
        &GetMember
65
64
Lines 87-108 BEGIN { Link Here
87
        GetBorrowersWithEmail
86
        GetBorrowersWithEmail
88
87
89
        GetOverduesForPatron
88
        GetOverduesForPatron
90
    );
91
89
92
    #Modify data
93
    push @EXPORT, qw(
94
        &ModMember
90
        &ModMember
95
        &changepassword
91
        &changepassword
96
    );
97
92
98
    #Insert data
99
    push @EXPORT, qw(
100
        &AddMember
93
        &AddMember
101
        &AddMember_Opac
94
        &AddMember_Opac
102
    );
103
95
104
    #Check data
105
    push @EXPORT, qw(
106
        &checkuniquemember
96
        &checkuniquemember
107
        &checkuserpassword
97
        &checkuserpassword
108
        &Check_Userid
98
        &Check_Userid
(-)a/C4/Members/Attributes.pm (-3 / +2 lines)
Lines 24-39 use Text::CSV; # Don't be tempted to use Text::CSV::Unicode -- even in bina Link Here
24
use C4::Context;
24
use C4::Context;
25
use C4::Members::AttributeTypes;
25
use C4::Members::AttributeTypes;
26
26
27
use vars qw(@ISA @EXPORT_OK @EXPORT %EXPORT_TAGS);
28
our ($csv, $AttributeTypes);
27
our ($csv, $AttributeTypes);
29
28
our (@ISA, @EXPORT_OK);
30
BEGIN {
29
BEGIN {
31
    @ISA = qw(Exporter);
30
    @ISA = qw(Exporter);
32
    @EXPORT_OK = qw(GetBorrowerAttributes GetBorrowerAttributeValue CheckUniqueness SetBorrowerAttributes
31
    @EXPORT_OK = qw(GetBorrowerAttributes GetBorrowerAttributeValue CheckUniqueness SetBorrowerAttributes
33
                    DeleteBorrowerAttribute UpdateBorrowerAttribute
32
                    DeleteBorrowerAttribute UpdateBorrowerAttribute
34
                    extended_attributes_code_value_arrayref extended_attributes_merge
33
                    extended_attributes_code_value_arrayref extended_attributes_merge
35
                    SearchIdMatchingAttribute);
34
                    SearchIdMatchingAttribute);
36
    %EXPORT_TAGS = ( all => \@EXPORT_OK );
35
#    %EXPORT_TAGS = ( all => \@EXPORT_OK );
37
}
36
}
38
37
39
=head1 NAME
38
=head1 NAME
(-)a/C4/Members/Statistics.pm (-2 / +2 lines)
Lines 26-39 use Modern::Perl; Link Here
26
26
27
use C4::Context;
27
use C4::Context;
28
28
29
our ( @ISA, @EXPORT, @EXPORT_OK, $debug );
29
our ( @ISA, @EXPORT_OK, $debug );
30
30
31
BEGIN {
31
BEGIN {
32
    $debug = $ENV{DEBUG} || 0;
32
    $debug = $ENV{DEBUG} || 0;
33
    require Exporter;
33
    require Exporter;
34
    @ISA = qw(Exporter);
34
    @ISA = qw(Exporter);
35
35
36
    push @EXPORT, qw(
36
    @EXPORT_OK = qw(
37
        &GetTotalIssuesTodayByBorrower
37
        &GetTotalIssuesTodayByBorrower
38
        &GetTotalIssuesReturnedTodayByBorrower
38
        &GetTotalIssuesReturnedTodayByBorrower
39
        &GetPrecedentStateByBorrower
39
        &GetPrecedentStateByBorrower
(-)a/C4/Output.pm (-12 / +10 lines)
Lines 33-57 use URI::Escape; Link Here
33
use C4::Context;
33
use C4::Context;
34
use C4::Templates;
34
use C4::Templates;
35
35
36
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
36
our (@ISA, @EXPORT_OK);
37
37
38
BEGIN {
38
BEGIN {
39
    require Exporter;
39
    require Exporter;
40
40
41
 @ISA    = qw(Exporter);
41
    @ISA    = qw(Exporter);
42
    @EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead
42
    @EXPORT_OK, qw(
43
    %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url
43
        is_ajax
44
                                &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)],
44
        ajax_fail
45
                    ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)],
46
                    html =>[qw(&output_with_http_headers &output_html_with_http_headers)]
47
                );
48
    push @EXPORT, qw(
49
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
45
        setlanguagecookie getlanguagecookie pagination_bar parametrized_url
50
    );
51
    push @EXPORT, qw(
52
        &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers
46
        &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers
53
    );
47
    );
54
48
#    %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar parametrized_url
49
#                                &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)],
50
#                    ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)],
51
#                    html =>[qw(&output_with_http_headers &output_html_with_http_headers)]
52
#                );
55
}
53
}
56
54
57
=head1 NAME
55
=head1 NAME
(-)a/C4/Overdues.pm (-15 / +2 lines)
Lines 39-52 use Koha::Account::Lines; Link Here
39
use Koha::IssuingRules;
39
use Koha::IssuingRules;
40
use Koha::Libraries;
40
use Koha::Libraries;
41
41
42
use vars qw(@ISA @EXPORT);
42
our (@ISA, @EXPORT_OK);
43
44
BEGIN {
43
BEGIN {
45
    require Exporter;
44
    require Exporter;
46
    @ISA = qw(Exporter);
45
    @ISA = qw(Exporter);
47
46
48
    # subs to rename (and maybe merge some...)
47
    # subs to rename (and maybe merge some...)
49
    push @EXPORT, qw(
48
    @EXPORT_OK = qw(
50
      &CalcFine
49
      &CalcFine
51
      &Getoverdues
50
      &Getoverdues
52
      &checkoverdues
51
      &checkoverdues
Lines 61-82 BEGIN { Link Here
61
      &AddNotifyLine
60
      &AddNotifyLine
62
      &GetOverdueMessageTransportTypes
61
      &GetOverdueMessageTransportTypes
63
      &parse_overdues_letter
62
      &parse_overdues_letter
64
    );
65
63
66
    # subs to remove
67
    push @EXPORT, qw(
68
      &BorType
64
      &BorType
69
    );
70
65
71
    # check that an equivalent don't exist already before moving
72
73
    # subs to move to Circulation.pm
74
    push @EXPORT, qw(
75
      &GetIssuesIteminfo
66
      &GetIssuesIteminfo
76
    );
77
78
    # subs to move to Biblio.pm
79
    push @EXPORT, qw(
80
      &GetItems
67
      &GetItems
81
    );
68
    );
82
}
69
}
(-)a/C4/Reports.pm (-2 / +2 lines)
Lines 21-34 use strict; Link Here
21
#use warnings; FIXME - Bug 2505
21
#use warnings; FIXME - Bug 2505
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
23
24
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
25
use C4::Context;
24
use C4::Context;
26
use C4::Debug;
25
use C4::Debug;
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
        GetDelimiterChoices
32
        GetDelimiterChoices
33
    );
33
    );
34
}
34
}
(-)a/C4/Reports/Guided.pm (-2 / +2 lines)
Lines 22-28 use CGI qw ( -utf8 ); Link Here
22
use Carp;
22
use Carp;
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;
Lines 34-43 use C4::Log; Link Here
34
use Koha::AuthorisedValues;
33
use Koha::AuthorisedValues;
35
use Koha::Patron::Categories;
34
use Koha::Patron::Categories;
36
35
36
our (@ISA, @EXPORT_OK);
37
BEGIN {
37
BEGIN {
38
    require Exporter;
38
    require Exporter;
39
    @ISA    = qw(Exporter);
39
    @ISA    = qw(Exporter);
40
    @EXPORT = qw(
40
    @EXPORT_OK = qw(
41
      get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
41
      get_report_types get_report_areas get_report_groups get_columns build_query get_criteria
42
      save_report get_saved_reports execute_query get_saved_report create_compound run_compound
42
      save_report get_saved_reports execute_query get_saved_report create_compound run_compound
43
      get_column_type get_distinct_values save_dictionary get_from_dictionary
43
      get_column_type get_distinct_values save_dictionary get_from_dictionary
(-)a/C4/Reserves.pm (-4 / +4 lines)
Lines 52-59 use List::MoreUtils qw( firstidx any ); Link Here
52
use Carp;
52
use Carp;
53
use Data::Dumper;
53
use Data::Dumper;
54
54
55
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
56
57
=head1 NAME
55
=head1 NAME
58
56
59
C4::Reserves - Koha functions for dealing with reservation.
57
C4::Reserves - Koha functions for dealing with reservation.
Lines 97-106 This modules provides somes functions to deal with reservations. Link Here
97
95
98
=cut
96
=cut
99
97
98
our (@ISA, @EXPORT_OK);
100
BEGIN {
99
BEGIN {
101
    require Exporter;
100
    require Exporter;
102
    @ISA = qw(Exporter);
101
    @ISA = qw(Exporter);
103
    @EXPORT = qw(
102
    @EXPORT_OK = qw(
104
        &AddReserve
103
        &AddReserve
105
104
106
        &GetReserve
105
        &GetReserve
Lines 148-155 BEGIN { Link Here
148
        IsItemOnHoldAndFound
147
        IsItemOnHoldAndFound
149
148
150
        GetMaxPatronHoldsForRecord
149
        GetMaxPatronHoldsForRecord
150
151
        MergeHolds
151
    );
152
    );
152
    @EXPORT_OK = qw( MergeHolds );
153
}
153
}
154
154
155
=head2 AddReserve
155
=head2 AddReserve
(-)a/C4/SIP/Sip.pm (-1 / +1 lines)
Lines 18-24 use C4::SIP::Sip::Checksum qw(checksum); Link Here
18
18
19
use base qw(Exporter);
19
use base qw(Exporter);
20
20
21
our @EXPORT_OK = qw(y_or_n timestamp add_field maybe_add add_count
21
push @EXPORT_OK, qw(y_or_n timestamp add_field maybe_add add_count
22
    denied sipbool boolspace write_msg
22
    denied sipbool boolspace write_msg
23
    $error_detection $protocol_version $field_delimiter
23
    $error_detection $protocol_version $field_delimiter
24
    $last_response);
24
    $last_response);
(-)a/C4/SIP/Sip/Checksum.pm (-4 / +7 lines)
Lines 1-12 Link Here
1
package C4::SIP::Sip::Checksum;
1
package C4::SIP::Sip::Checksum;
2
2
3
use Exporter;
4
use strict;
3
use strict;
5
use warnings;
4
use warnings;
6
5
7
our @ISA = qw(Exporter);
6
our (@ISA, @EXPORT_OK);
8
our @EXPORT_OK = qw(checksum verify_cksum);
7
BEGIN {
9
our $debug = 0;
8
    require Exporter;
9
    @ISA = qw(Exporter);
10
    @EXPORT_OK = qw(checksum verify_cksum);
11
    our $debug = 0;
12
}
10
13
11
sub checksum {
14
sub checksum {
12
    my $pkt = shift;
15
    my $pkt = shift;
(-)a/C4/Scheduler.pm (-2 / +2 lines)
Lines 20-33 package C4::Scheduler; Link Here
20
use strict;
20
use strict;
21
#use warnings; FIXME - Bug 2505
21
#use warnings; FIXME - Bug 2505
22
22
23
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
24
use C4::Context;
23
use C4::Context;
25
use Schedule::At;
24
use Schedule::At;
26
25
26
our (@ISA, @EXPORT_OK);
27
BEGIN {
27
BEGIN {
28
	require Exporter;
28
	require Exporter;
29
	@ISA = qw(Exporter);
29
	@ISA = qw(Exporter);
30
	@EXPORT =
30
	@EXPORT_OK =
31
		qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
31
		qw(get_jobs get_at_jobs get_at_job add_at_job remove_at_job);
32
}
32
}
33
33
(-)a/C4/Search.pm (-13 / +14 lines)
Lines 17-23 package C4::Search; Link Here
17
17
18
use strict;
18
use strict;
19
#use warnings; FIXME - Bug 2505
19
#use warnings; FIXME - Bug 2505
20
require Exporter;
20
21
use C4::Context;
21
use C4::Context;
22
use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
22
use C4::Biblio;    # GetMarcFromKohaField, GetBiblioData
23
use C4::Koha;      # getFacets
23
use C4::Koha;      # getFacets
Lines 38-47 use URI::Escape; Link Here
38
use Business::ISBN;
38
use Business::ISBN;
39
use MARC::Record;
39
use MARC::Record;
40
use MARC::Field;
40
use MARC::Field;
41
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
41
use vars qw($DEBUG);
42
42
43
BEGIN {
43
BEGIN {
44
    $DEBUG = ($ENV{DEBUG}) ? 1 : 0;
44
    $DEBUG = ($ENV{DEBUG}) ? 1 : 0;
45
46
    require Exporter;
47
    @ISA    = qw(Exporter);
48
    @EXPORT_OK = qw(
49
      &FindDuplicate
50
      &SimpleSearch
51
      &searchResults
52
      &getRecords
53
      &buildQuery
54
      &GetDistinctValues
55
      &enabled_staff_search_views
56
    );
45
}
57
}
46
58
47
=head1 NAME
59
=head1 NAME
Lines 60-76 This module provides searching functions for Koha's bibliographic databases Link Here
60
72
61
=cut
73
=cut
62
74
63
@ISA    = qw(Exporter);
64
@EXPORT = qw(
65
  &FindDuplicate
66
  &SimpleSearch
67
  &searchResults
68
  &getRecords
69
  &buildQuery
70
  &GetDistinctValues
71
  &enabled_staff_search_views
72
);
73
74
# make all your functions, whether exported or not;
75
# make all your functions, whether exported or not;
75
76
76
=head2 FindDuplicate
77
=head2 FindDuplicate
(-)a/C4/Serials.pm (-3 / +2 lines)
Lines 36-43 use Koha::Serial; Link Here
36
use Koha::Subscriptions;
36
use Koha::Subscriptions;
37
use Koha::Subscription::Histories;
37
use Koha::Subscription::Histories;
38
38
39
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
40
41
# Define statuses
39
# Define statuses
42
use constant {
40
use constant {
43
    EXPECTED               => 1,
41
    EXPECTED               => 1,
Lines 60-69 use constant MISSING_STATUSES => ( Link Here
60
    MISSING_LOST
58
    MISSING_LOST
61
);
59
);
62
60
61
our (@ISA, @EXPORT_OK);
63
BEGIN {
62
BEGIN {
64
    require Exporter;
63
    require Exporter;
65
    @ISA    = qw(Exporter);
64
    @ISA    = qw(Exporter);
66
    @EXPORT = qw(
65
    @EXPORT_OK = qw(
67
      &NewSubscription    &ModSubscription    &DelSubscription
66
      &NewSubscription    &ModSubscription    &DelSubscription
68
      &GetSubscription    &CountSubscriptionFromBiblionumber      &GetSubscriptionsFromBiblionumber
67
      &GetSubscription    &CountSubscriptionFromBiblionumber      &GetSubscriptionsFromBiblionumber
69
      &SearchSubscriptions
68
      &SearchSubscriptions
(-)a/C4/ShelfBrowser.pm (-5 / +2 lines)
Lines 27-41 use C4::Context; Link Here
27
use C4::Koha;
27
use C4::Koha;
28
use Koha::Libraries;
28
use Koha::Libraries;
29
29
30
use vars qw(@ISA @EXPORT @EXPORT_OK);
30
our (@ISA, @EXPORT_OK);
31
32
BEGIN {
31
BEGIN {
33
	require Exporter;
32
	require Exporter;
34
	@ISA    = qw(Exporter);
33
	@ISA    = qw(Exporter);
35
	@EXPORT = qw(
36
	    &GetNearbyItems
37
    );
38
    @EXPORT_OK = qw(
34
    @EXPORT_OK = qw(
35
	    &GetNearbyItems
39
    );
36
    );
40
}
37
}
41
38
(-)a/C4/Tags.pm (-3 / +1 lines)
Lines 30-37 use Module::Load::Conditional qw/check_install/; Link Here
30
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
30
use constant TAG_FIELDS => qw(tag_id borrowernumber biblionumber term language date_created);
31
use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM   tags_all\n";
31
use constant TAG_SELECT => "SELECT " . join(',', TAG_FIELDS) . "\n FROM   tags_all\n";
32
32
33
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
33
our (@ISA, @EXPORT_OK);
34
35
BEGIN {
34
BEGIN {
36
	@ISA = qw(Exporter);
35
	@ISA = qw(Exporter);
37
    @EXPORT_OK = qw(
36
    @EXPORT_OK = qw(
Lines 49-55 BEGIN { Link Here
49
      &get_filters
48
      &get_filters
50
      stratify_tags
49
      stratify_tags
51
    );
50
    );
52
	# %EXPORT_TAGS = ();
53
    my $ext_dict = C4::Context->preference('TagsExternalDictionary');
51
    my $ext_dict = C4::Context->preference('TagsExternalDictionary');
54
    if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) {
52
    if ( $ext_dict && ! check_install( module => 'Lingua::Ispell' ) ) {
55
        warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed.";
53
        warn "Ignoring TagsExternalDictionary, because Lingua::Ispell is not installed.";
(-)a/C4/TmplTokenType.pm (-16 / +16 lines)
Lines 19-27 package C4::TmplTokenType; Link Here
19
19
20
use strict;
20
use strict;
21
#use warnings; FIXME - Bug 2505
21
#use warnings; FIXME - Bug 2505
22
require Exporter;
23
24
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
25
22
26
###############################################################################
23
###############################################################################
27
24
Lines 39-63 The predefined constants are Link Here
39
###############################################################################
36
###############################################################################
40
37
41
38
42
@ISA = qw(Exporter);
43
@EXPORT_OK = qw(
44
    &TEXT
45
    &TEXT_PARAMETRIZED
46
    &CDATA
47
    &TAG
48
    &DECL
49
    &PI
50
    &DIRECTIVE
51
    &COMMENT
52
    &UNKNOWN
53
);
54
55
###############################################################################
39
###############################################################################
56
40
57
use vars qw( $_text $_text_parametrized $_cdata
41
use vars qw( $_text $_text_parametrized $_cdata
58
    $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
42
    $_tag $_decl $_pi $_directive $_comment $_null $_unknown );
59
43
44
our (@ISA, @EXPORT_OK);
60
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
61
    my $new = sub {
61
    my $new = sub {
62
	my $this = 'C4::TmplTokenType';#shift;
62
	my $this = 'C4::TmplTokenType';#shift;
63
	my $class = ref($this) || $this;
63
	my $class = ref($this) || $this;
(-)a/C4/XISBN.pm (-2 / +2 lines)
Lines 31-42 use Koha::SearchEngine::Search; Link Here
31
31
32
use strict;
32
use strict;
33
#use warnings; FIXME - Bug 2505
33
#use warnings; FIXME - Bug 2505
34
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
35
34
35
our (@ISA, @EXPORT_OK);
36
BEGIN {
36
BEGIN {
37
	require Exporter;
37
	require Exporter;
38
	@ISA = qw(Exporter);
38
	@ISA = qw(Exporter);
39
	@EXPORT_OK = qw(
39
    @EXPORT_OK = qw(
40
		&get_xisbns
40
		&get_xisbns
41
        &get_biblionumber_from_isbn
41
        &get_biblionumber_from_isbn
42
	);
42
	);
(-)a/Koha/AuthUtils.pm (-3 / +6 lines)
Lines 23-32 use Encode qw( encode is_utf8 ); Link Here
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
25
26
use base 'Exporter';
27
28
our @EXPORT_OK   = qw(hash_password get_script_name);
29
26
27
our (@ISA, @EXPORT_OK);
28
BEGIN {
29
    require Exporter;
30
    @ISA = qw(Exporter);
31
    @EXPORT_OK = qw(hash_password get_script_name);
32
};
30
=head1 NAME
33
=head1 NAME
31
34
32
Koha::AuthUtils - utility routines for authentication
35
Koha::AuthUtils - utility routines for authentication
(-)a/Koha/EDI.pm (-1 / +1 lines)
Lines 38-44 use Text::Unidecode; Link Here
38
use Koha::Plugins::Handler;
38
use Koha::Plugins::Handler;
39
39
40
our $VERSION = 1.1;
40
our $VERSION = 1.1;
41
our @EXPORT_OK =
41
push @EXPORT_OK,
42
  qw( process_quote process_invoice process_ordrsp create_edi_order get_edifact_ean );
42
  qw( process_quote process_invoice process_ordrsp create_edi_order get_edifact_ean );
43
43
44
sub create_edi_order {
44
sub create_edi_order {
(-)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/Patron/Password/Recovery.pm (-3 / +2 lines)
Lines 21-32 use Modern::Perl; Link Here
21
use C4::Context;
21
use C4::Context;
22
use Crypt::Eksblowfish::Bcrypt qw(en_base64);
22
use Crypt::Eksblowfish::Bcrypt qw(en_base64);
23
23
24
use vars qw(@ISA @EXPORT);
24
our (@ISA, @EXPORT_OK);
25
26
BEGIN {
25
BEGIN {
27
    require Exporter;
26
    require Exporter;
28
    @ISA = qw(Exporter);
27
    @ISA = qw(Exporter);
29
    push @EXPORT, qw(
28
    @EXPORT_OK = qw(
30
      &ValidateBorrowernumber
29
      &ValidateBorrowernumber
31
      &SendPasswordRecoveryEmail
30
      &SendPasswordRecoveryEmail
32
      &GetValidLinkInfo
31
      &GetValidLinkInfo
(-)a/Koha/SimpleMARC.pm (-20 / +16 lines)
Lines 6-31 use Modern::Perl; Link Here
6
6
7
#use MARC::Record;
7
#use MARC::Record;
8
8
9
require Exporter;
9
our (@ISA, @EXPORT_OK);
10
10
BEGIN {
11
our @ISA = qw(Exporter);
11
    require Exporter;
12
our %EXPORT_TAGS = ( 'all' => [ qw(
12
    our @ISA = qw(Exporter);
13
13
14
) ] );
14
    @EXPORT_OK = qw(
15
15
      read_field
16
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
16
      update_field
17
17
      copy_field
18
our @EXPORT = qw(
18
      copy_and_replace_field
19
  read_field
19
      move_field
20
  update_field
20
      delete_field
21
  copy_field
21
      field_exists
22
  copy_and_replace_field
22
      field_equals
23
  move_field
23
    );
24
  delete_field
24
}
25
  field_exists
26
  field_equals
27
);
28
29
25
30
our $debug = 0;
26
our $debug = 0;
31
27
(-)a/Koha/Util/FrameworkPlugin.pm (-8 lines)
Lines 22-35 package Koha::Util::FrameworkPlugin; Link Here
22
22
23
use Modern::Perl;
23
use Modern::Perl;
24
24
25
our ( @ISA, @EXPORT, @EXPORT_OK );
26
BEGIN {
27
    require Exporter;
28
    @ISA = qw( Exporter );
29
    @EXPORT = qw( );
30
    @EXPORT_OK = qw( wrapper date_entered );
31
}
32
33
=head1 NAME
25
=head1 NAME
34
26
35
Koha::Util::FrameworkPlugin - utility class with routines for framework plugins
27
Koha::Util::FrameworkPlugin - utility class with routines for framework plugins
(-)a/acqui/pdfformat/layout2pagesde.pm (-1 lines)
Lines 22-28 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
package pdfformat::layout2pagesde;
24
package pdfformat::layout2pagesde;
25
use vars qw(@ISA @EXPORT);
26
use MIME::Base64;
25
use MIME::Base64;
27
use strict;
26
use strict;
28
use warnings;
27
use warnings;
(-)a/misc/translator/TmplTokenizer.pm (-5 lines)
Lines 8-15 use C4::TTParser; Link Here
8
use VerboseWarnings qw( pedantic_p error_normal warn_normal warn_pedantic );
8
use VerboseWarnings qw( pedantic_p error_normal warn_normal warn_pedantic );
9
require Exporter;
9
require Exporter;
10
10
11
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
12
13
###############################################################################
11
###############################################################################
14
12
15
=head1 NAME
13
=head1 NAME
Lines 25-33 A wrapper for the functionality found in TTParser to allow an easier transition Link Here
25
###############################################################################
23
###############################################################################
26
24
27
25
28
@ISA = qw(Exporter);
29
@EXPORT_OK = qw();
30
31
use vars qw( $pedantic_attribute_error_in_nonpedantic_mode_p );
26
use vars qw( $pedantic_attribute_error_in_nonpedantic_mode_p );
32
use vars qw( $pedantic_tmpl_var_use_in_nonpedantic_mode_p );
27
use vars qw( $pedantic_tmpl_var_use_in_nonpedantic_mode_p );
33
use vars qw( $pedantic_error_markup_in_pcdata_p );
28
use vars qw( $pedantic_error_markup_in_pcdata_p );
(-)a/misc/translator/VerboseWarnings.pm (-17 / +17 lines)
Lines 2-10 package VerboseWarnings; Link Here
2
2
3
use strict;
3
use strict;
4
#use warnings; FIXME - Bug 2505
4
#use warnings; FIXME - Bug 2505
5
require Exporter;
6
7
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
8
5
9
###############################################################################
6
###############################################################################
10
7
Lines 21-40 verbose warnings. Link Here
21
18
22
###############################################################################
19
###############################################################################
23
20
24
21
our (@ISA, @EXPORT_OK);
25
@ISA = qw(Exporter);
22
BEGIN {
26
@EXPORT_OK = qw(
23
    require Exporter;
27
    &pedantic_p
24
    @ISA = qw(Exporter);
28
    &warn_additional
25
    @EXPORT_OK = qw(
29
    &warn_normal
26
        &pedantic_p
30
    &warn_pedantic
27
        &warn_additional
31
    &error_additional
28
        &warn_normal
32
    &error_normal
29
        &warn_pedantic
33
);
30
        &error_additional
34
%EXPORT_TAGS = (
31
        &error_normal
35
    'warn' => [ 'warn_additional',  'warn_normal',  'warn_pedantic' ],
32
    );
36
    'die'  => [ 'error_additional', 'error_normal' ],
33
    %EXPORT_TAGS = (
37
);
34
        'warn' => [ 'warn_additional',  'warn_normal',  'warn_pedantic' ],
35
        'die'  => [ 'error_additional', 'error_normal' ],
36
    );
37
}
38
38
39
###############################################################################
39
###############################################################################
40
40
(-)a/t/db_dependent/Members/IssueSlip.t (-3 / +2 lines)
Lines 22-29 use Test::More tests => 3; Link Here
22
use Test::MockModule;
22
use Test::MockModule;
23
use t::lib::TestBuilder;
23
use t::lib::TestBuilder;
24
24
25
use C4::Biblio;
25
use C4::Biblio qw( AddBiblio );
26
use C4::Items;
26
use C4::Items qw( AddItem );
27
use C4::Members;
27
use C4::Members;
28
use C4::Circulation;
28
use C4::Circulation;
29
29
30
- 

Return to bug 17600