You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2000/06/23 19:24:22 UTC

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=95718409824646&w=2 and
forward)

	I'm not sure if anyone tested Doug's patch
(http://marc.theaimsgroup.com/?l=apache-modperl&m=95742001627308&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...

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