You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bj�rn Ola Smievoll <b....@usit.uio.no> on 2000/09/21 12:21:02 UTC
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
Posted by Bj�rn Ola Smievoll <b....@usit.uio.no>.
* Bjørn Ola Smievoll
|
| * 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.
No comments? Could this be regarded as a bug or am I doing something
stupid? How should I go about following up on this, post to
dev@perl.apache.org?
(bo)
: Guess I gotta learn that C
Re: dir_config and Apache::Table confusion
Posted by Bj�rn Ola Smievoll <b....@usit.uio.no>.
* 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)
Re: dir_config and Apache::Table confusion
Posted by Matt Sergeant <ma...@sergeant.org>.
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