Tuesday, February 22, 2011

Advanced Perl Programming, Second Edition



Advanced Perl Programming, Second Edition
| 2005-06-28 00:00:00 | | 304 | Perl


With a worldwide community of users and more than a million dedicated programmers, Perl has proven to be the most effective language for the latest trends in computing and business.

Every programmer must keep up with the latest tools and techniques. This updated version of `Advanced Perl Programming` from O'Reilly gives you the essential knowledge of the modern Perl programmer. Whatever your current level of Perl expertise, this book will help you push your skills to the next level and become a more accomplished programmer.

O'Reilly's most high-level Perl tutorial to date, `Advanced Perl Programming,` Second Edition teaches you all the complex techniques for production-ready Perl programs. This completely updated guide clearly explains concepts such as introspection, overriding built-ins, extending Perl's object-oriented model, and testing your code for greater stability.

Other topics include:

Complex data structures

Parsing

Templating toolkits

Working with natural language data

Unicode

Interaction with C and other languages

In addition, this guide demystifies once complex topics like object-relational mapping and event-based development-arming you with everything you need to completely upgrade your skills.

Praise for the Second Edition:

`Sometimes the biggest hurdle to problem solving isn't the subject itself but rather the sheer number of modules Perl provides. `Advanced Perl Programming` walks you through Perl's TMTOWTDI (`There's More Than One Way To Do It`) forest, explaining and comparing the best modules for each task so you can intelligently apply them in a variety of situations.` --Rocco Caputo, lead developer of POE

`It has beensaid that sufficiently advanced Perl code is indistinguishable from magic. This book of spells goes a long way to unlocking those secrets. It has the power to transform the most humble programmer into a Perl wizard.` --Andy Wardley

`The information here isn't theoretical. It presents tools and techniques for solving real problems cleanly and elegantly.` --Curtis 'Ovid' Poe

` `Advanced Perl Programming` collects hard-earned knowledge from some of the best programmers in the Perl community, and explains it in a way that even novices can apply immediately.` --chromatic, Editor of Perl.com

User review
more a guide to CPAN than to the Perl language
In his preface to Advanced Perl Programming, 2nd Edition, Simon Cozens says that the focus in Perl programming has shifted, since the first edition, from techniques to resources. Rather than write really good new code, authors rely on the CPAN to find existing code and use that to solve the unoriginal parts of their problems. To cater to the discerning Perl programmer, then, the book has been completely rewritten. Instead of covering the parts of the Perl programming language that are often unexploited by more novice hackers, APP2 focuses on providing an overview of some of the major solved problems in Perl, and the modules that provide some of the solutions.


Only Chapter 1, `Advanced Techniques,` bears much resemblance to the previous edition of APP. It covers subject matter closer to the language than to the modules involved: globs, CORE::, objects, B, and compilation. Each subsequent chapters discusses a common programming problem, shows off a few existing solutions (in the form of code on the CPAN), and sometimes demonstrates how to put those existing solutions to use. Among the topics covered are parsing, templating, serialization, unicode, and testing. POE, Inline, and Acme also get a chapter each.


Simon's writing is, as always, lucid and easy to follow. He provides good example problems, and he builds solutions that tend to do a good job of selling the modules on display. I must admit to feeling compelled to go do more with POE and some of the Lingua:: tools, after finishing their respective chapters.


In the end, though, I felt unfulfilled. While APP1 was not one of O'Reilly's best Perl books, it delivered what it promised: advanced techniques for writing Perl code. What APP2 delivers is a guide to avoiding the need for advanced techniques. It will save you from needing to use the strangest bits of Perl, not show you how. (The back cover quotes Andy Wardley as saying, `This book of spells goes a long way to unlocking those secrets [of advanced Perl code.]` I think, rather, that it just teaches the incantations.)


Perhaps my disappointment is predicated entirely on my incorrect expectations. If this book had been called `Leveraging the CPAN,` I'd probably consider it a great success. You may, instead, be interested in Intermediate Perl or Mastering Perl.

User review
A very different beast to the first edition
As other reviewers have noted, there's not a whole lot in common with the first edition of this book, either in feel or content. It's rather questionable whether this merits being called a second edition. Something like 'Problem solving with CPAN' would be a more accurate title (then again, perhaps it's just as well I don't work in the publishing industry).


