perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boysenberry Payne <boysenbe...@habitatlife.com>
Subject Caveats to using Perl Sections for server configuration?
Date Wed, 13 Jan 2010 20:22:29 GMT
I'm using <Perl> blocks in my apache conf files for early server configuration.
I remember reading someone on this list saying they wouldn't use Perl Sections at all.
The main reason I chose to use them to initialize some of my server configuration was to allow
for relative addressing to the .conf file rather than the apache root via the __FILE__ variable.
That allows me to load my perl startup.pl files on different servers regardless of where they're
stored by keeping them arranged relative to the .conf file loading them.

Up to now I've kept what I've done in the Perl Sections limited to manipulating @INC and @PerlConfig.
I tried using a couple of perl modules that used 'our' type scopes and they all bombed out
saying Perl Sections couldn't add the variable, e.g. it chokes on File::chdir's $CWD variable.
It does seem to use packages correctly, that in turn become available afterword in the symbol
tables.

So while the documentation for the Perl Sections was adequate enough to get what I needed
accomplished, it's left me hungry for more info on what's going on behind the scenes.

Before I go and dig around in the source (which I plan on doing,) I was wondering if anyone
mind sharing the experience and insights on Perl Sections, pros cons, etc.

i.e. I'm referring to <Perl></Perl> blocks in apache .conf files.

Thank you,
Boysenberry Payne


Mime
View raw message