I am using Apache2::Request - APR::Request::Param::Table is just the
underlying table used by Apache2::Request. What I'm ultimately trying
to do is this:

Get the request parameters using the tied APR::Request::Param::Table
object (which is returned by Apache2::Request->new($r)->param in
scalar context) as well as being able to modify the request parameters
in the tied APR::Request::Param::Table object.

However, APR::Request::Param::Table does not implement STORE so I
cannot accomplish the latter. So I'm looking for a good alternative
way.

In fact, I don't mind ignoring the tied APR::Request::Param::Table
object, and just using using the Apache2::Request object and get
parameters like this:

my $val = Apache2::Request->new($r)->param('name');

but the problem is, I still cannot set or modify request parameters.
(The reason I want to use the tied APR::Request::Param::Table object
is because I like working with a hash)

CGI.pm does allow for modifications to the request parameters - so
with CGI, I can do something like this:

$query->param('foo','an'); # $query is a CGI object

that will set the 'foo' parameter to have a value on 'an'.

However, in Apache2::Request, I cannot do something like that. ( Can
someone please tell me WHY the authors of mod_perl2 do not allow
modifications to the request parameters???!!!!!! I can do it with
CGI.pm, and I believe I can do it with Apache::Request, but why not
Apache2::Request??????)

So what I'm trying to say is, I want the param method in
Apache2::Request to behave just like the param method in CGI. Since
that is not the case, what would be a good alternative way?

Jimmy

On Nov 23, 2007 1:21 PM, Perrin Harkins <[EMAIL PROTECTED]> wrote:
> On Nov 22, 2007 2:36 PM, Jimmy Li <[EMAIL PROTECTED]> wrote:
> > I'm currently using the tied APR::Request::Param::Table object to get
> > request parameters. However, this tied object does not implement STORE
> > so I cannot add or modify information in this object.
>
> Can you tell us what you're ultimately trying to do?  Most people use
> either Apache2::Request (libapreq2) or CGI.pm for reading the request
> params.
>
> - Perrin
>

Reply via email to