Browse Source

Bug 28617: Remove kohalib.pl and rely on PERL5LIB

The purpose of this script was to load the relevant Koha lib for the
different scripts (installation, cronjob, CLI, etc.)
However it is not used consistently and we prefer to rely on PERL5LIB.

From bug 28617 comment 6 from Galen:
"""
Time marches on, and one of the motivations for having kohalib.pl - making
it possible to install Koha without setting a single environment variable -
has been obviated by the vast improvements in the ease of installing Koha.

Consequently, I think kohalib.pl can go away.
"""

Test plan:
confirm that the changes make sense and that kohalib.pl can be removed
safely.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
master
Jonathan Druart 6 months ago
committed by Fridolin Somers
parent
commit
238fabc4ab
  1. 1
      Makefile.PL
  2. 5
      misc/add_date_fields_to_marc_records.pl
  3. 6
      misc/batchCompareMARCvsFrameworks.pl
  4. 6
      misc/batchDeleteUnusedSubfields.pl
  5. 6
      misc/batchImportMARCWithBiblionumbers.pl
  6. 7
      misc/batchRebuildBiblioTables.pl
  7. 6
      misc/batchRepairMissingBiblionumbers.pl
  8. 6
      misc/commit_file.pl
  9. 6
      misc/cronjobs/advance_notices.pl
  10. 8
      misc/cronjobs/batch_anonymise.pl
  11. 6
      misc/cronjobs/build_browser_and_cloud.pl
  12. 7
      misc/cronjobs/cart_to_shelf.pl
  13. 7
      misc/cronjobs/cleanup_database.pl
  14. 8
      misc/cronjobs/delete_records_via_leader.pl
  15. 7
      misc/cronjobs/gather_print_notices.pl
  16. 7
      misc/cronjobs/holds/auto_unsuspend_holds.pl
  17. 6
      misc/cronjobs/holds/build_holds_queue.pl
  18. 7
      misc/cronjobs/holds/cancel_expired_holds.pl
  19. 7
      misc/cronjobs/holds/cancel_unfilled_holds.pl
  20. 8
      misc/cronjobs/holds/holds_reminder.pl
  21. 8
      misc/cronjobs/import_webservice_batch.pl
  22. 6
      misc/cronjobs/longoverdue.pl
  23. 6
      misc/cronjobs/membership_expiry.pl
  24. 8
      misc/cronjobs/overdue_notices.pl
  25. 7
      misc/cronjobs/patron_emailer.pl
  26. 6
      misc/cronjobs/process_message_queue.pl
  27. 7
      misc/cronjobs/purge_suggestions.pl
  28. 7
      misc/cronjobs/reconcile_balances.pl
  29. 7
      misc/cronjobs/runreport.pl
  30. 8
      misc/cronjobs/serialsUpdate.pl
  31. 8
      misc/cronjobs/staticfines.pl
  32. 8
      misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl
  33. 8
      misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl
  34. 7
      misc/cronjobs/update_patrons_category.pl
  35. 8
      misc/cronjobs/update_totalissues.pl
  36. 6
      misc/exportauth.pl
  37. 52
      misc/kohalib.pl
  38. 8
      misc/link_bibs_to_authorities.pl
  39. 6
      misc/load_testing/benchmark_circulation.pl
  40. 6
      misc/load_testing/benchmark_staff.pl
  41. 5
      misc/maintenance/UNIMARC_fix_collectiontitle.pl
  42. 5
      misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl
  43. 6
      misc/maintenance/borrowers-force-messaging-defaults.pl
  44. 6
      misc/maintenance/fix_accountlines_date.pl
  45. 7
      misc/maintenance/fix_accountlines_rmdupfines_bug8253.pl
  46. 7
      misc/maintenance/fix_mysql_constraints.pl
  47. 6
      misc/maintenance/touch_all_biblios.pl
  48. 6
      misc/maintenance/touch_all_items.pl
  49. 8
      misc/migration_tools/22_to_30/convert_to_utf8.pl
  50. 6
      misc/migration_tools/22_to_30/export_Authorities.pl
  51. 6
      misc/migration_tools/22_to_30/export_Authorities_xml.pl
  52. 6
      misc/migration_tools/22_to_30/missing090field.pl
  53. 6
      misc/migration_tools/22_to_30/move_marc_to_authheader.pl
  54. 6
      misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl
  55. 6
      misc/migration_tools/22_to_30/rebuild_leader.pl
  56. 6
      misc/migration_tools/22_to_30/rebuild_unimarc_100.pl
  57. 6
      misc/migration_tools/bulkmarcimport.pl
  58. 8
      misc/migration_tools/checkNonIndexedBiblios.pl
  59. 6
      misc/migration_tools/create_analytical_rel.pl
  60. 8
      misc/migration_tools/import_lexile.pl
  61. 7
      misc/migration_tools/switch_marc21_series_info.pl
  62. 6
      misc/stage_file.pl
  63. 1
      t/db_dependent/00-strict.t
  64. 5
      xt/yaml_valid.t

