httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Prime <>
Subject Re: APR::Request::Param::Table
Date Sun, 10 Jul 2005 23:48:52 GMT
On 7/10/05, Philip M. Gollucci <> wrote:
> No, APR::Request::Param::Table does not implement get/set.
> You have to use the Apache2::Request interface.
> If you look at it's new() method, it basically gives you an
> APR::Apache2::Request object back.  But I can't for the life of me find
> where its finally implemented here, but it is, because the
> Apache2::Request interface works.

Here's how i would have done what i'm trying to do in mp1.  The docs
say this interface is broken, but they aren't explaining to me very
clearly what i'm supposed to do to get this sort of functionality in

sub handler {
    my $r = Apache::Request->instance(shift);
    $r->param('foo' => 'bar');

    print $r->param('foo') ."\n"; 
    return OK;

The docs pointed me trying these:

                     $req->args->{foo} = "bar";   # OK: assign to args table
                     $req->body->add(foo => "bar");  # OK: add to body table

the errors i get from those, respective are: 

[Sun Jul 10 20:14:55 2005] [error] [client] Can't locate
object method "STORE" via package "APR::Request::Param::Table" at
/www/perl/Crap/ line 12.\n
[Sun Jul 10 20:14:00 2005] [error] [client] Can't locate
object method "add" via package "APR::Request::Param::Table" at
/www/perl/Crap/ line 11.\n

I realize i'm probably just repeating myself here, but something
doesn't seem right.  The docs say this:

       * You must use the "Apache::Request::Table" API via "scalar
$req->args" or "scalar $req->body" to assign new parameters to the

But what i get out of scalar $req->args isn't an
Apache::Request::Table object, it's an APR::Request::Param::Table

So yeah, i'm confused.


View raw message