This course presents advanced techniques for rapidly developing highly maintainable Perl modules. Many of the techniques were developed by Dr. Conway over the years to facilitate deploying dozens of highly regarded and widely used modules (see www.cpan.org for examples). The advanced techniques are illustrated by exploring the implemention of ten of those modules.
Topics covered include:
- How Perl's attribute mechanism works and how a module can make it useable (Attribute::Handler, Attribute::Types).
- How to reconfigure Perl's method dispatch mechanism in two different ways (NEXT, Class::Delegation).
- How to write modules based on source code filters (Filter::Simple, Switch, Perl6::Variables).
- How a single hash can be the entire, lazily evaluated interface to a module (Regexp::Common).
- How to replace built-in functions and syntax (Inline::Files)
- How to extend Perl's subroutine call mechanism using lexical subroutine destructors (Hook::LexWrap)
1 or 2 days seminar
Intermediate and advanced Perl programmers who have some familiarity with subroutines and closures, Perl modules and packages, and the basics of object-oriented Perl.