Object Oriented Perl
Manning Publications Co.
Brian Manning (no, I'm not related to the publisher)
From the back cover...
Perl is a great language for throw-away programming - hacking quick solutions to urgent tasks. It can also be a great language for developing large, robust, and reuseable solutions to real-life problems. The object-oriented techinques taught in this book will help you write cleaner, more readable and more maintainable Perl programs.
Very good book for beginners who are just learning the basics of object-oriented Perl (abbreviated to
OO Perl for the rest of this article) all the way up to advanced users who can utilize Perl's more exotic OO features.
The book is definitely one you can grow into as you become more familiar with OO Perl. The author specifically states that one of his goals is to help readers "develop new Perl programming skills that "scale", with "scale" in this context meaning that as your programs get larger, your task of maintaining them does not. The book stresses one of the famous Perl mantras, in that "there's more than one way to do it". Lots of OO Perl examples are given, and the same sample problem is solved in different ways throughout the book. The author also tries to steer readers to additional resources by the use of "Where to find out more" sections at the end of most chapters. These sections point out other books, websites, and program documentation that can give additional coverage of the topic(s) explained in the preceding chapter.
The examples in the book are available for downloading at http://www.manning-source.com/books/conway/conway_src.zip. The book's webpage is located at http://www.manning.com/conway/.
Chapters In Brief
Chapters One through Three go over the basics of Object Orented programming, as well as the basics of Perl datatypes and how they apply to OO Perl. Since references and variable scoping are crucial to OO Perl, these two subjects discussed at length. Chapter One begins the book with an object-orientation primer. Various OO terms and concepts are defined, and diagrams of more complex concepts are included in the text. A brief introduction to CPAN is given at the end of Chapter Two. CPAN, or the Comprehensive Perl Archive Network, is a repository of Perl scripts and modules that can be used as building blocks to creating larger, more complex programs. Since many of the modules in CPAN offer an OO interface, learning how to use OO Perl can help readers harness the power of this vast archive of free software. Chapter Three dives right in to OO Perl with a short explanation on the three rules that must be followed to create an object in Perl.
Chapters Four through Seven cover different features of OO Perl, inclucing using other datatypes besides hashes for creating objects, along with how OO Perl handles inheritance and polymorphisim.
Chapters Eight through Fourteen cover advanced topics in OO Perl, including automating class creation, how to use Perl ties() to bind objects to simple datatypes, how to overload operators in Perl, and how Perl handles encapsulation. The author also includes an appendix on how to translate your object oriented experience in another language (Smalltalk, Java, C++ and Eiffel are discussed) to Perl.