Jean-Michel Hiver wrote:
> 
>> I would consider it a bug, but mod_perl (through the current release)
>> populated %ENV when the first Perl*Handler runs, which may have been
>> before
>> or after translation (which is where path_info becomes known).  if you
>> specifically move that PerlInitHandler to a PerlHeaderParserHandler I'd
>> suspect at PATH_INFO would magically appear.
>>
> That would explain :)

:)

> 
> Another thing: In order to make my application to run, for the moment I
> use Apache::compat as follows:
> 
>  PerlModule  Apache2
>  PerlModule  Apache::compat
>  PerlOptions +GlobalRequest
>  PerlOptions +SetupEnv
> 
> Shouldn't PerlOptions +GlobalRequest +SetupEnv be set by default when
> using Apache::compat?

hmm... probably.  I'm not sure if there is an API for setting those, though.

> 
> It is, after all, the default behavior when using mp1.
> 
> Also, shouldn't Apache::compat 'use' Apache2 to make the 'PerlModule
> Apache2' unnecessary?

I don't think so.  it's probably better to let the admin determine where the
installation ought to point to, rather than compat (or any other module)
figuring it out for him - if there is an old Apache2/ install sitting around
and a newer one in Apache/ things won't be right.

> 
>> this behavior has been changed in CVS, so in 1.99_13 everything ought to
>> work as expected.  However, in 1.99_13 %ENV is only set up right
>> before the
>> PerlResponseHandler, so CGI variables like PATH_INFO and REMOTE_USER will
>> not be present in Perl*Handlers at all - you'll need to use the API to
>> get
>> to them.
>>
> This sounds very sensible. After all Perl*Handler are supposed to use
> the mod_perl API where ModPerl::Registry scripts aren't. Although it
> would be nice to have the option to populate %ENV twice: once before the
> first Perl*Handler and once before the response phase.

if you call subprocess_env() in a void context with no arguments:

  $r->subprocess_env();

%ENV will be set up.  it will be set up _again_ before content generation to
make sure that new subprocess_env entries make in into %ENV as well.

so, we gotcha covered.  now, anyway :)

--Geoff


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to