Paul Barry lectures at the Institute of Technology, Carlow in Ireland. He is the author of two textbooks that use Perl and can be contacted at firstname.lastname@example.org.
Advanced Perl Programming, 2nd Edition
by Simon Cozens
Published by O'Reilly Media, Inc., June 2005.
My list of things to look at in the Perl world is forever growing. A web
or print article catches my eye and I make a mental note to take a
closer look at whatever interesting technology is being discussed. Of
course, I never do, as there's always something else that needs doing, so my
list seems to grow and grow. Until recently, that is. Thanks to the
publication of the second edition of O'Reilly's "Advanced Perl
Programming," by Simon Cozens, I've been able to scrub a good few items
off my list, including stuff like templating systems, the
Parse::RecDescent module, POE and Unicode.
Simon Cozens is well known in the Perl community and in the pages of TPJ. It appears that another famous Perl guru, Nathan Torkington, is to be blamed for twisting Simon's very busy arm to do the second edition of one of Perl's oldest texts. And it's very much a rewrite, not a revamp. Appearing just under eight years after the original text, the second edition is a very modern tour of the advanced features of Perl and a detailed exploration of parts of the single largest reason most of us program in the language: the CPAN. In addition to covering those topics from my list, there's material on testing techniques, natural language processing, Inline extensions, persistent databases & object technologies, introspection and having "advanced fun" with Perl (which includes Simon's take on obfuscation contests, JAPH, golf and poetry).
In just 270 pages, Simon takes the reader on a tour of what he feels you need to know to become an advanced programmer of Perl. And those 270 pages are packed full of well written and thoroughly researched material. Howeverfor methings got off to a shaky start as I found Chapter 1 on "Advanced Techniques" heavy going. By the time I got to page 7, my brain was telling me that it didn't like what it was seeing. What made the first chapter daunting was that the material presented wasn't going in on a first reading and at more than one point Simon stressed that the material in Chapter 1 was what "everything else was built on." So, I worried my reading would grind to a halt while I struggled through the early material. Then it struck me. This is not a book that you read, it's a book that you study. Merely reading Simon's book is not enough. This book needs to be studied, both closely and carefully.
With my changed mindset installed, I was able to work trough the early material successfully, and I'm pleased to report that the rest of the book can be studiedfor the most partin isolation from the first chapter's advanced material. In fact, I'd suggest that each of the chapters can pretty much stand on their own as a separate entity, as each presents a single topic area and then covers the relevant material in some detail. Throughout, there's an emphasis on referring to and quoting code from a selection of the best CPAN modules that relate to the matter at hand. What binds the book's chapters together is Simon's stated goal of covering the advanced techniques that are at work within the examples cited, as well as his commentary on what does and does not work within a particular application setting.
Is this a book every Perl programmer should work through? Eventually, yes. Certainly, if you are a CPAN module author, this is a book you need as it's coverage of the best that the CPAN has to offer is a very worthwhile read. If you are looking to take your knowledge of Perl to a higher level, then this is also a book for you. Just be prepared to find some of the material heavy going, especially Chapter 1. Chapter 10, on having fun with Perl, will probably blow your mind, too. If you are new to the language, give this book a miss until you are comfortable with the material in Programming Perl.
So, has the second edition of Advanced Perl Programming magically turned me into an advanced programmer of Perl? Not yet. However, it has told me what I need to do and pointed me firmly in the right direction. It is a book that I intend to refer to often.