Mike P. Mikhailov wrote:
> Hello Fredo Sartori,
>
> Thursday, August 15, 2002, 1:44:34 PM, you wrote:
>
> I mabe wrong, but what about to move code to setup ENV out from BEGIN
> block ? I wrote simple test below:
>
> # Test.pm
> package Test;
>
> use Apache::Constants qw ( :common );
>
> BEGIN {
> $ENV{FOO1} = 'BAR1';
> $ENV{FOO2} = 'BAR2';
> }
>
> sub handler {
> my $r = shift;
> $r->print("Content-Type: text/plain\n\n");
> print "FOO1=$ENV{FOO1}, FOO2=$ENV{FOO2}\n";
> return OK;
> }
>
> 1;
>
> __END__
>
> # httpd.conf
>
> SetEnv FOO1 QQ1
> SetEnv FOO2 QQ2
>
> <Location /test>
> SetHandler perl-script
> PerlHandler Test
> PerlSendHeader On
> </Location>
>
> One the first request of the fresh apache, I got:
>
> FOO1=BAR1, FOO2=BAR2
>
> On all subsequent requests:
>
> FOO1=QQ1, FOO2=QQ2
>
> I thing this is because mod_perl reset ENV hash on each request, but
> I'm not sure. And I'm on Apache/1.3.23 (Unix) mod_perl/1.26. Not on
> apache2. Did you confirm such behaviour of MP2 ?
The behaviour didn't change in 2.0.
> Does not find any
> mention which confirm this in the guide :(
It's because 2.0's documentation has its own "guide":
http://perl.apache.org/docs/2.0/
__________________________________________________________________
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