> -----Original Message-----
> From: Geoffrey Young [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 23, 2000 1:24 PM
> To: '[EMAIL PROTECTED]'
> Subject: is PerlAddVar working?
> 
> 
> hi all...
> 
>       I've been trying all morning to access PerlAddVar variables as
> expected (see
> http://marc.theaimsgroup.com/?l=apache-modperl&m=9571840982464
> 6&w=2 and
> forward)
> 
>       I'm not sure if anyone tested Doug's patch
> (http://marc.theaimsgroup.com/?l=apache-modperl&m=957420016273
> 08&w=2) or if
> that exact patch is what made it into the latest cvs, but I 
> can't get it to
> work as documented in 1.24_dev:
> 
> my @values = $r->dir_config->get('Fred');
> 
> has anyone had success with this?  I think that get() isn't 
> returning in a
> list context - PerlAddVar will work for setting the values, 
> and the multiple
> values show up when calling $r->dir_config->do(), but @values 
> just gets one
> value back.
> 
> maybe I've been staring at it for too long and am missing something
> obvious...

well, it would seem that I was missing something obvious (thanks Eric :)

in transitioning from PerlSetVar to PerlAddVar (scalar to array), I still
had
my @values = $r->dir_config->get('Fred') || undef;
in my code...  Had I actually coded the way I said, everything 
would have been ok. sorry for the noise...


the below issue still stands, though, as far as I can tell...

--Geoff

> 
> in my poking around, I noticed something else of interest.  given:
> 
> PerlSetVar INVISIBLE "not in Apache::Table"
> <Location /foo>
>   SetHandler perl-script
>   PerlHandler Custom::Handler
>   PerlSetVar VISIBLE "in Apache::Table"
> </Location>
> 
> $r->dir_config->do(sub {
>   my ($field, $value) = @_;
>   warn "\t$field => $value\n";
>   1;
> });
> 
> only VISIBLE is shown when in the do() loop - INVISIBLE is 
> still accessible
> via $r->dir_config('INVISIBLE') though.  Personally, I'd like 
> to see all my
> available variables, if possible.
> 
> anyway...
> 
> --Geoff
> 

Reply via email to