mod_perl lies firmly at the intersection of Apache and Perl. It contains the combined strengths (and alas, weaknesses) of each system. Luckily the two go great together and make a very powerful and compelling platform for developing commercial grade Web applications.
People with just a cursory knowledge of mod_perl will tell you that mod_perl is simply faster CGI. Although this is certainly a benefit of the interface, it is hardly its most interesting or powerful facet. mod_perl offers a Perl interface to the Apache API. Before mod_perl, the only way to extend or interface with Apache was to write C extension modules, which, while offering high performance, made creating full-scale Web applications difficult. With mod_perl, developers can now harness the power of the full Apache API with Perl, a language designed for flexibility, and develop Web applications quickly, without sacrificing performance.
Day-to-day mod_perl development consists, to some degree, of figuring out how to do something that someone else has already mapped out. One of the benefits of open-source programming is that if you keep up with the latest mailing lists, newsgroups, and online periodicals, you do not have to struggle over the same four or five lines of idiomatic code that someone else is already willing to share with you. Unfortunately, gleaning all that can be obtained from these sources without spending an inordinate amount of time doing so is practically impossible.
This book is a practical, hands-on guide that shows you how to exploit the power of mod_perl. Most of our recipes explore a particular problem by providing a working, real-world solution. Some examples are quite simple. Others are rather involved,and might take some time and thought to digest in their entirety. In either case, this book tries to present the material in an accessible, logical order such that you can either use it as a reference book or as an aid to begin "thinking in mod_perl."
We hope that some of our ideas and code end up in the design and implementation of your own systems.