From the book lists at Adware Report:

All information current as of 19:05:49 Pacific Time, Monday, 21 February 2005.

Learning Perl Objects, References & Modules

   by Randal L. Schwartz / Tom Phoenix

    06 June, 2003


   Usually ships in 24 hours

Click the button below to . . .

(which will add the book to your Amazon U.S.A. "Shopping Cart")

. . . or use your browser's Back button to return to the search-list page.

Editorial description(s):

Book Description
Learning Perl Objects, References & Modules offers a gentle but thorough introduction to advanced programming in Perl. Written by the authors of the best-selling Learning Perl, this book picks up where that book left off. Topics include:
Following the successful format of Learning Perl, each chapter in the book is designed to be small enough to be read in just an hour or two, ending with a series of exercises to help you practice what you've learned. To use the book, you just need to be familiar with the material in Learning Perl and have ambition to go further. Perl is a different language to different people. It is a quick scripting tool for some, and a fully-featured object-oriented language for others. It is used for everything from performing quick global replacements on text files, to crunching huge, complex sets of scientific data that take weeks to process. Perl is what you make of it. But regardless of what you use Perl for, this book helps you do it more effectively, efficiently, and elegantly.

Reader review(s):

Perfect book for taking your Perl skills to the next level, September 3, 2003
In the world of Perl there was once only the 'camel book,' held in perhaps as much reverence as 'K & R' among C programmers. It certainly appealed to roughly the same audience, those who wanted a short, sharp introduction to a programming language. It was with a problem that needed solving and a copy of the camel book that I started as a Perl programmer.

Then for those that wanted a introduction to Perl and programming Randal L. Schwartz wrote Learning Perl, a book that has arguably become the definitive textbook for teaching Perl. The one weakness was that it left off before really getting to the guts of building large, complex projects in Perl. It did not cover classes, objects, breaking your code up into pieces or the more arcane aspects of variables, references. For this we had to resort to the last few chapters of the 'camel book' and I, for one, have never really been totally comfortable at this end of the language; when I'm reading someone else's code it might take a couple of reads to fully understand the process.

Now this weakness has been well and truly addressed. Schwartz, with Tom Phoenix, has written "Learning Perl Objects, References & Modules", a volume that takes the same steady approach to teaching you the more advanced topics as the earlier 'Learning Perl'. Schwartz has spent the years since writing 'Learning Perl' teaching and writing. You can tell, this is a superbly written book, not that 'Learning Perl' wasn't well written; it's just that this volume is far better.

The Guts

The book starts with a chapter on building larger programs that covers @INC, eval, do and require before discussing packages and scope. It then has several chapters on references that explains in well understandable fashion and increasing complexity all the ins and outs of references including dereferencing, nested references, references to subroutines and references to anonymous data before a final chapter on references that gives you some incredibly useful tricks such as sorting and recursively defining complex data.

The book continues with three chapters that give you a solid grounding in Perl objects. Here Schwartz has assumed that you know at least a little about object oriented programming, some may feel the need for more explanation of concepts might be required, but if you've had any experience in OOP before then the clear examples and descriptions here are probably all you want.

Modules are not as well covered, with only a single chapter, but it is hard to think of anything left out, it covers using them and building your own so well that it left me wondering what all the fuss was about, "seems obvious to me." The book concludes with chapters on building a distribution out of your module, testing it using make test (with Test::Harness), Test::Simple and Test::More before a chapter telling you how to contribute to CPAN.

Each chapter of the book concludes with a number of small exercises, designed to be done in just a few minutes, that cement the learning of the previous chapter. The answers to these are at the end of the book.


Once I'd finished I felt I had a much more solid grounding in Perl, certainly I was much better able to understand another programmer's code that dealt with such things as subroutine references and some complex data structures. While the subject matter of this book is almost entirely covered in 'Programming Perl' the tutorial aspects of this book made it much easier going. The style would be familiar to anyone who has read 'Learning Perl', light without being frivolous and extremely well written, Schwartz seems a master at reducing complexity to manageable bites.

This book is deceptively easy to follow, each new idea built onto earlier ones, each new language concept introduced in an easy manner. The writing is excellent, it's hard to explain why I appreciated it so much. That may be the reason, the writing isn't forced or heavy or too light or obvious. It just allows the solid material of the book to shine through. Go to the ubiquitous O'Reilly website and grab the example chapter (the site also has a few Errata, the Table of Contents and the code from the book) and give it a look.

