Tieing and Overloading Objects in Perl

By Dave Cross (‎davorg‎) from London.pm, NonDrinkers.pm
Date: Wednesday, 23 July 2003 14:15
Duration: 120 minutes

Using Object Orientation in your programming is a good way to make you
code more extensible and reusable. Unfortunately code that uses objects
is often less readable than it would otherwise have been.

By using tied variables and operator overloading in your object you can
make them easier to use. In many cases you can make you objects look a
lot more like "real" Perl variables.

This tutorial will introduce both of these features and will explain
both how and (more importantly) why they are used.

Topics covered will include:

-Why disguise objects?
-An introduction to tie
-Tieing scalars, arrays, hashes and filehandles
-Using Tie::StdFoo to be lazy
-Easier tie interfaces with Attribute::Handlers
-Extended examples of tied objects
-Review of tied objects available on CPAN
-Differences between overloaded methods and overloaded operators
-(Brief aside: overloaded methods in Perl)
-Introduction to overload.pm
-Overloading operators
-Overloading stringification and numerification
-The importance of copy constructors
-Overloading constants
-Extended examples of overloaded objects
-Review of ovrloaded objects on CPAN
-Summary and further information

Template talk/show last modified at 12:26:25 27-Jul-2013
All content copyright © 2003 Yet Another Society, Inc.
for any question about this site or YAPC::EU 2003, mail to <yapc-help@mongueurs.net>.
XHTML and CSS validation.