add memcached questions to koha-install-log
[koha.git] / misc / kohalib.pl
blobc6f2710e85385786c55d23838c0f907568551624
1 #!/usr/bin/perl
3 # Copyright (C) 2007 LibLime
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
10 # version.
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
18 # Suite 330, Boston, MA 02111-1307 USA
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.
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.
30 # To use this script, a command-line utility should do the following before
31 # 'use'ing any C4 modules.
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 # }
41 use strict;
43 my $module_dir;
44 BEGIN {
45 $module_dir = '__PERL_MODULE_DIR__';
46 die if $module_dir =~ /^[_]{2}PERL_MODULE_DIR[_]{2}$/;
49 use lib $module_dir;