Now, I've looked into using PerlSetVar, PerlSetEnv and PerlPassEnv. The problem is, these directives only seem to work when called through Apache via a browser. But when Apache is initially loading, Apache does not seem to pass any of this information to modules as it is loading them.
Use PerlSetVar the usual way:
PerlSetVar foo bar
Then in your startup.pl file, access them like this:
my $config = Apache->server->dir_config('foo');
On a side note, it's best if possible to stay away from PerlSetEnv/PerlPassEnv, because setting up the environment at request time is costly. If you don't use the %ENV at all in your modules then you can save some cycles by configuring PerlSetupEnv Off.
Just to add some spice to the this problem, I definitely would like to keep the solution to this within the httpd.conf file.
Check out Perl Sections: you can directly set yourp ackage variables from httpd.conf:
<Perl>
$My::Config::foo = 'bar';
</Perl>
|