Henrique Pantarotto wrote:
I'm having some trouble with CGI.pm working with mod_perl2.

What trouble are you having?


This guy clearly says
that CGI.pm is incompatible with mod_perl2:

http://marc.theaimsgroup.com/?l=apache-modperl&m=103619647305553&w=2

That was 7 months ago. A lot has changed.


Keep in mind, CGI.pm doesn't entirely work with mod_perl 1. It uses global variables internally, so it has to clear them with a cleanup handler, and there are issues around subrequests.

This isn't really a big problem, but I have 3 ways out:

1) help make CGI.pm compatible with mod_perl2 if at all possible

2) replace all CGI.pm calls with simple homemade cgi functions (not
difficult, it's just that we have to correct many scripts that already
count on CGI.pm), or use that "Apache::compat" thing

You could try CGI::Simple, which has the same (OO) interface as CGI.pm.


3) downgrade apache to 1.3.27 and mod_perl to 1.27 and be happy

That would work fine as well.


Seriously, does mod_perl2 offer much more
features and benefits then mod_perl1?  I really only care for speed and
stability for simple perl scripts that use CGI/DBI/DBD::mysql modules.

It offers many new features, which are described here: http://perl.apache.org/docs/2.0/user/intro/overview.html#What_s_new_in_mod_perl_2_0

The most common reasons for switching at this point are to get filtering or to get multi-threading on Win32.

Is it okay if I use mod_perl and apache 1.x today, or it's better to
move to 2.x already?

Many people are stil developing on 1.x, including me, and there is a new release of it due out any day. Go ahead, if that makes you more comfortable.


- Perrin



Reply via email to