perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Vanasco <jvana...@2xlp.com>
Subject Re: ENV
Date Mon, 30 Apr 2007 19:18:04 GMT

On Apr 30, 2007, at 2:22 PM, Frank Wiles wrote:

>    I haven't tired this, but don't see why it wouldn't work.  Can't
>    you just do:
>
>    $ENV{'foo'} = 'bar';
>
>    in your startup.pl?


That works, but thats not what i want.

I want to stuff shell env variables into the perl env hash...

I want something like this:

shell
	$ export is_local='1'
	$ export mp_lan_ip='192.168.1.100'

startup.pl
	$ENV{'mp_lan_ip'}= $SHELL_ENV{'mp_lan_ip'};

PerlPassEnv can do that, but only in httpd.conf

I want to be able to access the shell env in startup.pl though .

$ENV in mod_perl isn't $ENV like a regular perl script.
in a regular perl script, $ENV will have all the shell vars

under mp2, only path is exported into ENV -- and you can define other  
shell variables you want available to perl at startup.



Mime
View raw message