in reply to mod_perl application structure
What you're describing sounds a bit odd. The modules generally do stay memory resident. What you can do is load all of the modules when Apache starts with a startup script. First, you add something similar to the following to you httpd.conf.
PerlTaintCheck On PerlRequire /usr/local/apache/perllib/startup.pl <Directory /usr/local/apache/htdocs/mod_perl> SetHandler perl-script PerlHandler Apache::Registry PerlSendHeader On AllowOverride None Options +ExecCGI </Directory>
Then, a typical startup.pl script:
#!/usr/bin/perl -w use strict; use lib '/usr/local/apache/perllib'; use Apache::Registry; use CGI; CGI->compile(':all'); use CGI::Carp ''; use DBI; use DBD::Pg; 1;
You'd want to customize the startup script to suit your needs, but that will preload your modules for you when Apache starts. If that's your bottleneck, it's gone away.
use DBI;Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|