On Jul 06, 2000 at 19:47:07 +0200, Eric Cholet twiddled the keys to say:
> > On Thu, 6 Jul 2000, Geoffrey Young wrote:
> > 
> > > Sorry to bring up PerlAddVar again, but this time I have a legitimate bug.
> > > It stems from what I reported last time about items in Apache::Table not
> > > being visible outside a <Location> directives:
> > 
> > See the section on DIR_MERGE in the Eagle book. It just needs someone to
> > write that code for PerlAddVar/PerlSetVar.
> > 
> 
> But there is dir_merge code for those variables, this works for me:
> 
> PerlSetVar MyVar foo
> 
> <Location /test/>
>   PerlSetVar MyVar bar
>   SetHandler "perl-script"
>   PerlHandler Apache::Registry
>   Options +ExecCGI
> </Location>
> 
> test/foo:
>   my $r = shift;
>   $r->send_http_header('text/plain');
>   print $r->dir_config('MyVar');
> 
> % GET http://localhost/test/foo
> bar
> 
> 
> I don't know about PerlAddVar, haven't tested Geoff's examples yet,
> but it should work as well since those vars all end up in 
> perl_dir_config->vars

This is the same problem I alluded to the other day in reply to Matt's
post concerning DIR_MERGE. In this example you're looking for MyVar
explicitly, which is found properly. In Geoffrey's example he is trying
to use $r->dir_config->do(), which will not see the global value for
some reason. His was the same setup I was using, with the same results.

Rick Myers                            [EMAIL PROTECTED]
----------------------------------------------------
The Feynman Problem       1) Write down the problem.
Solving Algorithm         2) Think real hard.
                          3) Write down the answer.

Reply via email to