Intermediate Perl
reviewed by Jonathan Hoyle
Authors: Randal L. Schwartz, brian de Foy, Tom Phoenix O'Reilly http://www.oreilly.com/catalog/intermediateperl/index.html Published: March 8, 2006å $39.95 USD, $56 CAD, £28.50 GBP, 34€ EUR Pages: 278 ISBN: 0596102062 Audience: Intermediate Perl programmers. Strengths: Nice bite-size chapters, which can be read nearly independently. Weakness: Very few charts or graphics. |
|
As one might tell by the fact that the same llama graces the cover, Intermediate Perl is a retitled 2nd edition of longer named Learning Perl Objects, References & Modules from 2003. Randal Schwartz and Tom Phoenix are are back again, with the added brian de foy (yes, he spells his name in lowercase letters). In this 2nd edition, chapter organization has been modified slightly, but it is substantially a replacement of the former title.
Intermediate Perl is a follow-on to Learning Perl, also known as the llama book, a classic introduction to the Perl language. Intermediate Perl carries the reader forward with more advanced topics, particularly useful for web developers wishing to become more proficient in their programming. After a brief introduction in the opening chapter, things kick off quickly with Chapter 2's Intermediate Foundations, one of the new chapters added for this edition. It is a very nice quick overview of list operators, filtering with grep, using maps to handle lists, and the very powerful eval() function. (For those coming to Perl from compiled languages like C++, eval() will be quite the surprising power feature.) Chapter 3's Using Modules is expanded from the first edition, covering the various interfaces, CPAN (the Comprehensive Perl Archive Network), path settings, and the always tricky module dependencies.
Chapters 4 and 5 are excellent reviews of the concept of references and scoping, their relationship in arrays, nested data structures and anonymous hashes. This is an example where the more advanced nature of the material comes in view: whereas the beginner will not care about reference counting, simply relying on its working, the intermediate programmer will find he needs to understand it properly to do his job. The next chapters cover complex data structures, subroutines and filehandles, all things familiar to programmers of other languages, but useful for those needing to understand their implementation in Perl.
The book becomes very interesting beginning with Chapter 9's Practical Reference Tricks and Chapter 10's Building Larger Programs, as sorting, recursion and namespace collisions are addressed. The next four chapter are essentially an introduction to object oriented Perl, the power of coding this way, and the cleanness and reusability of such code. Chapter 15 and 16's Exporting and Distribution chapters are arguably advanced, not intermediate, but they do flow nicely from the previous material. Chapter 17's Essentially Testing and Chapter 18's Advanced Testing (the latter being a new chapter with this edition) brings home the point that testing is an integral part of development. Most programming books today treat testing as a separate concept, or roll it into debugging, but the authors here do a good job defining what good testing is and is not. The book concludes with Chapter 19's Contributing to CPAN, a call to programmers to remember to give back to the Perl community.
Overall, this is an excellent read, and a perfect companion for those who crave more after Learning Perl. Intermediate Perl nicely flows into another O'Reilly publication Perl Best Practices, which is also a recommended read for intermediate programmers.