Not Magic (Perhaps), but the Key to Unlocking Advanced Perl Skills

by Simon Cozens

[amazon_link asins=’0596004567′ template=’ProductAd’ store=’orahome-21′ marketplace=’UK’ link_id=’55d7bd9c-bcd8-11e8-9f01-cf10e0cf27e7′]

ISBN: 0596004567

Pages: 281

Publisher: O’Reilly

Topic: Perl

Buy Now from Amazon

Once you’ve read a good Perl book–the Camel Book, for instance
(“Programming Perl”)–or any other good tutorial, you know almost all of the
language. Some Perl programmers may react with dismay at Simon Cozens’s
observation in the new edition of “Advanced Perl Programming” (O’Reilly, Second Edition), “There are no secret keywords, no other magic sigils that turn on Perl’s advanced mode and reveal hidden features,” he admits. “In one sense, this book is not going to tell you anything new about the Perl language.”

What, then, lies ahead for Perl programmers? Is it a matter of “See Rome and die?” Not according to Cozens. “I used to be a student of music,” he says.
“Music is very simple. There are 12 possible notes in the scale of Western
music, although some of the most wonderful melodies in the world only use, at most, eight of them. There are around four different durations of a note used in common melodies.” As Cozens points out, there isn’t a massive musical vocabulary to choose from, and yet music has been around a great deal longer than Perl.

“I’ve said that there are no secret switches to turn on advanced features in
Perl,” Cozens further explains. “This means that everyone starts on a level
playing field, in just the same way that Johann Sebastian Bach and a little kid
playing with a xylophone have precisely the same raw materials to work with. The
key to producing advanced Perl–or advanced music–depends on two things:
knowledge of techniques and experience of what works and what doesn’t.”

The new edition of “Advanced Perl Programming” aims to give readers some of each of these things. The book was written not for advanced Perl programmers, but for any Perl programmer who would like to become a better Perl programmer. It
covers all the complex techniques for production-ready Perl programs, clearly
explaining concepts such as introspection, overriding built-ins, extending Perl’s object-oriented module, and testing code for great stability. Other
topics include parsing, templating tools, Unicode, interaction with C and
other languages, and working with natural language data. In addition,
this guide demystifies topics such as object-relational mapping and
event-based development. As Cozens notes, “The variety of topics covered in the book means there’s going to be something for every programmer here.”

Some programmers may question why a new edition of “Advanced Perl Programming” is necessary, considering that the language itself has not changed dramatically in recent years. As Cozens explains, there’s unquestionably a necessity for the new book. “The first edition of ‘Advanced Perl Programming’ has long been a mainstay for Perl programmers attempting to further their skills, but unfortunately it hasn’t caught up with the developments in Perl over the past five years,” says Cozens. “Specifically, the focus of development has shifted from writing complicated code yourself to using other people’s complicated code available from CPAN. So advanced Perl programming has changed in its nature, and I wanted to update the book to reflect that.

“My hope is that readers will discover that someone has already done the hard
work for them; that there’s a huge collection of ready-made modules out there, and at least one of them will apply to whatever they’re trying to do. Maybe my book won’t give them the exact answer they need, but it will hopefully open their eyes to where to find the answers.”

Perl programmers looking for a magic switch to turn on advanced skills will come up empty-handed, but “Advanced Perl Programming, Second Edition” will help push their skills to the next level to become more accomplished programmers.

Early praise for “Advanced Perl Programming”:

“Simon Cozens notes that once you know the syntax there’s no more Perl to learn.
In this book, he shares advanced techniques for applying the Perl you (mostly) already know… It’s a shame for the Perl community that Simon’s moved on to other things, but this book is a fine legacy from which the rest of us can try
to live up to his standards.”
–Smylers, The Perl Review

“It has been said 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

Table of Contents

1. Advanced Techniques
Messing with the Class Model
Unexpected Code
2. Parsing Techniques
Parse::RecDescent Grammars
Other Parsing Techniques
3. Templating Tools
Formats and Text::Autoformat
Template Toolkit
4. Objects, Databases, and Applications
Beyond Flat Files
Object Serialization
Object Databases
Database Abstraction
Practical Uses in Web Applications
5. Natural Language Tools
Perl and Natural Languages
Handling English Text
Modules for Parsing English
Categorization and Extraction
6. Perl and Unicode
What Is Unicode?
Unicode Transformation Formats
Handling UTF-8 Data
Unicode for XS Authors
7. POE
Programming in an Event-Driven Environment
Top-Level Pieces: Components
8. Testing
Keeping Tests and Code Together
Unit Tests
9. Inline Extensions
Simple Inline::C
More Complex Tasks with Inline::C
Inline:: Everything Else
10. Fun with Perl
Just Another Perl Hacker
Perl Golf
Perl Poetry

Advanced Perl Programming Second Edition