mod_perl backward compatibility
am 23.03.2009 09:24:26 von andynic
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
--
View this message in context: http://www.nabble.com/mod_perl-backward-compatibility-tp2265 5872p22655872.html
Sent from the mod_perl - General mailing list archive at Nabble.com.
Re: mod_perl backward compatibility
am 23.03.2009 10:41:12 von aw
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"!