I think this may well become a classic, I may well in ten years time talk of Schwartz's books with the same awe I now talk of Brian Kernighan's. I'll certainly eagerly await his next book and keep this one close until it comes. Oh, and Randal, how about 'Software Tools for Perl Programmers'?

Learning more Perl (sequel to "Learning Perl"), June 23, 2003
"Learning Perl Objects, References and Modules " is the sequel to "Learning Perl". It starts of where "Learning Perl" finished. In "Learning Perl" I learned how to write Perl programs. In "Learning Perl Objects" I learned how to write better and bigger Perl programs. The audience of this book is the advanced Perl Programmer that wants to improve his Perl knowledge in the area of OO programming.

If you want to use Perl's OO functions, you have to know a lot about references and modules / packages (an OO package is just a normal package that is called in OO fashion). The first couple of chapters (chapter 1-7) talk about these basics of Perl OO programming that can (and should) be used even without using OO. I love chapter 5 about complex data structures. The chapters 8-11 describe the Perl OO implementation. Further Meta information about how to program packages, CPAN and testing is provided in the chapters 12-15.

The setup of the book is didactically very good and the nicely "incremental". You can see that the authors developed this book out of courses that they have held and improved for a long time. Because the book provides a nice stepwise introduction into the subject, one should read it from beginning to end. To really practice the newly learned skills, Tom and Randal provide some example exercises (with solutions in the appendix) at the end of every chapter.

Although I am not a native English speaker, I found the book very readable and humorous. Again this is another O'Reilly book that presents a possibly dry subject in a very accessible way. Even though the explanations are very good, be prepared to read some chapters twice (or more) to get your "aha" moment.

Coming from a C++ background I still find it strange that Perl needs so little additional syntax for OO programming. This has of course some (little) disadvantages. Some things like calling abstract methods and class methods (or rather errors calling these methods) are not enforced at compile time but can be enforced at runtime (if you want). Tom and Randal explain this in their book of course (and hopefully I will not forget to implement this in my modules).

There is one great downside of this book: I would have loved it to be longer. This book has about 180 effective pages (plus appendix, index, foreword), which makes it a rather fast read compared to some of the "normal" IT brick stones.

"Learning Perl Objects" is an extraordinary good introductory book into advanced Perl programming with references, modules and objects. If you have liked "Learning Perl" and you want to proceed on your path to Perl mastery, you will love this book.

Good for intermediate perl programmers, July 17, 2003
To me, this book seemed like two books:

1) Shared Libraries, References, Data Structures, Scoping, and other things in perl. -- For internmediate programmers.

2) OO Perl, Distributions, and Testing in Perl - Step-by-Step - For advnaced perl programmers who aspire to be wizards.

For me, part 1 was mostly review. Part 2 is good schtuff, but it's not very deep. You could call it "a gentle introduction to OO"

My conclusion: The earlier in your career you read this book, the better. If the topics in #1 or #2 are "new" to you, go buy the book. Seriously. The comments on h2xs and the design patterns that schwartz sets up -alone- make it worth the price.

perl book you should/must get, July 16, 2003
perl must-have's:

- camel,
- Hall/Schwartz: effective
- Friedl: Reg Ex


