ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/DBS/Servers/CGIServer/modpreload
Revision: 1.1
Committed: Tue Mar 7 16:23:23 2006 UTC (19 years, 2 months ago) by lat
Branch: MAIN
CVS Tags: vs20060620, DBS_0_0_1, pre_DBS_0_0_1, post_dict_type_checking_merge, post_MiniPythonAPI_merged_to_trunk, pre_MiniPythonAPI_merge_to_trunk, DBS_0_0_0, vs20060320
Log Message:
Adapt dbsxml to run under mod_perl on cmsdoc.cern.ch.
Add modpreload for modules that need to be preloaded.

File Contents

# User Rev Content
1 lat 1.1 #!/usr/bin/env perl
2    
3     # Setup environment for dbsxml at Apache server startup with mod_perl.
4    
5     # use Apache2 (); # <-- only for mod_perl 1.99!
6     # use ModPerl::MethodLookup ();
7     # ModPerl::MethodLookup::preload_all_modules ();
8     use ModPerl::Util ();
9     use Apache2::RequestRec ();
10     use Apache2::RequestIO ();
11     use Apache2::RequestUtil ();
12     use Apache2::ServerRec ();
13     use Apache2::ServerUtil ();
14     use Apache2::Connection ();
15     use Apache2::Log ();
16     use APR::Table ();
17     use ModPerl::Registry ();
18     use Apache2::Const -compile => ':common';
19     use APR::Const -compile => ':common';
20    
21     BEGIN {
22     use strict; use warnings; $^W=1; use Config;
23     if ($Config{archname} =~ /solaris/) {
24     unshift (@INC, "/afs/cern.ch/cms/aprom/DBS/ToolsForCMSDOC/perl-modules/lib");
25     unshift (@INC, "/afs/cern.ch/cms/aprom/DBS/ToolsForCMSDOC/perl-modules/lib/$Config{archname}");
26     } else {
27     unshift (@INC, "/afs/cern.ch/cms/aprom/phedex/Tools/perl-modules/lib");
28     unshift (@INC, "/afs/cern.ch/cms/aprom/phedex/Tools/perl-modules/lib/$Config{archname}");
29     }
30     unshift (@INC, "/afs/cern.ch/cms/aprom/phedex/PHEDEX/Toolkit/Common");
31     }
32    
33     use CGI ();
34     CGI->compile(':all');
35     use Apache::DBI ();
36     use DBD::Oracle ();
37    
38     1;