On Wed, Jun 12, 2002 at 02:33:43PM -0700, Scott Chapman wrote:
> I have a constant.epl file that defines some variables as part of $req:
> 
> [-
>     $req = shift;
>     $req->{website_database} = 'DBI:Sprite:/www/db/Annual_Review';
>     $req->{website_event_table} = 'ar_events';
>     $req->{website_sequence} = 'ar_num';
>     $req->{db_user} = 'username';
>     $req->{db_pass} = 'password';
> -]
> 
> I need to get at those definitions in a perl script outside the www 
> environment and I'm not sure how to do it.  Is there a easy way to do this?

Completely outside the www environment?  You mean under a different
perl process?  

The only thing that knows what these variables are, is the perl
interpreter running under your web environment (be it CGI or mod_perl).
mod_perl might be able to communicate between scripts via globals, but
they have to both be under the www environment.  A child process could
get the information via environment variables, if Embperl exported them,
but again -- this only works for a child process.

There needs to be some method of communication between the processes.  
If you don't want Embperl to do anything different, you might have your 
perl script parse the 'constant.epl' file.  (what I mean by different,
is for embperl to establish some method of IPC -- one of the simplest of
which are files.)  

As for a direct means to access these variables in memory (assuming they
are different perl interpreters) -- I am pretty sure thats not a 
possibility, at least not for a reasonably sane solution.   

Does this answer your question?  

Cameron

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to