ASPit - Totally ASP
Search PHPit

Use this textbox to search all the content on PHPit. Seperate keywords with a space.

  • Web Hosting Services
  • Consumer Electronics
  • Wholesale Candle, Burning, Perfume Oils
  • Washington State Realty
  • Warszawa, praca, randki, aukcje, hotele

Learning Perl Objects, References & Modules

Medium Thumbnail

Book Details

Availability: Usually ships in 24 hours
List Price: $34.95
Our Price: $23.07
You Save: $11.88 (34%)

Buy through

Spotlight Customer Reviews

Average Customer Rating: 4.71

Customer Rating: 4
Summary: Difficult on chapter 4 but fun
Comment: 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.

Customer Rating: 5
Summary: Great book for beginners and pros
Comment: 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 :)

Customer Rating: 5
Summary: Perfect book for taking your Perl skills to the next level
Comment: 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'?