perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <per...@elem.com>
Subject Re: CGI.pm param and mod_perl
Date Fri, 13 Jun 2008 21:17:58 GMT
On Fri, Jun 13, 2008 at 2:53 PM, Michael Peters <mpeters@plusthree.com> wrote:
> Doing a "$q = new CGI" means that you will get a new CGI object on every
> request, which is what you want. I've never used the function interface of
> CGI.pm like you did in your example so I don't know how CGI.pm handles it behind
> the scenes (whether it creates a new object on each request or not).

Sad to say, CGI->new is mostly just lipstick on a pig.  Behind the
scenes, it still puts everything in globals.  CGI.pm is just not an OO
module.

However, it is safe to use with mod_perl because it reinitializes the
globals on each request.  The only problems I've run into with this
are from internal redirects, when it doesn't realize there's a fresh
request.

- Perrin

Mime
View raw message