Bill Catlan wrote:
> Stas Bekman wrote:
>
>
>>This explains why by default %ENV is set for each request afresh.
>>http://perl.apache.org/guide/performance.html#PerlSetupEnv_Off
>
>
> Great. Thank you Stas. Now I know /how/ that happens, but I don't know /why/
> the existing inctances' ENV is not clobbered.
>
> My guess is that a localized copy of the %ENV variable is created by the above
> referenced process, thus no clobbering of existing instances' %ENV occurs.
> Would that be correct?
Can you send a reproducable example of a problem? For example this code
does the right thing:
$r->send_http_header('text/plain');
print exists $ENV{FOO} ? "$ENV{FOO}\n" : "NONE\n";
local $ENV{FOO} = "BAR";
print exists $ENV{FOO} ? "$ENV{FOO}\n" : "NONE\n";
it'll always print:
NONE
BAR
Make sure that you test under httpd -X mode so you won't get mislead.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com