This tutorial will show you how to build on the object-oriented Perl techniques you already know and unlock the full power of Perl's OO capabilities.
In the full two-day course you will learn:
- how (and when) to bless arrays, scalars, typeglobs, and subroutines;
- three 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 polymorphic programming techniques (including virtual constructors);
- advanced method redispatch techniques (especially under multiple inheritance)
- how to simulate scalars, arrays, hashes, and typeglobs using ties;
- the use of tie-based proxies in OO Perl
- 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);
- how to use multiple dispatch (an advanced form of polymorphism).
The one-day version covers the following subset of the material: array- and scalar-based classes, encapsulation (one of the three techniques), inheritance and polymorphism, automatic class construction, and operator overloading.
1-day or 2-day seminar
Experienced Perl programmers who have a solid understanding of hash-based OO Perl.