Apache Week
   

Copyright 1996-2005
Red Hat, Inc.

First published: 16th February 2001

Book Review: mod_perl Pocket Reference

As we promised in Apache Week issue 210, here is our review of "mod_perl Pocket Reference" by Andrew Ford, who also maintains the mod_perl quick reference card.

In the tradition of the pocket reference series, this book measures 4.25 by 7 inches and consists of one main body that is divided into sections. In the introduction, which is the first of sixteen subtopics, it clearly states its objectives or rather what it is not meant to be. The book aspires to cover all of mod_perl 1.24's classes, methods and configuration directives but cautions that it is not a self-contained user guide. Its readers are assumed to be acquainted with mod_perl, web server technology and object-oriented Perl programming.

With the impressive names of Perl gurus in its "acknowledgements" section, one would not expect this book to go wrong anyway. Within its 83 pages, it manages to squeeze in a brief explanation of the formatting conventions used.

The first few sections of this book run through the basic functionality of mod_perl, the HTTP protocol, the list of phases in which Apache processes its requests, and provides the reader with references for further information. Next is a brief tutorial on getting mod_perl to work with Apache - but as this is not a full-blown user guide, one is expected to have installed mod_perl before.

Moving on to migrating CGI scripts to mod_perl, it highlights the differences between using Apache::Registry and Apache::PerlRun which are two standard Apache/Perl modules that run unaltered CGI scripts. It also suggests a nice five step migration strategy.

Section 7 explores embedding Perl scripting within HTML pages using the standard mod_include and the Apache::SSI Apache/Perl module. Template systems based on or compatible with mod_perl are not covered but are listed in the later portion of this book.

The next section provides an overview of developing Apache modules in Perl, touching briefly on handlers for various request-processing phases and debugging. This is then followed by a list of the mod_perl API with a short description of each function. It clarifies that each installation of mod_perl may not support every feature described in the list. It would be useful if the book provided a pointer on enabling each feature, as there is little use in knowing about a particular feature but not knowing how to enable support for it. As it stands, this list can be considered the core of the book as it takes up nearly one third of the pages.

After that, the Apache configuration directives implemented by mod_perl are presented followed by a list of Apache/Perl modules grouped by functionality. Both are accompanied by a more detailed description of their function than the online Apache/Perl module list and the mod_perl.html page. It also indicates which modules are included in the mod_perl distribution and distinguishes between core and non-core modules.

The last three sections include a list of CGI environment variables, HTTP status codes, and HTTP header fields, which may be required during mod_perl programming. Lastly, the book concludes with an index of modules and methods provided by mod_perl.

Currently some people use mod_perl simply to run existing Perl CGI scripts, but as can be seen from this extremely concise book, mod_perl offers much more than that. The book provides a good overall coverage of this versatile module, keeping all the necessary facts simple, short and precise without glossing over anything important.

I would highly recommend this book to mod_perl lovers as they may discover something that they may have missed while using the module. As for the experts, this book may be quite handy as a quick revision guide. It is also an excellent source of information for users who have been using mod_perl for only a short while. It will definitely save them the trouble of reading through a thick manual to flesh out mod_perl's potential. But then of course one must have a complete mod_perl "bible" nearby to refer to, for detailed installation, configuration and programming instructions.

Users who have never encountered Apache, Perl and mod_perl before are well advised to read the online mod_perl documentation and have some hands-on experience before giving this reference book a go. Otherwise they may find themselves wandering off and giving mod_perl a miss, as this is not a beginner's guide.

Order now at Amazon.com 


This feature brought to you by: Min Min Tsan
Comments or criticisms? Please email us at editors@apacheweek.com