perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: mod_perl backward compatibility
Date Mon, 23 Mar 2009 09:41:12 GMT
andynic wrote:
> Hi,
> I'm a newbie to much of this.
> I have Apache 2.2 and Perl 5.10 on my Windows XP computer.  I have developed
> a number of perl scripts using CGI and DBI.  I am tempted to try mod_perl so
> that I can achieve a persistent db connection. My concern is that my
> existing CGI code will no longer work.
> Is this a valid concern? Or is a mod_perl configuration backward compatible
> with existing CGI scripts?
> Thanks for your help.
> Andynic

Star by reading this :
http://perl.apache.org/docs/2.0/user/intro/start_fast.html
and particularly the "Registry Scripts" section.

Start by trying to run your existing scripts as shown in that section.
Just doing that, they should already run quite a bit faster (20 times ?).
Then if you encounter problems, ask another question.

Pay particular attention to this :

This module emulates the CGI environment, allowing programmers to write 
scripts that run under CGI or mod_perl without change. Existing CGI 
scripts may require some changes, simply because a CGI script has a very 
short lifetime of one HTTP request, allowing you to get away with "quick 
and dirty" scripting. Using mod_perl and ModPerl::Registry requires you 
to be more careful, but it also gives new meaning to the word "quick"!


Mime
View raw message