1
Makefile.PL

@ -693,7 +693,6 @@ $config{'BIB_RETRIEVAL_CFG'} = 'retrieval-info-bib-dom.xml';
if ($config{'INSTALL_MODE'} ne "dev") {
push @{ $pl_files->{'rewrite-config.PL'} }, (
'blib/PERL_MODULE_DIR/C4/Context.pm',
'blib/SCRIPT_NONDEV_DIR/kohalib.pl'
);
}

5
misc/add_date_fields_to_marc_records.pl

@ -17,11 +17,6 @@
use Modern::Perl;
BEGIN {
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
use Getopt::Long qw( GetOptions );

6
misc/batchCompareMARCvsFrameworks.pl

@ -4,12 +4,6 @@
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
# Koha modules used
use Koha::Script;

6
misc/batchDeleteUnusedSubfields.pl

@ -3,12 +3,6 @@
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
# Koha modules used
use Koha::Script;

6
misc/batchImportMARCWithBiblionumbers.pl

@ -3,12 +3,6 @@
# Written by TG on 10/04/2006
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
# Koha modules used

7
misc/batchRebuildBiblioTables.pl

@ -5,13 +5,6 @@
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
# Koha modules used
use Koha::Script;
use MARC::Record;

6
misc/batchRepairMissingBiblionumbers.pl

@ -4,12 +4,6 @@
# Revised by Joshua Ferraro on 03/31/2006
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
# Koha modules used
use Koha::Script;

6
misc/commit_file.pl

@ -2,12 +2,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
use Koha::Script;
use C4::Context;

6
misc/cronjobs/advance_notices.pl

@ -40,12 +40,6 @@ use strict;
use warnings;
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Context;
use C4::Letters;

8
misc/cronjobs/batch_anonymise.pl

@ -20,14 +20,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Context;
use Koha::Patrons;

6
misc/cronjobs/build_browser_and_cloud.pl

@ -3,12 +3,6 @@
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin;
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Koha;

7
misc/cronjobs/cart_to_shelf.pl

@ -32,13 +32,6 @@ use Koha::Script -cron;
use C4::Items qw( CartToShelf );
use C4::Log qw( cronlogaction );
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use C4::Context;
use Getopt::Long qw( GetOptions );

7
misc/cronjobs/cleanup_database.pl

@ -28,13 +28,6 @@ use constant DEFAULT_SEARCHHISTORY_PURGEDAYS => 30;
use constant DEFAULT_SHARE_INVITATION_EXPIRY_DAYS => 14;
use constant DEFAULT_DEBARMENTS_PURGEDAYS => 30;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Context;
use C4::Search;

8
misc/cronjobs/delete_records_via_leader.pl

@ -23,14 +23,6 @@ use Modern::Perl;
binmode( STDOUT, ":encoding(UTF-8)" );
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
use Koha::Script -cron;

7
misc/cronjobs/gather_print_notices.pl

@ -2,13 +2,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use CGI; # NOT a CGI script, this is just to keep C4::Templates::gettemplate happy
use Koha::Script -cron;
use C4::Context;

7
misc/cronjobs/holds/auto_unsuspend_holds.pl

@ -20,13 +20,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
# cancel all expired hold requests
use Koha::Script -cron;

6
misc/cronjobs/holds/build_holds_queue.pl

@ -8,12 +8,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::HoldsQueue qw(CreateQueue);

7
misc/cronjobs/holds/cancel_expired_holds.pl

@ -42,13 +42,6 @@ use Modern::Perl;
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Reserves;
use C4::Log qw( cronlogaction );

7
misc/cronjobs/holds/cancel_unfilled_holds.pl

@ -18,13 +18,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

8
misc/cronjobs/holds/holds_reminder.pl

@ -17,14 +17,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
use DateTime;

8
misc/cronjobs/import_webservice_batch.pl

@ -21,14 +21,6 @@ use strict;
use warnings;
use utf8;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Koha::Script -cron;
use C4::ImportBatch qw( BatchCommitRecords );

6
misc/cronjobs/longoverdue.pl

@ -27,12 +27,6 @@ longoverdue.pl cron script to set lost statuses on overdue materials.
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

6
misc/cronjobs/membership_expiry.pl

@ -139,12 +139,6 @@ any field from the branches table
use Modern::Perl;
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Context;

8
misc/cronjobs/overdue_notices.pl

@ -20,14 +20,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
use Text::CSV_XS;

7
misc/cronjobs/patron_emailer.pl

@ -18,13 +18,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

6
misc/cronjobs/process_message_queue.pl

@ -19,12 +19,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Letters qw( SendQueuedMessages );

7
misc/cronjobs/purge_suggestions.pl

@ -19,13 +19,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Koha::Script -cron;

7
misc/cronjobs/reconcile_balances.pl

@ -55,13 +55,6 @@ use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );
use Try::Tiny qw( catch try );
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Log qw( cronlogaction );

