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 28-40 use C4::Members::Messaging; Link Here
28
use Carp;
28
use Carp;
29
use CGI;
29
use CGI;
30
30
31
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug);
31
use vars qw($debug);
32
32
our (@ISA, @EXPORT_OK);
33
BEGIN {
33
BEGIN {
34
    require Exporter;
34
    require Exporter;
35
    $debug   = $ENV{DEBUG};
35
    $debug   = $ENV{DEBUG};
36
    @ISA     = qw(Exporter);
36
    @ISA     = qw(Exporter);
37
    @EXPORT =
37
    @EXPORT_OK =
38
      qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
38
      qw(shib_ok logout_shib login_shib_url checkpw_shib get_login_shib);
39
}
39
}
40
40
(-)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 47-55 use Koha::Holds; Link Here
47
use Koha::SearchEngine;
48
use Koha::SearchEngine;
48
use Koha::Libraries;
49
use Koha::Libraries;
49
50
50
use vars qw(@ISA @EXPORT);
51
use vars qw($debug $cgi_debug);
51
use vars qw($debug $cgi_debug);
52
52
our (@ISA, @EXPORT_OK);
53
BEGIN {
53
BEGIN {
54
54
55
    require Exporter;
55
    require Exporter;
Lines 57-68 BEGIN { Link Here
57
57
58
    # to add biblios
58
    # to add biblios
59
    # EXPORTED FUNCTIONS.
59
    # EXPORTED FUNCTIONS.
60
    push @EXPORT, qw(
60
    @EXPORT_OK = qw(
61
      &AddBiblio
61
      AddBiblio
62
    );
63
64
    # to get something
65
    push @EXPORT, qw(
66
      GetBiblio
62
      GetBiblio
67
      GetBiblioData
63
      GetBiblioData
68
      GetMarcBiblio
64
      GetMarcBiblio
Lines 104-141 BEGIN { Link Here
104
      &CountItemsIssued
100
      &CountItemsIssued
105
      &CountBiblioInOrders
101
      &CountBiblioInOrders
106
      &GetSubscriptionsId
102
      &GetSubscriptionsId
107
    );
108
103
109
    # To modify something
110
    push @EXPORT, qw(
111
      &ModBiblio
104
      &ModBiblio
112
      &ModZebra
105
      &ModZebra
113
      &UpdateTotalIssues
106
      &UpdateTotalIssues
114
      &RemoveAllNsb
107
      &RemoveAllNsb
115
    );
116
108
117
    # To delete something
118
    push @EXPORT, qw(
119
      &DelBiblio
109
      &DelBiblio
120
    );
121
110
122
    # To link headings in a bib record
123
    # to authority records.
124
    push @EXPORT, qw(
125
      &BiblioAutoLink
111
      &BiblioAutoLink
126
      &LinkBibHeadingsToAuthorities
112
      &LinkBibHeadingsToAuthorities
127
    );
128
113
129
    # Internal functions
130
    # those functions are exported but should not be used
131
    # they are useful in a few circumstances, so they are exported,
132
    # but don't use them unless you are a core developer ;-)
133
    push @EXPORT, qw(
134
      &ModBiblioMarc
114
      &ModBiblioMarc
135
    );
136
115
137
    # Others functions
138
    push @EXPORT, qw(
139
      &TransformMarcToKoha
116
      &TransformMarcToKoha
140
      &TransformHtmlToMarc
117
      &TransformHtmlToMarc
141
      &TransformHtmlToXml
118
      &TransformHtmlToXml
Lines 2254-2260 sub PrepHostMarcField { Link Here
2254
    my ($hostbiblionumber,$hostitemnumber, $marcflavour) = @_;
2231
    my ($hostbiblionumber,$hostitemnumber, $marcflavour) = @_;
2255
    $marcflavour ||="MARC21";
2232
    $marcflavour ||="MARC21";
2256
    
2233
    
2257
    require C4::Items;
2258
    my $hostrecord = GetMarcBiblio($hostbiblionumber);
2234
    my $hostrecord = GetMarcBiblio($hostbiblionumber);
2259
	my $item = C4::Items::GetItem($hostitemnumber);
2235
	my $item = C4::Items::GetItem($hostitemnumber);
2260
	
2236
	
(-)a/C4/Bookseller.pm (-6 lines)
Lines 21-32 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
our @EXPORT_OK = qw(
27
  GetBooksellersWithLateOrders
28
);
29
30
=head1 NAME
24
=head1 NAME
31
25
32
C4::Bookseller - Koha functions for dealing with booksellers.
26
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 (-54 / +41 lines)
Lines 65-125 use Date::Calc qw( Link Here
65
  Day_of_Week
65
  Day_of_Week
66
  Add_Delta_Days
66
  Add_Delta_Days
67
);
67
);
68
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
68
our (@ISA, @EXPORT_OK);
69
70
BEGIN {
69
BEGIN {
71
	require Exporter;
70
    require Exporter;
72
	@ISA    = qw(Exporter);
71
    @ISA = qw(Exporter);
73
72
74
	# FIXME subs that should probably be elsewhere
73
    # FIXME subs that should probably be elsewhere
75
	push @EXPORT, qw(
74
    push @EXPORT_OK, qw(
76
		&barcodedecode
75
      &barcodedecode
77
        &LostItem
76
      &LostItem
78
        &ReturnLostItem
77
      &ReturnLostItem
79
        &GetPendingOnSiteCheckouts
78
      &GetPendingOnSiteCheckouts
80
	);
79
81
80
      &CanBookBeIssued
82
	# subs to deal with issuing a book
81
      &CanBookBeRenewed
83
	push @EXPORT, qw(
82
      &AddIssue
84
		&CanBookBeIssued
83
      &AddRenewal
85
		&CanBookBeRenewed
84
      &GetRenewCount
86
		&AddIssue
85
      &GetSoonestRenewDate
87
		&AddRenewal
86
      &GetLatestAutoRenewDate
88
		&GetRenewCount
87
      &GetItemIssue
89
        &GetSoonestRenewDate
88
      &GetIssuingCharges
90
        &GetLatestAutoRenewDate
89
      &GetBranchBorrowerCircRule
91
		&GetItemIssue
90
      &GetBranchItemRule
92
		&GetIssuingCharges
91
      &GetBiblioIssues
93
        &GetBranchBorrowerCircRule
92
      &GetOpenIssue
94
        &GetBranchItemRule
93
      &CheckIfIssuedToPatron
95
		&GetBiblioIssues
94
      &IsItemIssued
96
		&GetOpenIssue
95
      GetTopIssues
97
        &CheckIfIssuedToPatron
96
98
        &IsItemIssued
97
      &AddReturn
99
        GetTopIssues
98
      &MarkIssueReturned
100
	);
99
101
100
      &transferbook
102
	# subs to deal with returns
101
      &GetTransfers
103
	push @EXPORT, qw(
102
      &GetTransfersFromTo
104
		&AddReturn
103
      &updateWrongTransfer
105
        &MarkIssueReturned
104
      &DeleteTransfer
106
	);
105
      &IsBranchTransferAllowed
107
106
      &CreateBranchTransferLimit
108
	# subs to deal with transfers
107
      &DeleteBranchTransferLimits
109
	push @EXPORT, qw(
108
      &TransferSlip
110
		&transferbook
109
111
		&GetTransfers
112
		&GetTransfersFromTo
113
		&updateWrongTransfer
114
		&DeleteTransfer
115
                &IsBranchTransferAllowed
116
                &CreateBranchTransferLimit
117
                &DeleteBranchTransferLimits
118
        &TransferSlip
119
	);
120
121
    # subs to deal with offline circulation
122
    push @EXPORT, qw(
123
      &GetOfflineOperations
110
      &GetOfflineOperations
124
      &GetOfflineOperation
111
      &GetOfflineOperation
125
      &AddOfflineOperation
112
      &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 46-52 use Koha::SearchEngine; Link Here
46
use Koha::SearchEngine::Search;
46
use Koha::SearchEngine::Search;
47
use Koha::Libraries;
47
use Koha::Libraries;
48
48
49
use vars qw(@ISA @EXPORT);
49
our (@ISA, @EXPORT_OK);
50
50
51
BEGIN {
51
BEGIN {
52
52
Lines 54-60 BEGIN { Link Here
54
    @ISA = qw( Exporter );
54
    @ISA = qw( Exporter );
55
55
56
    # function exports
56
    # function exports
57
    @EXPORT = qw(
57
    @EXPORT_OK = qw(
58
        GetItem
58
        GetItem
59
        AddItemFromMarc
59
        AddItemFromMarc
60
        AddItem
60
        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
        &getitemtypeinfo
43
        &getitemtypeinfo
45
        &GetItemTypesCategorized
44
        &GetItemTypesCategorized
Lines 63-72 BEGIN { Link Here
63
        &GetVariationsOfISSNs
62
        &GetVariationsOfISSNs
64
        &NormalizeISSN
63
        &NormalizeISSN
65
64
66
		$DEBUG
65
        GetDailyQuote
66
67
	);
67
	);
68
	$DEBUG = 0;
69
@EXPORT_OK = qw( GetDailyQuote );
70
}
68
}
71
69
72
=head1 NAME
70
=head1 NAME
Lines 295-301 sub getImageSets { Link Here
295
    my @imagesets = (); # list of hasrefs of image set data to pass to template
293
    my @imagesets = (); # list of hasrefs of image set data to pass to template
296
    my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
294
    my @subdirectories = _getSubdirectoryNames( $paths->{'staff'}{'filesystem'} );
297
    foreach my $imagesubdir ( @subdirectories ) {
295
    foreach my $imagesubdir ( @subdirectories ) {
298
    warn $imagesubdir if $DEBUG;
299
        my @imagelist     = (); # hashrefs of image info
296
        my @imagelist     = (); # hashrefs of image info
300
        my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
297
        my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) );
301
        my $imagesetactive = 0;
298
        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
        &GetMember
62
        &GetMember
64
63
65
        &GetPendingIssues
64
        &GetPendingIssues
Lines 77-99 BEGIN { Link Here
77
        GetBorrowersWithEmail
76
        GetBorrowersWithEmail
78
77
79
        GetOverduesForPatron
78
        GetOverduesForPatron
80
    );
81
79
82
    #Modify data
83
    push @EXPORT, qw(
84
        &ModMember
80
        &ModMember
85
        &changepassword
81
        &changepassword
86
    );
87
82
88
    #Insert data
89
    push @EXPORT, qw(
90
        &AddMember
83
        &AddMember
91
    &AddMember_Auto
84
    &AddMember_Auto
92
        &AddMember_Opac
85
        &AddMember_Opac
93
    );
94
86
95
    #Check data
96
    push @EXPORT, qw(
97
        &checkuniquemember
87
        &checkuniquemember
98
        &checkuserpassword
88
        &checkuserpassword
99
        &Check_Userid
89
        &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 146-153 BEGIN { Link Here
146
        IsItemOnHoldAndFound
145
        IsItemOnHoldAndFound
147
146
148
        GetMaxPatronHoldsForRecord
147
        GetMaxPatronHoldsForRecord
148
149
        MergeHolds
149
    );
150
    );
150
    @EXPORT_OK = qw( MergeHolds );
151
}
151
}
152
152
153
=head2 AddReserve
153
=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 39-48 use URI::Escape; Link Here
39
use Business::ISBN;
39
use Business::ISBN;
40
use MARC::Record;
40
use MARC::Record;
41
use MARC::Field;
41
use MARC::Field;
42
use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
42
use vars qw($DEBUG);
43
43
44
BEGIN {
44
BEGIN {
45
    $DEBUG = ($ENV{DEBUG}) ? 1 : 0;
45
    $DEBUG = ($ENV{DEBUG}) ? 1 : 0;
46
47
    require Exporter;
48
    @ISA    = qw(Exporter);
49
    @EXPORT_OK = qw(
50
      &FindDuplicate
51
      &SimpleSearch
52
      &searchResults
53
      &getRecords
54
      &buildQuery
55
      &GetDistinctValues
56
      &enabled_staff_search_views
57
    );
46
}
58
}
47
59
48
=head1 NAME
60
=head1 NAME
Lines 61-77 This module provides searching functions for Koha's bibliographic databases Link Here
61
73
62
=cut
74
=cut
63
75
64
@ISA    = qw(Exporter);
65
@EXPORT = qw(
66
  &FindDuplicate
67
  &SimpleSearch
68
  &searchResults
69
  &getRecords
70
  &buildQuery
71
  &GetDistinctValues
72
  &enabled_staff_search_views
73
);
74
75
# make all your functions, whether exported or not;
76
# make all your functions, whether exported or not;
76
77
77
=head2 FindDuplicate
78
=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 39-45 use Koha::Plugins::Handler; Link Here
39
use Koha::Acquisition::Booksellers;
39
use Koha::Acquisition::Booksellers;
40
40
41
our $VERSION = 1.1;
41
our $VERSION = 1.1;
42
our @EXPORT_OK =
42
push @EXPORT_OK,
43
  qw( process_quote process_invoice process_ordrsp create_edi_order get_edifact_ean );
43
  qw( process_quote process_invoice process_ordrsp create_edi_order get_edifact_ean );
44
44
45
sub create_edi_order {
45
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 22-33 use C4::Context; Link Here
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
24
25
use vars qw(@ISA @EXPORT);
25
our (@ISA, @EXPORT_OK);
26
27
BEGIN {
26
BEGIN {
28
    require Exporter;
27
    require Exporter;
29
    @ISA = qw(Exporter);
28
    @ISA = qw(Exporter);
30
    push @EXPORT, qw(
29
    @EXPORT_OK = qw(
31
      &ValidateBorrowernumber
30
      &ValidateBorrowernumber
32
      &SendPasswordRecoveryEmail
31
      &SendPasswordRecoveryEmail
33
      &GetValidLinkInfo
32
      &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