mod_perl embeds the Perl programming language in the Apache web
server, giving rise to a fast and powerful web programming
environment. "Practical mod_perl" aims to be the definitive book on
how to use, optimise and troubleshoot mod_perl.
The book is aimed at both server administrators and application
developers, and is well organised so that both groups of readers can
easily find what they need. The bulk of the book is split into four
main parts, covering administration, performance tuning, database
issues and troubleshooting, all in relation to mod_perl 1.0. A
smaller fifth part covers the differences between mod_perl 1.0 and the
as-yet-unreleased mod_perl 2.0, and finally there are a number of
appendices containing example code for common tasks, information on
useful Perl modules, and some information for ISPs wishing to offer
mod_perl to their customers.
As you might expect, the administration section contains the usual
instructions on how to obtain, compile, install and, well, administer
httpd and mod_perl. However, it is here that the authors' attention
to detail starts to be revealed: perhaps a third of this section
comprises analysis of transitioning existing CGIs to mod_perl and of
transitioning from a Perl environment to a mod_perl environment. Many
of the "tricky" aspects of web programming are explained here too:
user aborts and server timeouts are covered, as is the generation of
correct HTTP headers.
The performance tuning section starts with a general analysis of
web application optimisation, and sets out the areas which need to be
addressed in order optimise effectively. Every aspect that could
affect performance is examined, from hardware and operating system
through httpd configuration, multiple-machine setups and web caches,
to your applications themselves, the memory they use and their full
exploitation of the performance-improving features that the HTTP
When you consider the importance of databases to web programming it
is surprising how little coverage is devoted to them in many books,
but "Practical mod_perl"'s database section bucks the trend by
containing a wealth of information. Along with the usual information
on how to access the database, connection pooling is covered, as is
using shared memory to avoid repeated accesses.
The final part of the book covers debugging, and in keeping
with the rest of the book it is detailed, comprehensive and well
organised. A variety of different techniques are discussed such that
pretty much every possible problem is covered, and in case all else
fails the section is concluded by some instructions on how to get help
from mod_perl's development community.
The book as a whole is focused and well written, and the authors'
knowledge of and passion about mod_perl is obvious. It's an excellent
read and will undoubtedly make an excellent reference afterwards;
O'Reilly have attempted to create the definitive book on mod_perl and
they have succeeded admirably.