BUY THIS BOOK

Safari Books Online

What is this?

Looking to Reprint this content?

Learning Perl Objects, References, and Modules

By Randal L. Schwartz
With Tom Phoenix
First Edition  June 2003 
Pages: 224
ISBN 10: 0-596-00478-8 | ISBN 13: 9780596004781
starstarstarstarstar (Average of 2 Customer Reviews)

This book has been updated—the edition you're requesting is OUT OF PRINT. Please visit the catalog page of the latest edition.

The latest edition is also available on Safari Books Online.

Book description

Learning Perl Objects, References & Modules picks up where Learning Perl leaves off. This new book offers a gentle introduction to the world of references, object-oriented programming, and the use of Perl modules that form the backbone of any effective Perl program. 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. Each chapter ends with a series of exercises to help you practice what you've learned with answers in an appendix for your reference. In short, this book covers everything that separates the Perl dabbler from the Perl programmer.
Full Description

Perl is a versatile, powerful programming language used in a variety of disciplines, ranging from system administration to web programming to database manipulation. One slogan of Perl is that it makes easy things easy and hard things possible. This book is about making the leap from the easy things to the hard ones. 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:
  • Packages and namespaces
  • References and scoping
  • Manipulating complex data structures
  • Object-oriented programming
  • Writing and using modules
  • Contributing to CPAN
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. Learning Perl Objects, References & Modules is about learning to use Perl as a programming language, and not just a scripting language. This is the book that separates the Perl dabbler from the Perl programmer.

Browse within this book

Cover | Table of Contents | Colophon




Featured customer reviews

Write a Review


Review of Learning Perl Objects, References and Modules,  September 29 2004
Rating: StarStarStarStarStar
Submitted by Joshua Wait   [Respond | View]

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.


Learning Perl Objects, References & Modules Review,  September 24 2003
Rating: StarStarStarStarStar
Submitted by Shawn Carroll   [Respond | View]

The first book you picked up to learn Perl probably had a llama on its cover. You then picked up the camel book to continue your education. There was a gap though between those two books, an introduction to object orientated perl was missing. Well, Randal has now written the prefect bridging book in Learning Perl Objects, References & Modules(LPORM). This book should be on your shelf if your new to perl, or even if you've used perl for the past years only for short scripts. LPORM will move your perl from scripts to programs.

After an introductory chapter, Schwartz jumps right into making your perl programs better. By using seven castaways from a three hour tour, we learn the basics of refactoring and module usage. The next three chapters gently introduce references and advanced data structures. The difference in these five chapters and the same subject matter from the Advanced Perl Programming (APP) book is the level of the target audience. Here Schwartz walks the reader through each topic with code examples, where APP gave the information in a dryer, more mater of fact-ly format. Where APP was for experienced programmers, LPORM is for newer programmers.

The following for four chapters discussed Object Orientated Programming, perl style. With the help of a talking horse, the reader is stepped through basic OOP principles such as inheritance, destruction (a _whole_ chapter on object destruction), and others. This section of the book is where many will find benefit. Schwartz finishes the book sliding into module creation, testing and distribution via CPAN. These chapters are essential for putting a professional shine on your perl.

In all, I think this book is needed by all newer perl programmers and those that wish to take their perl to the next level. The price point of US$35 may seem steep for only 205 pages, but LPORM is packed with information that will help. The book was free of glaring technical or grammatical errors to boot.

Read all reviews


Media reviews "The first book you picked up to learn Perl probably had a llama on its cover. You then picked up the camel book to continue your education. There was a gap though between those two books, an introduction to object orientated perl was missing. Well, Randal has now written the prefect bridging book in 'Learning Perl Objects, References & Modules' (LPORM). This book should be on your shelf if your new to perl, or even if you've used perl for the past years only for short scripts. LPORM will move your perl from scripts to programs...In all, I think this book is needed by all newer perl programmers and those that wish to take their perl to the next level."
--Shawn C. Carroll, Chicago Perl Mongers, September 2003
http://chi.pm.org/reviews/alpaca.html

"What a spectacular Perl book it is...this book fills a vacancy for Perl programmers who are looking to improve their skills or to grow in their careers. O'Reilly, Schwartz, and Phoenix have put together a wonderful book. It's very personable and easy to follow. More importantly, it has the feel of a master instructing the apprentice."
--Russell J.T. Dyer, UnixReview.com, June 2003
http://www.unixreview.com/documents/s=8217/ur0306h/

Read all reviews

See larger cover