Hi, this is my first posting here.
I have a mod_perl application called WeBiText, which needs to push a number of
directories on the Perl include path. At the moment, I do this by including the
following in my httpd.conf file:
PerlSwitches -IC:/Users/Desiletsa/Documents/eclipse_workspace/WeBiText
PerlSwitches
-IC:/Users/Desiletsa/Documents/eclipse_workspace/WeBiText/GUI
PerlSwitches
-IC:/Users/Desiletsa/Documents/eclipse_workspace/WeBiText/bin
PerlSwitches
-IC:/Users/Desiletsa/Documents/eclipse_workspace/IIPerlUtils/TestingAndDebugging
PerlSwitches
-IC:/Users/Desiletsa/Documents/eclipse_workspace/IIPerlUtils
PerlSwitches
-IC:/Users/Desiletsa/Documents/eclipse_workspace/PerlCorpusMiner
This is not great, because it hardcodes the pathes into the httpd.conf, which
means that they possibly have to be changed everytime I install the app on a
different machine.
I would much prefer to write something like this:
PerlSwitches -I$ENV{WEBITEXT_HOME}/WeBiText
PerlSwitches -I$ENV{WEBITEXT_HOME}/WeBiText/GUI
PerlSwitches -I$ENV{WEBITEXT_HOME}/WeBiText/bin
PerlSwitches -I$ENV{WEBITEXT_HOME}/IIPerlUtils/TestingAndDebugging
PerlSwitches -I$ENV{WEBITEXT_HOME}/IIPerlUtils
PerlSwitches -I$ENV{WEBITEXT_HOME}/PerlCorpusMiner
where WEBITEXT_HOME is an OS environment variable which already needs to be set
for other reasons. Alternatively, I would be OK with using $WEBITEXT_HOME
instead of $ENV{WEBITEXT_HOME}, where $WEBITEXT_HOME would be a variable whose
value is passed to httpd using a command line option.
Is this possible? I looked around on the web and it seems that OS environment
variables can only be accessed inside <Perl> sections. And unfortunately, I
can't use <Perl> sections for that specific purpose, because those sections can
only appear after you have loaded mod_perl, and by then it's already too late
to modify the Perl include path.
Any help would be appreciated.
Thx.
Alain
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]