Re: dir_config and Apache::Table confusion
* Doug MacEachern | | works fine for me with this config: [ ... ] | with mod_perl-1.24_01-dev, apache_1.3.13-dev, perl-current (5.7.0@7093) Works for me too when PerlSetVar is inside a Location /foo, but not when it's defined outside, in the 'root' of httpd.conf. Is this how it should be? From the documentation in 'Writing Apache Modules ..' it doesn't seem like it is, at least not to me. (bo)
Re: dir_config and Apache::Table confusion
On 26 Sep 2000, Bjørn Ola Smievoll wrote: Works for me too when PerlSetVar is inside a Location /foo, but not when it's defined outside, in the 'root' of httpd.conf. Is this how it should be? From the documentation in 'Writing Apache Modules ..' it doesn't seem like it is, at least not to me. ah, see the patch i just posted, it should fix this problem too.
Re: dir_config and Apache::Table confusion
On 21 Sep 2000, Bjørn Ola Smievoll wrote: If I do this: $r-print($r-dir_config('key')); Then key is printed. If I then do this: my $tab = $r-dir_config; $r-print(Dumper($tab)); # Using Data::Dumper I get '$VAR1 = bless( {}, 'Apache::Table' )'; It's empty, how come? works fine for me with this config: Location /perl PerlSetVar foo bar SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI /Location and test: use Data::Dumper; my $r = shift; $r-send_http_header; $r-print($r-dir_config('foo'), "\n"); my $tab = $r-dir_config; $r-print(Dumper $tab); outputs: bar $VAR1 = bless( { 'foo' = 'bar' }, 'Apache::Table' ); with mod_perl-1.24_01-dev, apache_1.3.13-dev, perl-current (5.7.0@7093)
dir_config and Apache::Table confusion
If I do this: $r-print($r-dir_config('key')); Then key is printed. If I then do this: my $tab = $r-dir_config; $r-print(Dumper($tab)); # Using Data::Dumper I get '$VAR1 = bless( {}, 'Apache::Table' )'; It's empty, how come? (bo)
Re: dir_config and Apache::Table confusion
On 21 Sep 2000, Bjørn Ola Smievoll wrote: If I do this: $r-print($r-dir_config('key')); Then key is printed. If I then do this: my $tab = $r-dir_config; $r-print(Dumper($tab)); # Using Data::Dumper I get '$VAR1 = bless( {}, 'Apache::Table' )'; It's empty, how come? Probably because keys doesn't return the keys of an Apache::Table object, since it is implemented in C. -- Matt/ Fastnet Software Ltd. High Performance Web Specialists Providing mod_perl, XML, Sybase and Oracle solutions Email for training and consultancy availability. http://sergeant.org | AxKit: http://axkit.org
Re: dir_config and Apache::Table confusion
* Matt Sergeant | | Probably because keys doesn't return the keys of an Apache::Table object, | since it is implemented in C. I'm not quite sure it's that simple. If you replace dir_config() with headers_in() which also return an Apache::Table object you get a sane result from Dumper(). Also, when using dir_config as in my first posting $tab-{$key} returns nothing (undef?), but (as I said) dir_config($key) returns correctly. (bo)