home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Learning Perl Objects, References & ModulesLearning Perl Objects, References & ModulesSearch this book

Preface

Ten years ago, I wrote the first edition of Learning Perl. In the intervening years, Perl itself has grown substantially from a "cool" scripting language used primarily by Unix system administrators to a robust object-oriented programming language that runs on practically every computing platform known to mankind.

Throughout its three editions, Learning Perl remained the same size (about 300 pages) and continued to cover much of the same material to remain compact and accessible to the beginning programmer. But there is much more to learn about Perl than there was ten years ago.

This book may be entitled Learning Perl Objects, References, and Modules, but I like to think of it as just Learning More Perl.[1] This is the book that picks up where Learning Perl leaves off. It shows how to use Perl to write larger programs.

[1]Don't ask why it isn't called that. We must have had 30 emails on the subject.

As in Learning Perl, each chapter in this book is designed to be small enough to read in just an hour or two. Each chapter ends with a series of exercises to help you practice what you've just learned, with the answers in the Appendix for your reference. And like Learning Perl, the material in this book was developed for a teaching environment and used in that setting, including for our own use at Stonehenge Consulting Services as we present onsite and open-enrollment trainings.

You don't have to be a Unix guru, or even a Unix user, to benefit from this book. Unless otherwise noted, everything in this book applies equally well to Windows ActivePerl from ActiveState, and all other modern implementations of Perl. To use this book, you just need to be familiar with the material in Learning Perl and have the ambition to go further.

0.1. Structure of This Book

It's a good idea to read this book from front to back, stopping to do the exercises. Each chapter builds on preceding chapters. You've been warned.

Chapter 1, Introduction
An introduction to the material.

Chapter 2, Building Larger Programs
How to bring code in from separate files so you can have others do some of your work for you.

Chapter 3, Introduction to References
How to allow the same code to operate on different data structures by introducing a level of indirection.

Chapter 4, References and Scoping
How Perl manages to keep track of pointers to data, and an introduction to anonymous data structures and autovivification.

Chapter 5, Manipulating Complex Data Structures
Viewing, searching, and storing nested arrays and hashes.

Chapter 6, Subroutine References
How to capture behavior as a value to be passed around.

Chapter 7, Practical Reference Tricks
Sorting complex operations, the "Schwartzian Transform," and working with recursively defined data.

Chapter 8, Introduction to Objects
Working with classes, method calls, inheritance, and overriding.

Chapter 9, Objects with Data
Adding per-instance data, including constructors, getters, and setters.

Chapter 10, Object Destruction
Adding behavior to an object that is going away, including object persistence.

Chapter 11, Some Advanced Object Topics
Multiple inheritance, automatic methods, and references to filehandles.

Chapter 12, Using Modules
How use works, from the user's and author's perspectives.

Chapter 13, Writing a Distribution
Packaging up a module for sharing, including portable installation instructions.

Chapter 14, Essential Testing
Providing unit and integration tests with your distribution.

Chapter 15, Contributing to CPAN
Submitting your module to the CPAN.

Appendix A, Answers to Exercises
Where to go to get answers.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.