> [snip]
> > I'm using Apache::Request, for the sole
> >purpose
> >of having easier access to the parameters.  Except that it turns out
> >Apache::Request's param() method does NOT support *setting* parameters,
> >only
> >*getting* them. <sigh>
>
> the
> $apr->param('foo' => [qw(one two three)]);
> example in the docs didn't work until recently in CVS and it hasn't been
> propigated out yet (although a 0.33 release of libapreq is pending)
>
> for the moment, try
>
> my $parms = $apr->parms;
>
> $parms is an Apache::Table object, for which you can call get(), set(),
> add(), etc.
>
> in the next release, $apr->param will return an Apache::Table object in
> a scalar contect, removing the need for a separate parms() method.
> for now, that should help.

I tried this:

        my $parms = $apr->parms;
        $parms->add( pid => $pid) unless defined $parms->get('pid');

But now my app complains that it's not getting a parameter for pid at all.
I looked at the source, and parms() returns

    ST(0) = mod_perl_tie_table(req->parms);

But I don't know if the above call is "complete" (changes to the
Apache::Table object reflect in the request).  Am I supposed to re-insert
the table into the request?  None of the following worked:

$apr->args($parms);
$apr->parms($parms);

and I couldn't figure out how to convince $parms to stringify so that I
could just assign THAT to $apr->args.

Suggestions?

TIA!

L8r,
Rob

Reply via email to