- Conway OO Perl (all 4 Manning perl titles are superb)
- Brown debuggin perl OR scott/wright Perl debugged
- Learning Python & Ruby pickax (so you know what's out there)

I'm not sure which list this fits on, but it'll save you a huge amount of time learning 3 topics over deciphering camel or Perl in Nutshell. Conway ties for best OO intro ever (w/Booch, of ~8 books I've looked at) This book is more of a survey of OO, data structs & mods in familiar llama style: Hand-holding at first, then they accelerate & things get dense pretty quick. Just enough example code to illustrate, there's no big app that gets worked up thru the book. So if you wanna master perl obj model, and approach problems w/tools like java, scheme, & (ahem) python/ruby developers have, get both books.

And ask OReilly to put this on the next update of PERL CD bookshelf.

A Fabulous Sequel to 'Learning Perl', July 11, 2003
Merlyn (as Randal Schwartz is known in Perl circles) is a fantastic author, and has written some of the most influential books on Perl available. For this book, he teamed up with his buddy and co-worker Tom Phoenix, who is another Perl luminary.

Picking up where they left off with their book 'Learning Perl' Randal and Tom plunge ahead into more advanced topics in Perl, giving you the reader in-depth knowledge in how to take Perl from small projects into large.

The writing is humorous, and easy to read, the examples are top-notch, and the knowledge is spot on.

If you're already familiar with Perl, and you're looking to take the next step forward, this is the book for you.

Kudos to the authors.

Review of Learning Perl Objects, References and Modules, September 30, 2004
Last Fall I attended a session on object oriented programming with Objective-C. When discussing various languages with object oriented capabilities, the speaker remarked, "Don't even talk to me about Perl." Many people feel that way about Perl without even having to talk about object oriented programming.

Randall Schwartz and Tom Phoenix, the authors of the Perl primer "Learning Perl", take on the task of talking about Perl and object oriented programming. Since Perl does not have object orientation as its principal structure, they have a significant task to pull off.

In the Foreword of "Learning Perl Objects, References and Modules" Damian Conway draws attention to Perl's particular magic in implementing object oriented programming: "[Perl] takes a collection of Perl's existing non-OO features...and then--with nothing up its sleeve--manages to conjure up fully functional objects, classes and methods."

This particular nature of Perl shows up in the nature of the book's content. "Learning Perl Objects, References and Modules" is not about why or when to use object oriented programming in Perl. It is about how to magically turn references and anonymous data structures into object oriented programming. In that way, it is more of a tactical book than a strategic book. The history and concepts behind object oriented programming are touched on only lightly in its 180 pages; however, the book follows a steady progression to the goal of making and distributing Perl modules.

Eagerly anticipating the publication of the book, I bought it as soon as it was available. I reaped immediate benefit from the first few chapters as they demonstrated how to accomplish the goals I had for a project that I was working on. I lost interest shortly after chapter 4. The book has sat on my coffee table for most of the last year. I paused for a great deal partly due to the vagueries of my personal life, but partly due to the odd pacing of the book. Without being able to give explicit examples, I can say that the book feels like a first edition.

The book seems squarely targeted at a point between "Learning Perl" and "Advanced Perl Programming." And that's where I'm at. It certainly has helped me develop the ability to use more complex data structures in my Perl programs. However, it is not a thorough discussion on object oriented programming. If you've grown beyond "Learning Perl", you may find "Learning Perl Objects, References and Modules" worth talking about.

Definitely a Great Addition to any Perl Library, December 22, 2004
This book is great for just learning about OO concepts and their related functioning in Perl. Most of the other important Perl texts are very large and tend to summarize many concepts. This text takes Perl OO concepts and presents them in a very interesting and helpful format that is easy to follow. Perl is more than just a scripting language and this text helps you to understand this language from a different prospective.

disenting opinion, November 5, 2004
I don't know why it is so hard to get a decent book on Perl. Every author seems to have a weird idea on how to present material. Perl programmers often seem to be devoted to the culture and celebrities of Perl. Randal Schwartz is perhaps the best of Perl authors.

This is a decent book but I don't particularly like the style. He teaches by example, ie he walks through an example, once you have understood this useless example he introduces a new point and you are supposed to have your interest raised and leap into the instruction part enthusiastically. Personally I don't like this style, give me the facts and *follow* up with examples. I don't want to waste my time wadding through a story that I can forget in 5 minutes, it also makes reviewing the material difficult.

Having said that the examples are good. Many books get very abstract and terse. Gilligan and his boat and coconuts is easier to relate to 'foo' which is a pointer to a scalar called 'bar'.

You need to sit down quietly and spend time reading this. I am a harried administrator and I don't have much time.

Great book for beginners and pros, February 3, 2004
This book does a great job on helping you grasp the concepts of objects and oop related concepts. I already know perl well, and use daily as part of my job. But I'm so used to procedural programming that I sometimes forget the details about oop. This book helps remind me about oop, and I try to use the examples here when coding new stuff :)

Difficult on chapter 4 but fun, June 25, 2004
I wanted to learn about Perl objects and this book is not for me. I need an easier book for me (thats just me)
I cant study the material at all once I got to Chapter 4.
I feel degraded and stupid because I read all the good reviews.
The examples are good until Chapter 4. After that the code is fun to read and learning is not all hard with just some effort. Very scary indeed though on Chapter 4! I think most of the readers here have already a C background.
Its not the book is bad but very strange indeed on Chapter 4.
The part where the author talks about auto vivication is very strange because there is no mention of how you should analyze the data nor any code example. I got scared and have lost my confidence trying to learn perl. I honestly just dont like
Chapter 4; and all the time I have tried to decipher what the author is trying to teach. I just love to waste my time when Im not working and sitting here for 5 hours trying to figure out the example, however the book is to be read and Im sure I'll figure out the difficulties! So take time to read this book. Those are just the examples I found that I did not appreciate.

{end of page}

(Page code from the SEO Tools, Toys, and Packages site)