in reply to importing functions with "PerlModule" Apache directive
I am not able to find out if there is a way to pass to PerlModule directive the functions and/or parameters
PerlModule site:perl.apache.org -> http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlModule_
is equivalent to Perl's:PerlModule Foo::BarPerlModule is used to load modules using their package names.require Foo::Bar;See also: PerlRequire.
http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlRequire_
PerlRequire does the same thing as PerlPostConfigRequire, but you have almost no control of when this code is going to be executed. Therefore you should be using either PerlConfigRequire (executes immediately) or PerlPostConfigRequire (executes just before the end of the server startup) instead. Most of the time you want to use the latter.
http://perl.apache.org/docs/2.0/user/config/config.html#C_PerlPostConfigRequire_
is equivalent to Perl's:PerlPostConfigRequire /home/httpd/perl/lib/startup.plrequire "/home/httpd/perl/lib/startup.pl";
Looking at my current apache2/mod_perl2 config, I see I'm using
just as http://perl.apache.org/docs/1.0/guide/config.html#PerlModule_and_PerlRequire_Directives recommends. This is not ideal for apache2 as http://perl.apache.org/docs/2.0/user/handlers/server.html#When_Does_perl_Start_To_Run explains.PerlRequire "...startup.pl"
Use PerlRequire "...startup.pl" for Apache1/mod_perl-1
Use PerlPostConfigRequire "...startup.pl" for Apache2/mod_perl-2
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: importing functions with "PerlModule" Apache directive
by acanfora (Novice) on May 09, 2012 at 11:34 UTC | |
by Anonymous Monk on May 09, 2012 at 12:56 UTC | |
by acanfora (Novice) on May 09, 2012 at 13:11 UTC | |
by tobyink (Canon) on May 09, 2012 at 14:03 UTC | |
by Anonymous Monk on May 09, 2012 at 14:06 UTC | |
by acanfora (Novice) on May 09, 2012 at 14:44 UTC | |
by Anonymous Monk on May 09, 2012 at 13:17 UTC | |
by acanfora (Novice) on May 09, 2012 at 13:38 UTC | |
|
In Section
Seekers of Perl Wisdom