> -----Original Message-----
> From: Eric Cholet [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 06, 2000 1:47 PM
> To: Matt Sergeant; Geoffrey Young
> Cc: [EMAIL PROTECTED]
> Subject: Re: PerlAddVar bug
>
>
> > 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
I guess my expectation is that $r->dir_config('MyVar') and
$r->dir_config->get('MyVar') should inherit equally, which as far as I can
tell, they don't. PerlSetVar or PerlAddVar - it makes no difference.
if you change your test case to:
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 "1: " . $r->dir_config('MyVar');
print "\n2: " . $r->dir_config->get('MyVar');
% GET http://localhost/test/foo
1: foo
2:
I think you'll see it...
--Geoff
>
> --
> Eric
>
>