7
misc/cronjobs/runreport.pl

@ -38,13 +38,6 @@ use Encode qw( decode );
use JSON qw( to_json );
use Try::Tiny qw( catch try );
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
=head1 NAME
runreport.pl - Run pre-existing saved reports

8
misc/cronjobs/serialsUpdate.pl

@ -20,14 +20,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script -cron;
use C4::Context;
use C4::Serials qw( GetSubscription GetNextDate ModSerialStatus );

8
misc/cronjobs/staticfines.pl

@ -27,14 +27,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
use Date::Calc qw( Date_to_Days );
use Koha::Script -cron;

8
misc/cronjobs/thirdparty/TalkingTech_itiva_inbound.pl

@ -20,14 +20,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

8
misc/cronjobs/thirdparty/TalkingTech_itiva_outbound.pl

@ -20,14 +20,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

7
misc/cronjobs/update_patrons_category.pl

@ -17,13 +17,6 @@
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use C4::Context;
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

8
misc/cronjobs/update_totalissues.pl

@ -20,14 +20,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

6
misc/exportauth.pl

@ -5,12 +5,6 @@
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
use Koha::Script;
use C4::Context;

52
misc/kohalib.pl

@ -1,52 +0,0 @@
#!/usr/bin/perl
# Copyright (C) 2007 LibLime
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
# This script is used by command-line utilities to set
# @INC properly -- specifically, to point to the directory
# containing the installed version of the C4 modules.
#
# This depends on the installer replacing the \_\_PERL_MODULE_DIR\_\_
# string with the path to the Koha modules directory. This is done
# only during a 'standard' or 'single' mode installation. If Koha
# is being run from a git checkout (and thus installed in 'dev' mode),
# this is a no-op.
#
# To use this script, a command-line utility should do the following before
# 'use'ing any C4 modules.
#
# BEGIN {
# use FindBin;
# eval { require "$FindBin::Bin/kohalib.pl" };
# # adjust path to point to kohalib.pl relative
# # to location of script
# }
#
use strict;
#use warnings; FIXME - Bug 2505
my $module_dir;
BEGIN {
$module_dir = '__PERL_MODULE_DIR__';
die if $module_dir =~ /^[_]{2}PERL_MODULE_DIR[_]{2}$/;
}
use lib $module_dir;
1;

8
misc/link_bibs_to_authorities.pl

