|Perl Monk, Perl Meditation|
Learning Perl Objects, References and Modulesby TStanley (Canon)
|on Jul 16, 2003 at 03:20 UTC||Need Help??|
Order Learning Perl Objects, References and Modules
Item Description: Picks up where Learning Perl left off
Review Synopsis: A worthy addition to any Perl programmers's library
Table of Contents
Once again Randal and Tom Phoenix have teamed together to bring us the sequel to Learning Perl, and manage to keep the material both interesting and entertaining as well. Overall this book is much lighter than one would expect (205 pages), which is slightly smaller than Learning Perl. Also provided at the end of each chapter are exercises (with the answers at the end of the book), to help reinforce what the chapter covered.
Chapter One is a brief intro into the book, going over what the average person who reads the book should have an understanding of, as well as some notes for those who will be using the book to teach a class with.
Chapter Two gets into the meat of the book, which how to write programs that are between 100 and 10,000 lines of code. Here, they cover items such as using do and require, packages and lexicals, and scope.
Chapters Three through Seven take on references and show how to create references and then dereference them to get at the data that they represent. Scoping, manipulating complex data structures, reference counting, creating anonymous arrays and hashes, and autovivification are also covered quite thoroughly.
Chapters Eight and Nine were taken word for word from perlboot, which is ok, since the material is still quite relevant (and saved merlyn a bunch of time since he wrote perlboot). However, they did expand the material in perlboot, by covering faster methods of accessing and writing instance data within the object, as well as restricting methods to a class or an instance.
Chapters Ten and Eleven go into object destruction and more advanced topics on objects. Mention is made of the Weaken module, as well as using AUTOLOAD to create accessors. Multiple inheritance and referencing file handles is also covered in these chapters.
Chapter Twelve deals with using modules, such as File::Basename, File::Spec, and Math::BigInt. Randal uses these modules to show the differences between a function-oriented module, such as File::Basename, and object-oriented ones like File::Spec and Math::BigInt. He also goes into detail on using the Exporter module and creating custom import routines.
Chapters Thirteen through Fifteen cover what is needed to create a distribution that will eventually find its way to the CPAN. Using h2xs, writing pod, alternate install locations, writing tests using Test::Simple and Test::More, and how to prepare, upload, and announce your distribution are covered.
For myself, I found the last three chapters to be very informative, and exactly what I was looking for when I wrote this node two years ago. This book answered the few remaining question that I had not managed to answer by trial and error.
Overall, this book was extremely well written, and I encourage all who have read Learning Perl to pick this book up, and add it to their library as a very useful reference guide and learning tool.