Skip to content

I just want them to know that they didn't break me.

I'd forgotten how sexy, useful, and great mod_perl is.

I've recently been struggling with a friend's CGI-based site, and after a minor effort we made it run with Apache::PerlRun:

Apache::PerlRun gives you the benefit of preloaded Perl and its modules. This module's handler emulates the CGI environment, allowing programmers to write scripts that run under CGI or mod_perl without any change

Because the site code wasn't very clean we had to make a lot of changes to get it working under Apache::Registry.

Apache::Registry is the Apache module allowing you to run CGI scripts very fast under mod_perl, by compiling all scripts once and then caching them in memory.

But the payoff is very noticeable - the site is now blazingly fast!

At some point I should write a guide to doing basic things with mod_perl. Mostly I guess the challenge is that you can write toy applications in moments, but to demonstrate how useful it is you need to apply it to something the reader is familiar with. Or demonstrate why the effort is worthwhile, given that it ties you to the Apache + mod_perl platform.

Any links to existing guides, or suggestions on how to approach the guide-writing in a beginner-friendly but still useful fashion are welcome.

(For what its worth I mostly write web applications using CGI::Application & jQuery these days.)

ObFilm: Pretty In Pink

Comments On This Entry

  1. [gravitar] Simon
    I do like mod_perl when you get seriously into it.
  2. [gravitar] Andres
    I'd really be interested in a guide like this. I think a good approach to consider is to have simple examples but which build on top of each other. For example, mod_perl, then CGI:Application, and Apache::PerlRun plus Apache:Registry.
  3. [gravitar] David Moreno
    I hope you don't get this comment as spam, but I'm usually posting the nice and simple things you can do with mod_perl on my blog, Infinite Pig: http://log.damog.net/, so you might be interested in following :)
    Right on :)
  4. [author] Steve Kemp

    Thanks David, your blog entries tagged mod_perl made interesting reading - thanks for sharing.

    Andres I hope I've done a decent job in my little writeups. I've posted the first part today, and theres a second part to go live tomorrow (with actual code!):