Consider the following config:
PerlModule Apache::PrintEnv2
<Location /print_env2>
SetHandler modperl
PerlResponseHandler Apache::PrintEnv2
PerlSetEnv EnvTest Apache::PrintEnv2
</Location>
and the handler:
sub handler {
my $r = shift;
$r->content_type('text/plain');
#$r->subprocess_env;
for (sort keys %ENV){
$r->puts("$_ => $ENV{$_}\n");
}
$r->puts("------\n");
my $env = $r->subprocess_env;
for (sort keys %$env) {
$r->puts("$_ => " . $env->get($_) . "\n");
}
return Apache::OK;
}
I get:
GATEWAY_INTERFACE => CGI-Perl/1.1
MOD_PERL => mod_perl/1.99_03-dev
PATH => /bin:/usr/bin:/...
------
UNIQUE_ID => GfJtSgoAAAMAAEXWesgAAAAB
The %ENV part is fine, but why don't I see: EnvTest env var set in the
config file via subprocess_env? Is it supposed be this way?
__________________________________________________________________
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]