pajout has asked for the wisdom of the Perl Monks concerning the following question:

I'v found the Apache2::Request module to support arguments parsing. Perhaps I am confused, but I cannot understand why

1. There is $req->body (parsing content of POSTed forms) and $req->param (parsing args from url and content of POSTed forms into one object) but there is not standalone $req->arg, parsing the part of url only.
2. There is no option to make $req->param('myKey') or $req->body('myKey') case sensitive.

Does anybody know why that module is so specialized? Or, can somebody recommend some subclass module or wrapper (I don't want to reinvent wheel)?

Replies are listed 'Best First'.
Re: Apache2::Request unexpected behavior
by ides (Deacon) on Feb 14, 2007 at 15:57 UTC

    The module is the way it is because it is simply a Perl interface to libapreq2. As has been suggested, you can always fall back ot use CGI.pm if you need those features, personally I prefer Apache2::Request.

    Frank Wiles <frank@revsys.com>
    www.revsys.com

      Thanks for reply. I know that it is only interface to libapreq2. Consequently, why the libapreq2 have previously described behavior? :>)
Re: Apache2::Request unexpected behavior
by TOD (Friar) on Feb 14, 2007 at 15:48 UTC
    the reason for this maybe unexpected behaviour lies in various request methods, i assume. the Request module tries to offer a way that a) conforms to the mod_perl API, and b) conforms to HTTP.
    you should take a look at the pod-code from Apache2::Request, and probably even more valuable: http://perl.apache.org/docs/2.0/index.html
      Could you be more concrete?
Re: Apache2::Request unexpected behavior
by Anonymous Monk on Feb 14, 2007 at 12:33 UTC
    use CGI
      No.