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

Dear Brothers and Sisters in Perl,

This is a mod_perl2 (for Apache 2) related question. I know there is a mod_perl mailing list, but if you don't mind, I'd like to pick our collective brains here first.

I have a mod_perl1 module that reads the GET-parameters from the request-object ^r with the $r->param('name_of_param') method call.

This method call was (for mod_perl 1 for the Apache 1 series) found in the Apache->request module. In my present Perl set-up I do not have Apache->request anymore as the mod_perl2 modules live in the Apache2 namespace and there is no corresponding Apache2->request module.

So here is my question: How can I get the value of the parameters which live somewhere in the request object? I'd rather not use CGI as that is a "heavy" module and will impact performance.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re: mod_perl2 and CGI-parameters
by philcrow (Priest) on Aug 28, 2006 at 15:59 UTC
    There is Apache2::Request, for this you need to install libapreq2.

    Phil

    Update: Noted that for Apache 2 you want libapreq2.

      Thanks.

      Of course libapreq2, that is why my search on ppm turned up empty, Apache2::Request actually lives inside the libapreq2 distribution. I thought -erroneously as it appears- that it would have been installed when I installed mod_perl.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

        It isn't installed automatically with mod_perl because, although it is maintained by the mod_perl developers, it is an Apache module which makes request parsing available to other non-perl related Apache modules.
Re: mod_perl2 and CGI-parameters //SOLVED//
by chromatic (Archbishop) on Aug 30, 2006 at 00:21 UTC
    I'd rather not use CGI as that is a "heavy" module and will impact performance.

    You know what absolutely kills performance? Waiting on network requests and responses.

      All too true! Unfortunately this website is running off an old Celeron 333 Mhz computer with limited memory available so if at all possible I try to avoid adding things like CGI.pm if I only need a small part of their functions and methods.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law