Geoffrey Young wrote:

bah, I knew I wasn't dreaming: it's there in env.t

that's a different test ;) and that's not what you said. You said:


>>well, knowing how apache works it was definitely a surprise when I
>>>> looked at
>>>> subenv.t
> ...
> no, that $r->subprocess_env(MYFOO => 1) magically set $ENV{FOO}.  I wasn't
> expecting that.

Here it's the opposite, %ENV affects $r->subprocess_env, but not the other way around.

    $ENV{FOO} = 2;
    ok $ENV{FOO} == 2;
    ok $r->subprocess_env->get('FOO') == 2;

so, I suppose it's only with perl-script or +SetupEnv (or some combination
of them).

It's unrelated to the configuration, since it just calls modperl_table_get_set.


as I said before, I'm surprised by this - in mp1 they weren't tied, so we've
added a feature.

It's not "tied" per se. It just affects subprocess_env. I think it's a good thing. Consider a CGI script setting %ENV wants to affect a log handler (but can't use modperl api), which can now always get the env var via $s->subprocess_env (whether the previous phase was using %ENV or subprocess_env to set it).


it seems to me that not only is this a lot of overhead,

what is 'a lot of overhead'? setting one key/val pair in the table?


but I don't see the
need to tie them together if we move SetupEnv logic to the actual
perl-script/modperl handler and document that SetupEnv is really for
populating %ENV for mod_cgi-like emulation (which was always my
understanding anyway).

Again. It's the other way around. I fail to see what is the problem that you see here. So we move it to the response phase. But all we are moving is the setup of the mod_cgi variables. the subprocess_env table can be used unrelated to these vars. What do I miss?


BTW, It happens only during the response phase, only for 'perl-script', and not for 'modperl' (see modperl_env_request_tie / modperl_env_request_untie in mod_perl.c).

do you remember why they were tied in the first place?

Doug implemented it in first place, I haven't touched it.


The relevant changes seem to be these:
http://cvs.apache.org/viewcvs.cgi/modperl-2.0/src/modules/perl/modperl_env.c?r1=1.18&r2=1.19&diff_format=h
http://cvs.apache.org/viewcvs.cgi/modperl-2.0/src/modules/perl/modperl_env.c?r1=1.10&r2=1.11&diff_format=h
http://cvs.apache.org/viewcvs.cgi/*checkout*/modperl-2.0/src/modules/perl/modperl_env.c?content-type=text%2Fplain&rev=1.1
__________________________________________________________________
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]



Reply via email to