Stas Bekman wrote:
> Doug MacEachern wrote:
>
> There is one item of your reply I need more details about:
>
>>> SetHandler perl-script
>>
> ...
>
>>> implies:
>>
> ...
>
>>> * there are a few other things that happen in this function, what are
>>> they?
>>
>>
>>
>> modperl_perl_global_request{save,restore} does something like local()
>> for all variables in the modperl_perl_global.c:MP_perl_global_entries
>> table.
>
>
> MP_perl_global_entries[] = {
> {"END", MP_GLOBAL_OFFSET(end), MP_GLOBAL_AVCV}, /* END */
>
> What's global END()? I thought END always belong to some namespace.
>
> {"ENV", MP_GLOBAL_OFFSET(env), MP_GLOBAL_GVHV}, /* %ENV */
> {"INC", MP_GLOBAL_OFFSET(inc), MP_GLOBAL_GVAV}, /* @INC */
> {"STDOUT", MP_GLOBAL_OFFSET(defout), MP_GLOBAL_GVIO}, /* $| */
> {"/", MP_GLOBAL_OFFSET(rs), MP_GLOBAL_SVPV}, /* $/ */
>
> so %ENV, @INC, $| on STDOUT and $/ are all getting reset at the end of
> request. It's clear with %ENV and @INC, but I don't understand why the
> latter two? why not put the responsibility of localizing these on a
> developer?
Does this also mean that with 'SetHandler modperl' the coder should be
extremely careful not to pollute these globals and therefore we should
add a warning in the relevant docs?
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]