olus has asked for the wisdom of the Perl Monks concerning the following question:
When printing the %ENV I see AM_I_SET as 'Yes' but VAR is undef.... sub handler { my $r = shift; my $var = $r->dir_config('var'); $ENV{'VAR'} = $var; $ENV{'AM_I_SET'} = 'Yes'; return Apache2::Const::OK; }
The resulting web page will correctly display the value of 'var' and undef on %ENV.my $r = shift; # template initialization not shown my $var = $r->dir_config('var'); $vars{'message'} = "Var is: $var"; $vars{'message'} .= '<br />'.Dumper(\%ENV); $template->process("hello.html", \%vars) || die $template->error();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PerlSetVar and PerlPostReadRequestHandler
by perrin (Chancellor) on Dec 07, 2007 at 21:33 UTC | |
|
Re: PerlSetVar and PerlPostReadRequestHandler
by redhotpenguin (Deacon) on Dec 07, 2007 at 19:34 UTC | |
by olus (Curate) on Dec 07, 2007 at 19:41 UTC | |
by redhotpenguin (Deacon) on Dec 07, 2007 at 19:48 UTC | |
by olus (Curate) on Dec 07, 2007 at 20:11 UTC |