You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Doug MacEachern <do...@covalent.net> on 2001/06/14 07:18:59 UTC
Re: %ENV via PerlTransHandler
On Wed, 21 Mar 2001, Paul Evad wrote:
> question: how does one access the environment variables when using
> mod_perl as a transhandler?
>
> I notice that
>
> $r->subprocess_env->do(sub {
> my($key, $value) = @_;
> $r->warn("$key => $value\n");
> 1;
> });
>
> gives two different sets of results when used via a transhandler or via
>
> PerlTransHandler Apache::Kudos::Test # yields near to nothing in subprocess_env
%ENV is normally not setup until later on, you can make it happen sooner
by calling subprocess_env in a void context:
$r->subprocess_env;