# -------------- httpd.conf (excerpt) ---------------------- ## -- mod_perl config ----- ## various stuff : EmbPerl, .cgimp, Apache::Registry, Apache::DBI, ## CGI.pm, Apache::ASP Include conf/includes/mod_perl.conf # -------- includes/mod_perl.conf (excerpt) ------------------ # Load other perl modules and do other perl initialization from # within perl, in startup.pl PerlRequire conf/includes/startup.pl # The Apache::Registry is the part of mod_perl that runs cgi scripts. # Putting this here is actually redundant, since I'm also loading # it in startup.pl - but I guess it doesn't hurt. PerlModule Apache::Registry # mod_perl is .cgimp extension anywhere - Jim M. SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI PerlSendHeader On AddType text/html .cgimp # ---------------------- startup.pl --------------------- #!/usr/bin/perl ####################################### # # startup.pl # # Put mod_perl initialization stuff here. # Typically used to preload modules/methods # to increase server speed. # ######################################## # Add the perl modules (handlers) directory to the @INC search path BEGIN { use Apache (); use lib Apache->server_root_relative('perl_modules'); } use CGI qw(-compile :all); # As suggested in CGI.pm documentation use Apache::Registry; # mod_perl cgi script use Apache::Constants; # definitions for handlers 1; # return a true value