It does still cover some of the material of the first edition, such as globs, closures, AUTOLOAD, the Perl class model, and some Perl internals, but it's all been compressed into one chapter.


The other chapters discuss various subjects using CPAN modules and gives some insight into how the material from the first chapter was used to solve these problems. A wide variety of issues are discussed, including serialization and object relational mapping, natural language parsing, templating and unicode. Some superficially similar material could be found in Perl Cookbook, but the discussion here is deeper (and more up to date), there's very little overlap.


Exactly how much you get out of the book will probably be dependent on how well you know the innards of CPAN and how interesting you find the topics. I liked the parsing and natural language processing chapters a lot, and the chapter on inlining code from other languages was diverting; conversely, I can't bring myself to find Unicode even remotely stimulating, and the POE (some sort of event-based framework) chapter didn't do much for me. The testing chapter is a solid addition to the material in Intermediate Perl, and I picked up some pointers to modules to check out, but it didn't feel all that advanced.


This is a book that fits in quite nicely with Intermediate Perl and Programming Perl -- it cleans up a few niggling details not well discussed in the former book, without having the intimidating heft of the latter, and also provides a wide ranging overview of several topics and the CPAN solutions for them. As such, it will bring an intermediate programmer up a few notches.


Already advanced Perl programmers may be disappointed, and those hoping for an updated version of the first edition will definitely be out of luck, but if you know what you're getting, and evaluate it on those terms, rather than what the title suggests, I think you'll enjoy it.

User review
Very disappointing
This book was slated to come out for a long time before it actually did, and I naturally assumed that Simon was working on something ambitious and that it was taking him longer than he planned. I bought it sight-unseen, but quickly discovered it was more of a tour of CPAN than an in-depth book deserving of the title Advanced Perl Programming. I know from his blog that Simon was wrapping up his life to go be a missionary in Japan, so now I think the book was late because he was working on *that* project after he had agreed to write this book. Just speculation.


It reads more like an article on Perl.com or in the Perl Journal, and could easily have been several articles spread out over a few months. I have to wonder if he started the book with the idea that `advanced` means `knowing about useful modules on CPAN` or if the idea came to him sometime after it was clear the book was running late.


Regardless, consider looking at it if you see it in the store. It's not without its value, but I can't see paying for a book that mostly says, `Here's someone else's work to check out.` An advanced book ought to be getting into -- well -- advanced techniques, useful info that's hard to come by, something that isn't ALREADY AVAILABLE ELSEWHERE.

User review
First edition is what you want, not this one.
The book is a big disappointment. I picked this book because I had bought the first version few years back and looked for an upgrade. It turns out to be a new book - from content, style, to author. For instance, the 'template tools' chapter is just a recite of the man pages, accompanied with poor examples, and explanation is less than helpful.

User review
`Second Edition`? Should be `Volume 2`!
Review: Advanced Perl Programming


The First Edition of this book is one of my favorite books. For an example of why, it explained anonymous structures clearer than anyplace else I had seen. I have re-read it several times, learning something new with each reading. If you have gotten through `Learning Perl`, and want to become an advanced Perl programmer, get yourself a copy of the First Edition.


Why is this book is the `Second Edition` of anything? It bears no resemblance at all to the First Edition. It has a different author, which is the first red flag. Looking inside, we find that all the chapters have different titles, and there is no topic discussed in one book that is discussed in the other. Most of what is in the First Edition is still valid Perl, and important information for a Perl programmer to know. Within a few minutes of learning this Second Edition had been published, I ordered it, based on my love of the First Edition. If I had spent any time looking through it, I probably wouldn't have bought it.


This book covers advanced Perl constructs and topics, but those much less useful to the average `another Perl hacker`. It is interesting to know some of the stuff in the 2E, perhaps from an academic perspective, but there is none of the, `Wow, I'm going to use this every day` feeling that I got with the 1E.


To be fair, this book is well written, and clearly explains some things I've `always wondered about`. There are several topics covered that I wish had been covered in more depth. For example, there is exactly one sentence about Inline::Java. But, I am glad that I bought it, and will put it on my shelf next to the First Edition. In thinking about it, I would say that this book should have been called, `Advanced Perl Programming, Volume 2` (with two panthers on the front?) Meanwhile, it is true that Sriram's First Edition could use some updating. After Perl 6 is released?


Download this book!

Free Ebooks Download