Fri, 12 Aug 2005
Migrating to mod_perl2
We are migrating our system (currently running on Apache-1.3 and mod_perl-1.0) to Apache-2.0 and mod_perl-2.0. It is a bit trickier than one can expect - problematic parts include (but not limited to):
- The Apache::Request object is not available during server startup
- The %ENV variable is not tied to the process' environment (which makes running external programs a bit tricky)
- STDIN/STDOUT of external programs is closed (used to be redirected to /dev/null) - the zip(1) is not able to run with STDOUT closed, for example.
- Last, but not least - the complete API rename which took part just before mod_perl-2.0 was released.
And despite such problems (which are rarely documented anywhere - the %ENV issue is documented in the "troubleshooting" section only) the title of many manpages of mod_perl modules boldly claims something like:
ModPerl::PerlRun - Run unaltered CGI scripts under mod_perl
Mod_perl is a decent piece of software for new programs (and for many legacy apps too), but the docs are still quite incomplete, and bragging about backwards compatibility as quoted above really annoys me. However, I think the migration is finished now, and we will try it in next few days on a live system.