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

(-)a/Makefile.PL (-1 lines)
Lines 693-699 $config{'BIB_RETRIEVAL_CFG'} = 'retrieval-info-bib-dom.xml'; Link Here
693
if ($config{'INSTALL_MODE'} ne "dev") {
693
if ($config{'INSTALL_MODE'} ne "dev") {
694
    push @{ $pl_files->{'rewrite-config.PL'} }, (
694
    push @{ $pl_files->{'rewrite-config.PL'} }, (
695
        'blib/PERL_MODULE_DIR/C4/Context.pm',
695
        'blib/PERL_MODULE_DIR/C4/Context.pm',
696
        'blib/SCRIPT_NONDEV_DIR/kohalib.pl'
697
    );
696
    );
698
}
697
}
699
698
(-)a/misc/add_date_fields_to_marc_records.pl (-5 lines)
Lines 17-27 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
BEGIN {
21
    use FindBin ();
22
    eval { require "$FindBin::Bin/../kohalib.pl" };
23
}
24
25
use Koha::Script;
20
use Koha::Script;
26
21
27
use Getopt::Long qw( GetOptions );
22
use Getopt::Long qw( GetOptions );
(-)a/misc/batchCompareMARCvsFrameworks.pl (-6 lines)
Lines 4-15 Link Here
4
4
5
use strict;
5
use strict;
6
#use warnings; FIXME - Bug 2505
6
#use warnings; FIXME - Bug 2505
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
13
7
14
# Koha modules used
8
# Koha modules used
15
use Koha::Script;
9
use Koha::Script;
(-)a/misc/batchDeleteUnusedSubfields.pl (-6 lines)
Lines 3-14 Link Here
3
3
4
use strict;
4
use strict;
5
#use warnings; FIXME - Bug 2505
5
#use warnings; FIXME - Bug 2505
6
BEGIN {
7
    # find Koha's Perl modules
8
    # test carefully before changing this
9
    use FindBin ();
10
    eval { require "$FindBin::Bin/kohalib.pl" };
11
}
12
6
13
# Koha modules used
7
# Koha modules used
14
use Koha::Script;
8
use Koha::Script;
(-)a/misc/batchImportMARCWithBiblionumbers.pl (-6 lines)
Lines 3-14 Link Here
3
# Written by TG on 10/04/2006
3
# Written by TG on 10/04/2006
4
use strict;
4
use strict;
5
#use warnings; FIXME - Bug 2505
5
#use warnings; FIXME - Bug 2505
6
BEGIN {
7
    # find Koha's Perl modules
8
    # test carefully before changing this
9
    use FindBin ();
10
    eval { require "$FindBin::Bin/kohalib.pl" };
11
}
12
6
13
# Koha modules used
7
# Koha modules used
14
8
(-)a/misc/batchRebuildBiblioTables.pl (-7 lines)
Lines 5-17 Link Here
5
use strict;
5
use strict;
6
#use warnings; FIXME - Bug 2505
6
#use warnings; FIXME - Bug 2505
7
7
8
BEGIN {
9
    # find Koha's Perl modules
10
    # test carefully before changing this
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/kohalib.pl" };
13
}
14
15
# Koha modules used
8
# Koha modules used
16
use Koha::Script;
9
use Koha::Script;
17
use MARC::Record;
10
use MARC::Record;
(-)a/misc/batchRepairMissingBiblionumbers.pl (-6 lines)
Lines 4-15 Link Here
4
#  Revised by Joshua Ferraro on 03/31/2006
4
#  Revised by Joshua Ferraro on 03/31/2006
5
use strict;
5
use strict;
6
use warnings;
6
use warnings;
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
13
7
14
# Koha modules used
8
# Koha modules used
15
use Koha::Script;
9
use Koha::Script;
(-)a/misc/commit_file.pl (-6 lines)
Lines 2-13 Link Here
2
2
3
use strict;
3
use strict;
4
use warnings;
4
use warnings;
5
BEGIN {
6
    # find Koha's Perl modules
7
    # test carefully before changing this
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/kohalib.pl" };
10
}
11
5
12
use Koha::Script;
6
use Koha::Script;
13
use C4::Context;
7
use C4::Context;
(-)a/misc/cronjobs/advance_notices.pl (-6 lines)
Lines 40-51 use strict; Link Here
40
use warnings;
40
use warnings;
41
use Getopt::Long qw( GetOptions );
41
use Getopt::Long qw( GetOptions );
42
use Pod::Usage qw( pod2usage );
42
use Pod::Usage qw( pod2usage );
43
BEGIN {
44
    # find Koha's Perl modules
45
    # test carefully before changing this
46
    use FindBin ();
47
    eval { require "$FindBin::Bin/../kohalib.pl" };
48
}
49
use Koha::Script -cron;
43
use Koha::Script -cron;
50
use C4::Context;
44
use C4::Context;
51
use C4::Letters;
45
use C4::Letters;
(-)a/misc/cronjobs/batch_anonymise.pl (-8 lines)
Lines 20-33 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
BEGIN {
24
25
    # find Koha's Perl modules
26
    # test carefully before changing this
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
30
31
use Koha::Script -cron;
23
use Koha::Script -cron;
32
use C4::Context;
24
use C4::Context;
33
use Koha::Patrons;
25
use Koha::Patrons;
(-)a/misc/cronjobs/build_browser_and_cloud.pl (-6 lines)
Lines 3-14 Link Here
3
3
4
use strict;
4
use strict;
5
#use warnings; FIXME - Bug 2505
5
#use warnings; FIXME - Bug 2505
6
BEGIN {
7
    # find Koha's Perl modules
8
    # test carefully before changing this
9
    use FindBin;
10
    eval { require "$FindBin::Bin/../kohalib.pl" };
11
}
12
6
13
use Koha::Script -cron;
7
use Koha::Script -cron;
14
use C4::Koha;
8
use C4::Koha;
(-)a/misc/cronjobs/cart_to_shelf.pl (-7 lines)
Lines 32-44 use Koha::Script -cron; Link Here
32
use C4::Items qw( CartToShelf );
32
use C4::Items qw( CartToShelf );
33
use C4::Log qw( cronlogaction );
33
use C4::Log qw( cronlogaction );
34
34
35
BEGIN {
36
37
    # find Koha's Perl modules
38
    # test carefully before changing this
39
    use FindBin ();
40
    eval { require "$FindBin::Bin/../kohalib.pl" };
41
}
42
use C4::Context;
35
use C4::Context;
43
use Getopt::Long qw( GetOptions );
36
use Getopt::Long qw( GetOptions );
44
37
(-)a/misc/cronjobs/cleanup_database.pl (-7 lines)
Lines 28-40 use constant DEFAULT_SEARCHHISTORY_PURGEDAYS => 30; Link Here
28
use constant DEFAULT_SHARE_INVITATION_EXPIRY_DAYS => 14;
28
use constant DEFAULT_SHARE_INVITATION_EXPIRY_DAYS => 14;
29
use constant DEFAULT_DEBARMENTS_PURGEDAYS         => 30;
29
use constant DEFAULT_DEBARMENTS_PURGEDAYS         => 30;
30
30
31
BEGIN {
32
    # find Koha's Perl modules
33
    # test carefully before changing this
34
    use FindBin ();
35
    eval { require "$FindBin::Bin/../kohalib.pl" };
36
}
37
38
use Koha::Script -cron;
31
use Koha::Script -cron;
39
use C4::Context;
32
use C4::Context;
40
use C4::Search;
33
use C4::Search;
(-)a/misc/cronjobs/delete_records_via_leader.pl (-8 lines)
Lines 23-36 use Modern::Perl; Link Here
23
23
24
binmode( STDOUT, ":encoding(UTF-8)" );
24
binmode( STDOUT, ":encoding(UTF-8)" );
25
25
26
BEGIN {
27
28
    # find Koha's Perl modules
29
    # test carefully before changing this
30
    use FindBin ();
31
    eval { require "$FindBin::Bin/../kohalib.pl" };
32
}
33
34
use Getopt::Long qw( GetOptions );
26
use Getopt::Long qw( GetOptions );
35
use Pod::Usage qw( pod2usage );
27
use Pod::Usage qw( pod2usage );
36
use Koha::Script -cron;
28
use Koha::Script -cron;
(-)a/misc/cronjobs/gather_print_notices.pl (-7 lines)
Lines 2-14 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
BEGIN {
6
    # find Koha's Perl modules
7
    # test carefully before changing this
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
10
}
11
12
use CGI; # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
5
use CGI; # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
13
use Koha::Script -cron;
6
use Koha::Script -cron;
14
use C4::Context;
7
use C4::Context;
(-)a/misc/cronjobs/holds/auto_unsuspend_holds.pl (-7 lines)
Lines 20-32 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
BEGIN {
24
    # find Koha's Perl modules
25
    # test carefully before changing this
26
    use FindBin ();
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
}
29
30
# cancel all expired hold requests
23
# cancel all expired hold requests
31
24
32
use Koha::Script -cron;
25
use Koha::Script -cron;
(-)a/misc/cronjobs/holds/build_holds_queue.pl (-6 lines)
Lines 8-19 Link Here
8
8
9
use strict;
9
use strict;
10
use warnings;
10
use warnings;
11
BEGIN {
12
    # find Koha's Perl modules
13
    # test carefully before changing this
14
    use FindBin ();
15
    eval { require "$FindBin::Bin/../kohalib.pl" };
16
}
17
11
18
use Koha::Script -cron;
12
use Koha::Script -cron;
19
use C4::HoldsQueue qw(CreateQueue);
13
use C4::HoldsQueue qw(CreateQueue);
(-)a/misc/cronjobs/holds/cancel_expired_holds.pl (-7 lines)
Lines 42-54 use Modern::Perl; Link Here
42
use Getopt::Long qw( GetOptions );
42
use Getopt::Long qw( GetOptions );
43
use Pod::Usage qw( pod2usage );
43
use Pod::Usage qw( pod2usage );
44
44
45
BEGIN {
46
    # find Koha's Perl modules
47
    # test carefully before changing this
48
    use FindBin ();
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
50
}
51
52
use Koha::Script -cron;
45
use Koha::Script -cron;
53
use C4::Reserves;
46
use C4::Reserves;
54
use C4::Log qw( cronlogaction );
47
use C4::Log qw( cronlogaction );
(-)a/misc/cronjobs/holds/cancel_unfilled_holds.pl (-7 lines)
Lines 18-30 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
BEGIN {
22
    # find Koha's Perl modules
23
    # test carefully before changing this
24
    use FindBin ();
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
27
28
use Getopt::Long qw( GetOptions );
21
use Getopt::Long qw( GetOptions );
29
use Pod::Usage qw( pod2usage );
22
use Pod::Usage qw( pod2usage );
30
23
(-)a/misc/cronjobs/holds/holds_reminder.pl (-8 lines)
Lines 17-30 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
BEGIN {
21
22
    # find Koha's Perl modules
23
    # test carefully before changing this
24
    use FindBin ();
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
27
28
use Getopt::Long qw( GetOptions );
20
use Getopt::Long qw( GetOptions );
29
use Pod::Usage qw( pod2usage );
21
use Pod::Usage qw( pod2usage );
30
use DateTime;
22
use DateTime;
(-)a/misc/cronjobs/import_webservice_batch.pl (-8 lines)
Lines 21-34 use strict; Link Here
21
use warnings;
21
use warnings;
22
use utf8;
22
use utf8;
23
23
24
BEGIN {
25
26
    # find Koha's Perl modules
27
    # test carefully before changing this
28
    use FindBin ();
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
31
32
use Getopt::Long qw( GetOptions );
24
use Getopt::Long qw( GetOptions );
33
use Koha::Script -cron;
25
use Koha::Script -cron;
34
use C4::ImportBatch qw( BatchCommitRecords );
26
use C4::ImportBatch qw( BatchCommitRecords );
(-)a/misc/cronjobs/longoverdue.pl (-6 lines)
Lines 27-38 longoverdue.pl cron script to set lost statuses on overdue materials. Link Here
27
27
28
use strict;
28
use strict;
29
use warnings;
29
use warnings;
30
BEGIN {
31
    # find Koha's Perl modules
32
    # test carefully before changing this
33
    use FindBin ();
34
    eval { require "$FindBin::Bin/../kohalib.pl" };
35
}
36
30
37
use Getopt::Long qw( GetOptions );
31
use Getopt::Long qw( GetOptions );
38
use Pod::Usage qw( pod2usage );
32
use Pod::Usage qw( pod2usage );
(-)a/misc/cronjobs/membership_expiry.pl (-6 lines)
Lines 118-129 any field from the branches table Link Here
118
use Modern::Perl;
118
use Modern::Perl;
119
use Getopt::Long qw( GetOptions );
119
use Getopt::Long qw( GetOptions );
120
use Pod::Usage qw( pod2usage );
120
use Pod::Usage qw( pod2usage );
121
BEGIN {
122
    # find Koha's Perl modules
123
    # test carefully before changing this
124
    use FindBin ();
125
    eval { require "$FindBin::Bin/../kohalib.pl" };
126
}
127
121
128
use Koha::Script -cron;
122
use Koha::Script -cron;
129
use C4::Context;
123
use C4::Context;
(-)a/misc/cronjobs/overdue_notices.pl (-8 lines)
Lines 20-33 Link Here
20
20
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
BEGIN {
24
25
    # find Koha's Perl modules
26
    # test carefully before changing this
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
30
31
use Getopt::Long qw( GetOptions );
23
use Getopt::Long qw( GetOptions );
32
use Pod::Usage qw( pod2usage );
24
use Pod::Usage qw( pod2usage );
33
use Text::CSV_XS;
25
use Text::CSV_XS;
(-)a/misc/cronjobs/patron_emailer.pl (-7 lines)
Lines 18-30 Link Here
18
18
19
use Modern::Perl;
19
use Modern::Perl;
20
20
21
BEGIN {
22
    # find Koha's Perl modules
23
    # test carefully before changing this
24
    use FindBin ();
25
    eval { require "$FindBin::Bin/../kohalib.pl" };
26
}
27
28
use Koha::Script -cron;
21
use Koha::Script -cron;
29
use Getopt::Long qw( GetOptions );
22
use Getopt::Long qw( GetOptions );
30
use Pod::Usage qw( pod2usage );
23
use Pod::Usage qw( pod2usage );
(-)a/misc/cronjobs/process_message_queue.pl (-6 lines)
Lines 19-30 Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
BEGIN {
23
    # find Koha's Perl modules
24
    # test carefully before changing this
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
28
22
29
use Koha::Script -cron;
23
use Koha::Script -cron;
30
use C4::Letters qw( SendQueuedMessages );
24
use C4::Letters qw( SendQueuedMessages );
(-)a/misc/cronjobs/purge_suggestions.pl (-7 lines)
Lines 19-31 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
BEGIN {
23
    # find Koha's Perl modules
24
    # test carefully before changing this
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
28
29
use Getopt::Long qw( GetOptions );
22
use Getopt::Long qw( GetOptions );
30
23
31
use Koha::Script -cron;
24
use Koha::Script -cron;
(-)a/misc/cronjobs/reconcile_balances.pl (-7 lines)
Lines 55-67 use Getopt::Long qw( GetOptions ); Link Here
55
use Pod::Usage qw( pod2usage );
55
use Pod::Usage qw( pod2usage );
56
use Try::Tiny qw( catch try );
56
use Try::Tiny qw( catch try );
57
57
58
BEGIN {
59
    # find Koha's Perl modules
60
    # test carefully before changing this
61
    use FindBin ();
62
    eval { require "$FindBin::Bin/../kohalib.pl" };
63
}
64
65
use Koha::Script -cron;
58
use Koha::Script -cron;
66
use C4::Log qw( cronlogaction );
59
use C4::Log qw( cronlogaction );
67
60
(-)a/misc/cronjobs/runreport.pl (-7 lines)
Lines 38-50 use Encode qw( decode ); Link Here
38
use JSON qw( to_json );
38
use JSON qw( to_json );
39
use Try::Tiny qw( catch try );
39
use Try::Tiny qw( catch try );
40
40
41
BEGIN {
42
    # find Koha's Perl modules
43
    # test carefully before changing this
44
    use FindBin ();
45
    eval { require "$FindBin::Bin/../kohalib.pl" };
46
}
47
48
=head1 NAME
41
=head1 NAME
49
42
50
runreport.pl - Run pre-existing saved reports
43
runreport.pl - Run pre-existing saved reports
(-)a/misc/cronjobs/serialsUpdate.pl (-8 lines)
Lines 20-33 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
BEGIN {
24
25
    # find Koha's Perl modules
26
    # test carefully before changing this
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
30
31
use Koha::Script -cron;
23
use Koha::Script -cron;
32
use C4::Context;
24
use C4::Context;
33
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
25
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );
(-)a/misc/cronjobs/staticfines.pl (-8 lines)
Lines 27-40 Link Here
27
27
28
use Modern::Perl;
28
use Modern::Perl;
29
29
30
BEGIN {
31
32
    # find Koha's Perl modules
33
    # test carefully before changing this
34
    use FindBin ();
35
    eval { require "$FindBin::Bin/kohalib.pl" };
36
}
37
38
use Date::Calc qw( Date_to_Days );
30
use Date::Calc qw( Date_to_Days );
39
31
40
use Koha::Script -cron;
32
use Koha::Script -cron;
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl (-8 lines)
Lines 20-33 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
BEGIN {
24
25
    # find Koha's Perl modules
26
    # test carefully before changing this
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
30
31
use Getopt::Long qw( GetOptions );
23
use Getopt::Long qw( GetOptions );
32
use Pod::Usage qw( pod2usage );
24
use Pod::Usage qw( pod2usage );
33
25
(-)a/misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl (-8 lines)
Lines 20-33 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
BEGIN {
24
25
    # find Koha's Perl modules
26
    # test carefully before changing this
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
30
31
use Getopt::Long qw( GetOptions );
23
use Getopt::Long qw( GetOptions );
32
use Pod::Usage qw( pod2usage );
24
use Pod::Usage qw( pod2usage );
33
25
(-)a/misc/cronjobs/update_patrons_category.pl (-7 lines)
Lines 17-29 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
BEGIN {
21
    # find Koha's Perl modules
22
    # test carefully before changing this
23
    use FindBin ();
24
    eval { require "$FindBin::Bin/../kohalib.pl" };
25
}
26
27
use C4::Context;
20
use C4::Context;
28
use Getopt::Long qw( GetOptions );
21
use Getopt::Long qw( GetOptions );
29
use Pod::Usage qw( pod2usage );
22
use Pod::Usage qw( pod2usage );
(-)a/misc/cronjobs/update_totalissues.pl (-8 lines)
Lines 20-33 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
BEGIN {
24
25
    # find Koha's Perl modules
26
    # test carefully before changing this
27
    use FindBin ();
28
    eval { require "$FindBin::Bin/../kohalib.pl" };
29
}
30
31
use Getopt::Long qw( GetOptions );
23
use Getopt::Long qw( GetOptions );
32
use Pod::Usage qw( pod2usage );
24
use Pod::Usage qw( pod2usage );
33
25
(-)a/misc/exportauth.pl (-6 lines)
Lines 5-16 Link Here
5
5
6
use strict;
6
use strict;
7
#use warnings; FIXME - Bug 2505
7
#use warnings; FIXME - Bug 2505
8
BEGIN {
9
    # find Koha's Perl modules
10
    # test carefully before changing this
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/kohalib.pl" };
13
}
14
8
15
use Koha::Script;
9
use Koha::Script;
16
use C4::Context;
10
use C4::Context;
(-)a/misc/kohalib.pl (-52 lines)
Lines 1-52 Link Here
1
#!/usr/bin/perl
2
3
# Copyright (C) 2007 LibLime
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
# This script is used by command-line utilities to set
21
# @INC properly -- specifically, to point to the directory
22
# containing the installed version of the C4 modules.
23
#
24
# This depends on the installer replacing the \_\_PERL_MODULE_DIR\_\_
25
# string with the path to the Koha modules directory.  This is done
26
# only during a 'standard' or 'single' mode installation.  If Koha
27
# is being run from a git checkout (and thus installed in 'dev' mode),
28
# this is a no-op.
29
#
30
# To use this script, a command-line utility should do the following before
31
# 'use'ing any C4 modules.
32
#
33
#     BEGIN {
34
#         use FindBin;
35
#         eval { require "$FindBin::Bin/kohalib.pl" };
36
#         # adjust path to point to kohalib.pl relative
37
#         # to location of script
38
#     }
39
#
40
41
use strict;
42
#use warnings; FIXME - Bug 2505
43
44
my $module_dir;
45
BEGIN {
46
    $module_dir = '__PERL_MODULE_DIR__';
47
    die if $module_dir =~ /^[_]{2}PERL_MODULE_DIR[_]{2}$/;
48
}
49
50
use lib $module_dir;
51
52
1;
(-)a/misc/link_bibs_to_authorities.pl (-8 lines)
Lines 3-16 Link Here
3
use strict;
3
use strict;
4
use warnings;
4
use warnings;
5
5
6
BEGIN {
7
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
13
14
use Koha::Script;
6
use Koha::Script;
15
use C4::Context;
7
use C4::Context;
16
use C4::Biblio qw(
8
use C4::Biblio qw(
(-)a/misc/load_testing/benchmark_circulation.pl (-6 lines)
Lines 4-15 Link Here
4
4
5
use strict;
5
use strict;
6
use warnings;
6
use warnings;
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
13
7
14
use HTTPD::Bench::ApacheBench;
8
use HTTPD::Bench::ApacheBench;
15
use LWP::UserAgent;
9
use LWP::UserAgent;
(-)a/misc/load_testing/benchmark_staff.pl (-6 lines)
Lines 4-15 Link Here
4
4
5
use strict;
5
use strict;
6
use warnings;
6
use warnings;
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/kohalib.pl" };
12
}
13
7
14
use Getopt::Long qw( GetOptions );
8
use Getopt::Long qw( GetOptions );
15
use HTTPD::Bench::ApacheBench;
9
use HTTPD::Bench::ApacheBench;
(-)a/misc/maintenance/UNIMARC_fix_collectiontitle.pl (-5 lines)
Lines 7-17 Link Here
7
use strict;
7
use strict;
8
use warnings;
8
use warnings;
9
9
10
BEGIN {
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
13
}
14
15
use Koha::Script;
10
use Koha::Script;
16
11
17
sub process {
12
sub process {
(-)a/misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl (-5 lines)
Lines 7-17 Link Here
7
use strict;
7
use strict;
8
use warnings;
8
use warnings;
9
9
10
BEGIN {
11
    use FindBin ();
12
    eval { require "$FindBin::Bin/../kohalib.pl" };
13
}
14
15
use Koha::Script;
10
use Koha::Script;
16
use C4::Biblio qw( GetMarcBiblio ModBiblio );
11
use C4::Biblio qw( GetMarcBiblio ModBiblio );
17
use Getopt::Long qw( GetOptions );
12
use Getopt::Long qw( GetOptions );
(-)a/misc/maintenance/borrowers-force-messaging-defaults.pl (-6 lines)
Lines 19-30 Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
BEGIN {
23
    # find Koha's Perl modules
24
    # test carefully before changing this
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
28
22
29
use Koha::Script;
23
use Koha::Script;
30
use C4::Context;
24
use C4::Context;
(-)a/misc/maintenance/fix_accountlines_date.pl (-6 lines)
Lines 19-30 Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
BEGIN {
23
    # find Koha's Perl modules
24
    # test carefully before changing this
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
28
22
29
use Koha::Script;
23
use Koha::Script;
30
use C4::Context;
24
use C4::Context;
(-)a/misc/maintenance/fix_accountlines_rmdupfines_bug8253.pl (-7 lines)
Lines 20-32 Link Here
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
22
23
BEGIN {
24
    # find Koha's Perl modules
25
    # test carefully before changing this
26
    use FindBin ();
27
    eval { require "$FindBin::Bin/../kohalib.pl" };
28
}
29
30
use Koha::Script;
23
use Koha::Script;
31
use C4::Context;
24
use C4::Context;
32
25
(-)a/misc/maintenance/fix_mysql_constraints.pl (-7 lines)
Lines 18-30 Link Here
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
BEGIN {
22
    # find Koha's Perl modules
23
    # test carefully before changing this
24
    use FindBin ();
25
    my $lib = "$FindBin::Bin/../kohalib.pl";
26
    eval { require $lib };
27
}
28
21
29
use Getopt::Long qw( GetOptions );
22
use Getopt::Long qw( GetOptions );
30
use Pod::Usage qw( pod2usage );
23
use Pod::Usage qw( pod2usage );
(-)a/misc/maintenance/touch_all_biblios.pl (-6 lines)
Lines 19-30 Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
BEGIN {
23
    # find Koha's Perl modules
24
    # test carefully before changing this
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
28
22
29
# possible modules to use
23
# possible modules to use
30
use Getopt::Long qw( GetOptions );
24
use Getopt::Long qw( GetOptions );
(-)a/misc/maintenance/touch_all_items.pl (-6 lines)
Lines 19-30 Link Here
19
19
20
use strict;
20
use strict;
21
use warnings;
21
use warnings;
22
BEGIN {
23
    # find Koha's Perl modules
24
    # test carefully before changing this
25
    use FindBin ();
26
    eval { require "$FindBin::Bin/../kohalib.pl" };
27
}
28
22
29
# possible modules to use
23
# possible modules to use
30
use Getopt::Long qw( GetOptions );
24
use Getopt::Long qw( GetOptions );
(-)a/misc/migration_tools/22_to_30/convert_to_utf8.pl (-8 lines)
Lines 5-18 Link Here
5
use strict;
5
use strict;
6
use warnings;
6
use warnings;
7
7
8
BEGIN {
9
10
    # find Koha's Perl modules
11
    # test carefully before changing this
12
    use FindBin ();
13
    eval { require "$FindBin::Bin/../../kohalib.pl" };
14
}
15
16
use C4::Context;
8
use C4::Context;
17
my $dbh = C4::Context->dbh();
9
my $dbh = C4::Context->dbh();
18
my $sth = $dbh->prepare("Show tables");
10
my $sth = $dbh->prepare("Show tables");
(-)a/misc/migration_tools/22_to_30/export_Authorities.pl (-6 lines)
Lines 1-11 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
use Modern::Perl;
2
use Modern::Perl;
3
BEGIN {
4
    # find Koha's Perl modules
5
    # test carefully before changing this
6
    use FindBin ();
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
8
}
9
use C4::Context;
3
use C4::Context;
10
#use MARC::File::XML(BinaryEncoding=>"utf8");
4
#use MARC::File::XML(BinaryEncoding=>"utf8");
11
#use MARC::File::USMARC;
5
#use MARC::File::USMARC;
(-)a/misc/migration_tools/22_to_30/export_Authorities_xml.pl (-6 lines)
Lines 1-11 Link Here
1
#!/usr/bin/perl
1
#!/usr/bin/perl
2
use Modern::Perl;
2
use Modern::Perl;
3
BEGIN {
4
    # find Koha's Perl modules
5
    # test carefully before changing this
6
    use FindBin ();
7
    eval { require "$FindBin::Bin/../../kohalib.pl" };
8
}
9
use C4::Context;
3
use C4::Context;
10
use MARC::File::XML(BinaryEncoding=>"utf8");
4
use MARC::File::XML(BinaryEncoding=>"utf8");
11
use C4::AuthoritiesMarc;
5
use C4::AuthoritiesMarc;
(-)a/misc/migration_tools/22_to_30/missing090field.pl (-6 lines)
Lines 4-15 Link Here
4
#  Revised by Joshua Ferraro on 03/31/2006
4
#  Revised by Joshua Ferraro on 03/31/2006
5
use strict;
5
use strict;
6
#use warnings; FIXME - Bug 2505
6
#use warnings; FIXME - Bug 2505
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
13
7
14
# Koha modules used
8
# Koha modules used
15
9
(-)a/misc/migration_tools/22_to_30/move_marc_to_authheader.pl (-6 lines)
Lines 4-15 Link Here
4
# scraped from updatedatabase for dev week by chris@katipo.co.nz
4
# scraped from updatedatabase for dev week by chris@katipo.co.nz
5
use strict;
5
use strict;
6
#use warnings; FIXME - Bug 2505
6
#use warnings; FIXME - Bug 2505
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
13
use C4::Context;
7
use C4::Context;
14
use C4::AuthoritiesMarc;
8
use C4::AuthoritiesMarc;
15
use MARC::Record;
9
use MARC::Record;
(-)a/misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl (-6 lines)
Lines 2-13 Link Here
2
use Modern::Perl;
2
use Modern::Perl;
3
# script to shift marc to biblioitems
3
# script to shift marc to biblioitems
4
# scraped from updatedatabase for dev week by chris@katipo.co.nz
4
# scraped from updatedatabase for dev week by chris@katipo.co.nz
5
BEGIN {
6
    # find Koha's Perl modules
7
    # test carefully before changing this
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/../../kohalib.pl" };
10
}
11
use C4::Context;
5
use C4::Context;
12
use MARC::Record;
6
use MARC::Record;
13
use MARC::File::XML ( BinaryEncoding => 'utf8' );
7
use MARC::File::XML ( BinaryEncoding => 'utf8' );
(-)a/misc/migration_tools/22_to_30/rebuild_leader.pl (-6 lines)
Lines 4-15 Link Here
4
#  Revised by Joshua Ferraro on 03/31/2006
4
#  Revised by Joshua Ferraro on 03/31/2006
5
use strict;
5
use strict;
6
#use warnings; FIXME - Bug 2505
6
#use warnings; FIXME - Bug 2505
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
13
7
14
# Koha modules used
8
# Koha modules used
15
9
(-)a/misc/migration_tools/22_to_30/rebuild_unimarc_100.pl (-6 lines)
Lines 4-15 Link Here
4
#  Revised by Joshua Ferraro on 03/31/2006
4
#  Revised by Joshua Ferraro on 03/31/2006
5
use strict;
5
use strict;
6
#use warnings; FIXME - Bug 2505
6
#use warnings; FIXME - Bug 2505
7
BEGIN {
8
    # find Koha's Perl modules
9
    # test carefully before changing this
10
    use FindBin ();
11
    eval { require "$FindBin::Bin/../../kohalib.pl" };
12
}
13
7
14
# Koha modules used
8
# Koha modules used
15
9
(-)a/misc/migration_tools/bulkmarcimport.pl (-6 lines)
Lines 3-14 Link Here
3
3
4
use Modern::Perl;
4
use Modern::Perl;
5
#use diagnostics;
5
#use diagnostics;
6
BEGIN {
7
    # find Koha's Perl modules
8
    # test carefully before changing this
9
    use FindBin ();
10
    eval { require "$FindBin::Bin/../kohalib.pl" };
11
}
12
6
13
# Koha modules used
7
# Koha modules used
14
use MARC::File::USMARC;
8
use MARC::File::USMARC;
(-)a/misc/migration_tools/checkNonIndexedBiblios.pl (-8 lines)
Lines 23-36 Link Here
23
23
24
use strict;
24
use strict;
25
25
26
BEGIN {
27
28
    # find Koha's Perl modules
29
    # test carefully before changing this
30
    use FindBin ();
31
    eval { require "$FindBin::Bin/kohalib.pl" };
32
}
33
34
# Koha modules used
26
# Koha modules used
35
use Koha::Script;
27
use Koha::Script;
36
use C4::Context;
28
use C4::Context;
(-)a/misc/migration_tools/create_analytical_rel.pl (-6 lines)
Lines 2-13 Link Here
2
2
3
use strict;
3
use strict;
4
#use warnings; FIXME - Bug 2505
4
#use warnings; FIXME - Bug 2505
5
BEGIN {
6
    # find Koha's Perl modules
7
    # test carefully before changing this
8
    use FindBin ();
9
    eval { require "$FindBin::Bin/../kohalib.pl" };
10
}
11
5
12
use Koha::Script;
6
use Koha::Script;
13
use C4::Context;
7
use C4::Context;
(-)a/misc/migration_tools/import_lexile.pl (-8 lines)
Lines 41-54 use Koha::Database; Link Here
41
41
42
binmode STDOUT, ':encoding(UTF-8)';
42
binmode STDOUT, ':encoding(UTF-8)';
43
43
44
BEGIN {
45
46
    # find Koha's Perl modules
47
    # test carefully before changing this
48
    use FindBin ();
49
    eval { require "$FindBin::Bin/../kohalib.pl" };
50
}
51
52
my $help;
44
my $help;
53
my $confirm;
45
my $confirm;
54
my $test;
46
my $test;
(-)a/misc/migration_tools/switch_marc21_series_info.pl (-7 lines)
Lines 22-34 use warnings; Link Here
22
22
23
# Script to switch the MARC21 440$anv and 490$av information
23
# Script to switch the MARC21 440$anv and 490$av information
24
24
25
BEGIN {
26
    # find Koha's Perl modules
27
    # test carefully before changing this
28
    use FindBin ();
29
    eval { require "$FindBin::Bin/../kohalib.pl" };
30
}
31
32
use Koha::Script;
25
use Koha::Script;
33
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblioMarc );
26
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblioMarc );
34
use C4::Context;
27
use C4::Context;
(-)a/misc/stage_file.pl (-6 lines)
Lines 20-31 Link Here
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
20
# along with Koha; if not, see <http://www.gnu.org/licenses>.
21
21
22
use Modern::Perl;
22
use Modern::Perl;
23
BEGIN {
24
    # find Koha's Perl modules
25
    # test carefully before changing this
26
    use FindBin ();
27
    eval { require "$FindBin::Bin/kohalib.pl" };
28
}
29
23
30
use Koha::Script;
24
use Koha::Script;
31
use C4::Context;
25
use C4::Context;
(-)a/t/db_dependent/00-strict.t (-1 lines)
Lines 35-41 my @dirs = ( Link Here
35
);
35
);
36
36
37
$Test::Strict::TEST_STRICT = 0;
37
$Test::Strict::TEST_STRICT = 0;
38
$Test::Strict::TEST_SKIP = [ 'misc/kohalib.pl' ];
39
38
40
my $ncpu;
39
my $ncpu;
41
if ( $ENV{KOHA_PROVE_CPUS} ) {
40
if ( $ENV{KOHA_PROVE_CPUS} ) {
(-)a/xt/yaml_valid.t (-6 lines)
Lines 23-33 use File::Find; Link Here
23
23
24
use Test::More;
24
use Test::More;
25
25
26
BEGIN {
27
    use FindBin;
28
    eval { require "$FindBin::Bin/../misc/kohalib.pl" };
29
}
30
31
my $filebase = "$FindBin::Bin/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences";
26
my $filebase = "$FindBin::Bin/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences";
32
27
33
my @files;
28
my @files;
34
- 

Return to bug 28617