/
apache2-perl-startup.pl
executable file
·59 lines (43 loc) · 1.24 KB
/
apache2-perl-startup.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/perl -w
use strict;
use warnings;
# make sure we are in a sane environment.
$ENV{MOD_PERL} =~ /mod_perl/ or die "MOD_PERL not used!";
# switch to unload_package_xs, the PP version is broken in Perl 5.10.1.
# see http://rt.perl.org/rt3//Public/Bug/Display.html?id=72866
BEGIN {
$ModPerl::Util::DEFAULT_UNLOAD_METHOD = 'unload_package_xs';
}
use ModPerl::Util;
# set otrs lib path!
use lib "/var/www/perl-services/opar/lib/";
# pull in things we will use in most requests so it is read and compiled
# exactly once
#use CGI (); CGI->compile(':all');
use CGI ();
CGI->compile(':cgi');
use CGI::Carp ();
#use Apache::DBI ();
#Apache::DBI->connect_on_init('DBI:mysql:otrs', 'otrs', 'some-pass');
use DBI ();
# enable this if you use mysql
#use DBD::mysql ();
#use Kernel::System::DB::mysql;
# enable this if you use postgresql
#use DBD::Pg ();
#use Kernel::System::DB::postgresql;
# enable this if you use oracle
#use DBD::Oracle ();
#use Kernel::System::DB::oracle;
# core modules
use Moose;
use DBIx::Class;
use OTRS::OPR::DAO::User;
use OTRS::OPR::DAO::Package;
use OTRS::OPR::DB::Schema;
use OTRS::OPR::Web::App;
use OTRS::OPR::Web::App::Prerun;
use OTRS::OPR::Web::App::Login;
use OTRS::OPR::Web::Author;
use OTRS::OPR::Web::Guest;
1;