----- Original Message -----
Sent: Thursday, September 14, 2006 9:58
PM
Subject: passing an argument to
startup.pl
PROBLEM:
I need to pass an argument to startup.pl, in
order to associate Apache2 with a specific
version of an app. The app version has a simple identifier, say 'dv1'.
What I'm trying to do is emulate passing an
argument on the command line, which will show up in @ARGV, like;
$ /devel/startup.pl dv1
I've tried various things, like quoting the call
to startup.pl in httpd.conf;
PerlRequire "/devel/startup.pl dv1"
which doesn't work, as PerlRequire sees dv1 as a
second argument to itself. All the methods I've looked at for setting
environment variables don't get visibility until the server is up and running,
which is fair enough.
SOLUTION:
None so far, except this workaround
# in http.conf:
# fake addition to @INC
PerlSwitches -I/devel/dv1
PerlRequire "/devel/startup.pl"
# in startup.pl
.. pull /devel/dv1 off @INC with a
grep
Any suggestions of a more worthy solution would
be appreciated.
Thanks,
Gerard
# "Be who you are and say what you feel, because
those who mind don't matter and those who matter don't mind."
# -
Dr. Seuss