You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Doug MacEachern <do...@covalent.net> on 2000/06/01 21:43:29 UTC

Re: Perl Section questions

On Wed, 31 May 2000, Kees Vonk 7249 24549 wrote:

> I have two questions about perl sections:
> 
> 1) Has setting an entry in the %ENV hash in a perl section 
>    the same effect as using a SetEnv (or PerlSetEnv) 

no, %ENV is cleared at startup, you need to use the *Env directives for
any you want to stick around.

>    directive (What btw is the difference between SetEnv and 
>    PerlSetEnv, both seem to effect %ENV in the same way.)

SetEnv doesn't happen until the fixup phase, PerlSetEnv happens asap, so
those variables are available before then, e.g. in PerlAuthenHandler for
$ENV{ORACLE_HOME} + Apache::AuthenDBI

> 2) If the order of directives in a Location section matters 
>    (see recent discussion on Apache::PerlVINC), does that 
>    mean I cannot use Perl Sections to configure that because 
>    the order of hash keys is unreliable.

you can use:

$PerlConfig .= <<EOF;
EOF

or 

push @PerlConfig, ...;

or

Apache->httpd_conf(...);

to generate config that must have order preserved.