|
|
|
Who is this for? Introduction What you need to know Handlers In mod_perl, these programs are called handlers and are written in Perl. When using handlers, you will normally use Perl modules. To improve efficiency, these modules can be pre-loaded when Apache starts. You can do this in two ways:
Pre-Loading Modules using PerlModule PerlModule Apache::DBI This tells Apache to pre-load the Apache::DBI module. Pre-Loading Modules using a Start up Script PerlRequire "/usr/local/apache2/conf/startup.pl" This tells Apache to execute the Perl script at /usr/local/apache2/conf/startup.pl. Your script can then contain use statements to pre-load the modules. You can also add paths for your Perl modules. use Apache::DBI; use lib qw(/usr/local/apache2/lib/perl/Concept); With these two statements, you pre-load the Apache::DBI module and also tell Perl that you have some modules at /usr/local/apache2/lib/perl/Concept. The reason why you need to tell Perl where your other modules are, is that your mod_perl handlers are defined as Perl modules. I prefer to keep my modules from the standard Perl modules separate so I define a different directory for my modules. In this case, since these modules are used within Apache, I define these in the Apache directory. Where to find more information Go To Page: 1
The copyright of the article mod_perl Handlers: Pre-Loading Modules in Perl is owned by . Permission to republish mod_perl Handlers: Pre-Loading Modules in print or online must be granted by the author in writing.
|
|
|
|
|
|
|
|