[sf-perl] CGI working

Quinn Weaver quinn at fairpath.com
Sun Mar 2 10:58:36 PST 2008

On Sat, Mar 01, 2008 at 09:17:28PM -0800, Neil Heller wrote:
> Are you saying that using plain Perl CGI programs in Apache means that the
> application (really the script, in this case) will NOT stay in memory
> between invocations?  That's a bummer for me.

Check Apache::Registry on CPAN.  It lets you "[r]un unaltered CGI
scrips under mod_perl."

In general, it Just Works.  But there are some subtle problems that
can crop up, depending on how your CGI scripts are coded.  The
_mod_perl Developer's Cookbook_ has a longish section that explains
these (chapter 2, section 2).

In the meantime, your best bet is to use strict; and use warnings; in
every CGI script (if you don't already).  That will expose many of
the problems right away.


Quinn Weaver, independent contractor  |  President, San Francisco Perl Mongers
http://fairpath.com/quinn/resume/     |  http://sf.pm.org/

More information about the SanFrancisco-pm mailing list