You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gedanken <ge...@io.com> on 2000/12/01 21:46:14 UTC

Easy way to access PerlSetEnv from outside apache cycle?

Hi all.

I will try to be as clear as i can with a potentially vague problem.

I am just starting to maintain and implement some mod_perl code written by
a long gone coder.  The mod perl code itself seems to be working just
fine.  But a command line script was written to also utilize a database
module core to the mod_perl code.  Inside this db module is one subroutine
called 'handler' (of course).  So in his command line script we see
something like:


use DBModule;

DBModule::handler();


and the syntax of all that seems to be correct.  The problem arises in the
fact that handler() fills in some fairly essential blanks in the DB
connect with variables set in a mod_perl conf file using PerlSetEnv's.  So
when run from the command line, those variables are undefined.  I dont see
an easy way to tell this script how to access that environmentspace, nor
an easy way to stick the script into the modperl env as it takes a command
line parameter which will require human intervention.

Is there any easy way to let this command line script patch into the
variablespace created by the PerlSetEnv's?  Did the original designer see
something over my head or was he/she on mod_crack?

-- 
gedanken