@ -3,14 +3,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
use Koha::Script;
use C4::Context;
use C4::Biblio qw(

6
misc/load_testing/benchmark_circulation.pl

@ -4,12 +4,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
use HTTPD::Bench::ApacheBench;
use LWP::UserAgent;

6
misc/load_testing/benchmark_staff.pl

@ -4,12 +4,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
use Getopt::Long qw( GetOptions );
use HTTPD::Bench::ApacheBench;

5
misc/maintenance/UNIMARC_fix_collectiontitle.pl

@ -7,11 +7,6 @@
use strict;
use warnings;
BEGIN {
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
sub process {

5
misc/maintenance/UNIMARC_sync_date_created_with_marc_biblio.pl

@ -7,11 +7,6 @@
use strict;
use warnings;
BEGIN {
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
use C4::Biblio qw( GetMarcBiblio ModBiblio );
use Getopt::Long qw( GetOptions );

6
misc/maintenance/borrowers-force-messaging-defaults.pl

@ -19,12 +19,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
use C4::Context;

6
misc/maintenance/fix_accountlines_date.pl

@ -19,12 +19,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
use C4::Context;

7
misc/maintenance/fix_accountlines_rmdupfines_bug8253.pl

@ -20,13 +20,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
use C4::Context;

7
misc/maintenance/fix_mysql_constraints.pl

@ -18,13 +18,6 @@
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
my $lib = "$FindBin::Bin/../kohalib.pl";
eval { require $lib };
}
use Getopt::Long qw( GetOptions );
use Pod::Usage qw( pod2usage );

6
misc/maintenance/touch_all_biblios.pl

@ -19,12 +19,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
# possible modules to use
use Getopt::Long qw( GetOptions );

6
misc/maintenance/touch_all_items.pl

@ -19,12 +19,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
# possible modules to use
use Getopt::Long qw( GetOptions );

8
misc/migration_tools/22_to_30/convert_to_utf8.pl

@ -5,14 +5,6 @@
use strict;
use warnings;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
use C4::Context;
my $dbh = C4::Context->dbh();
my $sth = $dbh->prepare("Show tables");

6
misc/migration_tools/22_to_30/export_Authorities.pl

@ -1,11 +1,5 @@
#!/usr/bin/perl
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
use C4::Context;
#use MARC::File::XML(BinaryEncoding=>"utf8");
#use MARC::File::USMARC;

6
misc/migration_tools/22_to_30/export_Authorities_xml.pl

@ -1,11 +1,5 @@
#!/usr/bin/perl
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
use C4::Context;
use MARC::File::XML(BinaryEncoding=>"utf8");
use C4::AuthoritiesMarc;

6
misc/migration_tools/22_to_30/missing090field.pl

@ -4,12 +4,6 @@
# Revised by Joshua Ferraro on 03/31/2006
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
# Koha modules used

6
misc/migration_tools/22_to_30/move_marc_to_authheader.pl

@ -4,12 +4,6 @@
# scraped from updatedatabase for dev week by chris@katipo.co.nz
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
use C4::Context;
use C4::AuthoritiesMarc;
use MARC::Record;

6
misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl

@ -2,12 +2,6 @@
use Modern::Perl;
# script to shift marc to biblioitems
# scraped from updatedatabase for dev week by chris@katipo.co.nz
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
use C4::Context;
use MARC::Record;
use MARC::File::XML ( BinaryEncoding => 'utf8' );

6
misc/migration_tools/22_to_30/rebuild_leader.pl

@ -4,12 +4,6 @@
# Revised by Joshua Ferraro on 03/31/2006
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
# Koha modules used

6
misc/migration_tools/22_to_30/rebuild_unimarc_100.pl

@ -4,12 +4,6 @@
# Revised by Joshua Ferraro on 03/31/2006
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../../kohalib.pl" };
}
# Koha modules used

6
misc/migration_tools/bulkmarcimport.pl

@ -3,12 +3,6 @@
use Modern::Perl;
#use diagnostics;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
# Koha modules used
use MARC::File::USMARC;

8
misc/migration_tools/checkNonIndexedBiblios.pl

@ -23,14 +23,6 @@
use strict;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
# Koha modules used
use Koha::Script;
use C4::Context;

6
misc/migration_tools/create_analytical_rel.pl

@ -2,12 +2,6 @@
use strict;
#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
use C4::Context;

8
misc/migration_tools/import_lexile.pl

@ -41,14 +41,6 @@ use Koha::Database;
binmode STDOUT, ':encoding(UTF-8)';
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
my $help;
my $confirm;
my $test;

7
misc/migration_tools/switch_marc21_series_info.pl

@ -22,13 +22,6 @@ use warnings;
# Script to switch the MARC21 440$anv and 490$av information
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/../kohalib.pl" };
}
use Koha::Script;
use C4::Biblio qw( GetFrameworkCode GetMarcBiblio ModBiblioMarc );
use C4::Context;

6
misc/stage_file.pl

@ -20,12 +20,6 @@
# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
use FindBin ();
eval { require "$FindBin::Bin/kohalib.pl" };
}
use Koha::Script;
use C4::Context;

1
t/db_dependent/00-strict.t

@ -35,7 +35,6 @@ my @dirs = (
);
$Test::Strict::TEST_STRICT = 0;
$Test::Strict::TEST_SKIP = [ 'misc/kohalib.pl' ];
my $ncpu;
if ( $ENV{KOHA_PROVE_CPUS} ) {

5
xt/yaml_valid.t

@ -23,11 +23,6 @@ use File::Find;
use Test::More;
BEGIN {
use FindBin;
eval { require "$FindBin::Bin/../misc/kohalib.pl" };
}
my $filebase = "$FindBin::Bin/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences";
my @files;

Loading…
Cancel
Save