Michele Beltrame wrote in about the mod_perlite project, which I'd love to see take off. mod_perl has never been easy to install, and ISPs and webhosts are loathe to use it for security reasons. mod_perlite would provide easy access to Perl without the weight of CGI.
mod_perlite is an interesting Apache module currently under development. I'd say it's the equivalent of what mod_php is for PHP: a fast, easy to use, and relatively safe way to use Perl scripts for the development of small and medium web applications.
A project like this brings Perl back into play as a good choice in a field currently dominated by PHP. In particular, PHP is great when you need to run a lot of different small applications on the same web server, and you want all of them to run fast enough. CGI is slow compared to mod_php because both the interpreter and the application need to be loaded for every single request. Solutions like mod_perl and mod_fastcgi are the best solution when you have a few big applications, but they're not a good choice in this scenario, because they keep the application resident: when you've got so many small applications (which, in most cases, are invoked infrequently) you end up with enormous memory footprint.
mod_perlite is the winner here: only the interpreter is kept resident (there's also the idea to keep some modules loaded, which might speed up things further) and applications are loaded at request time. This also helps avoid problems with memory leaks. Using mod_perlite is simple: just configure Apache and all the .pl files will run without modification taking full advantage of mod_perlite and therefore reducing execution time to a fraction.
Unfortunately the module is not yet stable, as there's still work to do. My installation on Gentoo Linux x86_64 went smoothly. mod_perlite works but still suffers some major issues. In fact, at present it's only usable for very simple applications because of a bug in how query parameters passed by Apache are handled.
To make mod_perlite fully usable, the project web site has a three point TODO list:
- Fix form POST processing ('read' does not work reliably)
- Limit Perl running time.
- Find ways to cache code.
The project is looking for help, so if you are interested and know something about mod_perl, writing Apache modules in C, and about overriding system calls in Perl - and if the project seems interesting to you - please shout!
And... if someone argues "we're 10 years late compared to PHP", I'd reply "better late than never". ;-)
Michele Beltrame lives in North-Eastern Italy, where he has been
developing web applications in Perl since 1996. He is an active member
of the Italian Perl community and of the Italian Perl Workshop
organizational committee. In his free time he publishes guidebooks on
the mountains surrounding his area.