This tutorial will show you how to build on the basic object-oriented Perl techniques you already know and unlock more of the power of Perl's OO capabilities.
In the full two-day course you will learn:
- how (and when) to bless arrays, scalars and subroutines;
- two different ways to implement data hiding for Perl objects (including the Tie::SecureHash module);
- how Perl implements inheritance and polymorphism (and how you can change the rules of either);
- advanced method redispatch techniques (especially under multiple inheritance)
- how to simulate scalars, arrays, and hashes using ties;
- the features (and traps) of operator overloading in Perl;
- easy ways to build complete classes (semi-)automatically;
- how to do design-by-contract programming in OO Perl (using the Class::Contract module);
The one-day version covers the following subset of the material: array- and scalar-based classes, encapsulation (one of the two techniques), inheritance and polymorphism, automatic class construction, and operator overloading.
1-day or 2-day seminar
Intermediate Perl programmers who have a basic familiarity with hash-based OO Perl.