REVIEW - Learning Perl Objects, References, and Modules


Learning Perl Objects, References, and Modules


Randal L. Schwartz, Tom Phoenix




O'Reilly (2003)




Mick Brooks


June 2004



This book picks up from where Learning Perl left off, and aims to be a "gentle introduction to advanced programming in Perl". Those familiar with the former title will know exactly what to expect: short chapters written in simple language with an exercise or two at the end, and a sprinkling of (sometimes interesting) details in the numerous footnotes. The exercises are written with a class based course in mind - each has a time for completion in minutes, and tends to require direct application of the material just covered. Suggested solutions to most problems are provided in an appendix.

The first half of the book concentrates on introducing the bits of the language that are needed to form the Perl object system. There is some really good stuff here, and my previous knowledge was made to rearrange itself on more than a couple of occasions. The second half introduces Perl objects and the facilities for re-use and distribution of code, tests and documentation.

I found it interesting that the use of objects is first motivated not by encapsulation (probably because Perl can't really do it), but by code re-use through inheritance. The system for writing classes is explained well. I finally understand why so many people dislike it, and why so much effort is being put into re-working it for Perl 6.

The book achieves its aims well, and I think it will prove a useful quick read to many. I enjoyed seeing plenty of idiomatic Perl alongside understandable explanations of it. Reference and re-read value will probably be low, but I do expect to be able to extract much more from Programming Perl having digested it.

Book cover image courtesy of Open Library.