The following book reviews are the copyright of their respective authors and no part should be reproduced without the express permission of the author. Publishers and Authors of the books reviewed may reproduce the whole or extracts of a review for their book. To request copyright permission please email email@example.com.
All the reviews herein are the opinions of the reviewer and are not necessarily the views of Birmingham Perl Mongers and its members. If you feel a review or comment has been made in error, please contact firstname.lastname@example.org to rectify the situation.
Static Link: http://birmingham.pm.org/reviews/7
|Author(s):||Stas Bekman, Eric Cholet|
It is fair to say that most if not all O'Reilly titles are well written, useful to the computer professional and crafted with a bent toward practical use rather than mere academic re-writes of manual pages and design documentation.
Practical mod_perl is no exception to this, indeed with the word 'Practical' in it's title, one would expect such a work to be an in depth 'hands on' guide to mod_perl. This is very much the case. Using the introduction as a 'quick start', the eager can get up and running with simple mod_perl scripts before page 40.
The introductory sections run through the basic mechanisms of CGI and HTTP, running CGI.pm scripts under mod_perl, simple mod_perl 'content handlers' and even mod_perl win32 implementation and considerations are explained concisely and by example where appropriate. One could ask, 'is this all I need to know?'. The text answers this in a qualified manner as 'yes and no'. Naturally, the reader would be well advised to go with the latter as there is clearly much to learn about mod_perl beyond simply porting existing CGI.pm based scripts to run as compiled objects under mod_perl. The following 800+ pages testify to this.
The book is separated into 'parts' - each of which are often a book in their own right.
Installation of mod_perl can be as simple as 'perl Makefile.pl; make; make install' but chapter 3 discusses this and more installation and configuration options that you could shake a stick at. Discussion of compilation of options for 'DSO' (Dynamic Shared Objects), apxs, SSL, Stronghold and even installation via CPAN.pm are sections that the reader will be wise to re-visit, particularly when it it is time for a new install or upgrade. Of course, compilation options may change with the arrival of new versions of mod_perl and Apache however this section should still be a very good starting point together with the latest README and INSTALL files.
Correct configuration of an existing or newly compiled system is sure to be up for review prior to go-live and over time thereafter. The text's walk through approach to mod_perl and Apache configuration files and options is straight forward and clear. There is attention to detail throughout such as an example of setting 'taint checking' via the httpd.conf directive 'PerlTaintCheck on'. Further evidence of the book's practical approach is an explanation of how, when a first configuration has been implemented into a production environment, the 'fear of changing' this and potentially breaking service can be avoided by the use of methods such as 'apachectl configtest'.
The day to day care of mod_perl system gets a chapter all of it's own, discussing start-up, shut-down, log file rotation and all that would be good for a sys-admin to read and digest.
Chapter 6 'Coding with mod_perl in mind' claims to be 'the most important chapter' and with this the reader would likely agree. The usual considerations such as the correct use of global variables, use of 'strict', correct use of scoping and modular implementation are all here. There are more goodies to be found such as an introduction to debugging with Apache::DB where poorly implemented mod_perl scripts that are misbehaving can be more simply debugged by having their activity logged to a text file. The section dealing with how to make the jump to using 'Apache Handlers' from a CGI.pm centred application is to me a primary reason for saying 'no' to the above 'is this all I need to know?' question.
mod_perl Performance, is also illustrative of the text's practical approach to mod_perl, wherein facts are backed up with 'investigative details'. Not just the usage of say, 'Benchmark' module is here but also example outputs together with explanations. Some may have stretched just this section to another book but our authors give us this as part of the whole.
Simply porting to mod_perl will gain significant speed increases but the reader is inspired to push performance further than just the initial gains. The example of 'requests per second' against 'max clients' should not only start us on the road to benchmarking performance but also justifying current and further investments of development time and hardware.
TMTOWTDI - Chapter 13 is a title that I like.
'There's more than one way to do it' can be misapplied in the real world IMO and could thus be extended to include 'but some ways are silly, others less so and yet some more sensible'. It is true to say that there must be trade-offs dependent on a given situation.
There are no nonsensical ideas purported by Stas and Eric but the balance between what is faster for a particular application and what may be easier/more familiar to code is reasonably argued. Apache::Registry .vs. 'Pure Perl handlers' is a case in point.
Databases and mod_perl gets a look in but with not so much coverage as other topics. Perhaps this may be expanded on in a future release or is maybe already adequately covered by other texts.
Some of Part IV is not really pure mod_perl at all. It is simply encouraging the use of 'good Perl' in terms of best coding practice, style and method. If the reader had got to this point in the book and for some reason decided not to use mod_perl, the text's exploration of the former would be of value in any case.
Highlights of Debugging and Troubleshooting were topics such as :
This section brings out the key differences between the current and later version of Apache2 and mod_perl 2.0 but with a minor caveat. The reviewer did not find this section on 'mod_perl 2.0' as 'hands on' or at least 'practical' as the preceding sections were on Perl, mod_perl and the environment that these run in. This could well be because not so much emphasis was put onto mod_perl 2.0 at the time of writing as no doubt will become necessary as the march of time goes onward.
The appendixes add value for money in the form of a short 'cook book' approach to the use of modules for The Template Toolkit, AxKit, XML and what you should be looking for from ISPs that offer mod_perl.
It would be hard to pinpoint a 'best chapter' or 'section' but in the reviewers personal point of view, 'Part IV - Debugging and Trouble Shooting' is likely to be of immediate benefit as is often the case, sites get implemented in mod_perl without first measuring the true cost of testing and all the implications of writing with 'clean code'. Thus live sites need debugging NOW and this chapter has already been of interest / use in starting a strategy to correct flaws that have already slipped into production code.
The sections of the book (1 through 6) pretty much stand alone but do sequentially build on a body of knowledge from start to finish. It would be unfair to class this as a 'tree killer' (some texts of this size and typically by other press companies have a lot of 'filler' chapters that don't say or do a lot and seem to be there to justify their high shelf price). Despite its size, Practical mod_perl covers a lot of material, each sub-section is quite concise and uses a relatively short space and is presented in a 'practical' manner :).
The dollar price, at $50 is cost effective if you are using or thinking of using mod_perl to implement your web site. If you use Perl anyway for your web site, then really mod_perl is a logical progression to make and subsequently this text must become a 'must have' procurement at some point.
The reviewer is quite happy to purchase a mighty tome such as 'Practical mod_perl' but a somewhat trite criticism could be that the physical weight of this book could strain all but the less delicate wrists. In the wrong hands, the book would make a hefty paper weight or door stop. However in terms of 'pages for you buck' this should all be a plus. As mentioned above, perhaps Part III is a bit on the short side to warrant a section but eventual acceptance of 'mod_perl 2.0' as a base install on most platforms will likely trigger a revision of this text anyway, which may incidentally have more to say on the DBI front.
At present, it could be argued that this is likely still one of the best texts on mod_perl (covering both older versions of mod_perl and mod_perl 2.0) one can get.
- Jon Brookes, Oct 2003
We are one of the UK's largest Perl user groups, representing Birmingham UK to the international Perl community since 2000. We hold monthly social and technical presentations, and several of our members are now regular attendees and speakers at the YAPC::Europe Perl Conferences.
For further information about Birmingham.pm, please read our Frequently Asked Questions page.
For details about joining our mailing list, please Click Here for more details.
Ads provide by
The Perl Community AdServer
14 May - Brum.pm Social
28 May - Brum.pm Technical
11 Jun - Brum.pm Social
9 Jul - Brum.pm Social
23 Jul - Brum.pm Technical
13 Aug - Brum.pm Social
10 Sep - Brum.pm Social
24 Sep - Brum.pm Technical
8 Oct - Brum.pm Social
12 Nov - Brum.pm Social
26 Nov - Brum.pm Technical
10 Dec - Brum.pm Social
Download the Birmingham.pm ICalendar
or subscribe to our Google Calendar
Aberdeen Perl Mongers
Bath Perl Mongers
Birmingham Perl Mongers
Bristol Perl Mongers
Devon & Cornwall Perl Mongers
Edinburgh Perl Mongers
Glasgow Perl Mongers
London Perl Mongers
Milton Keynes Perl Mongers
North of England Perl Mongers
Nottingham Perl Mongers
Southampton Perl Mongers
Thames Valley Perl Mongers
• Linux System Programming
• Mastering Perl
• GIMP 2 for Photographers
• Minimal Perl
• Wicked Cool Perl Scripts
• Red Hat Linux 9 Unleashed
• IRC Hacks - 100 Industrial-Strength Tips & Tools
• eBay Hacks - 100 Industrial-Strength Tips & Tools
• Exploiting Software - How To Break Code
• Mac OS X Unleashed, 2nd Edition
* New Reviews
.. More Reviews