back: To Test or Not to Test
next: Autoloading and Inheritance

And now (again, temporarily) a side-jump: the autoloading mechanism in Perl. I won't go to all the details how to set it up, but just the basic principle.

Autoloading comes into play when the user calls a function (or method, when the OO syntax is used to call functions), which is not known (yet).

When you use an unknown method, Perl calls the AUTOLOAD function for you, with the name of the desired method in the $AUTOLOAD scalar.

The most general application for autoloading is to reduce compilation costs. Split your package in many smaller pieces, and compile only the pieces you use. This is autoloading of functionality.

To Test or Not to Test Autoloading and Inheritance

Created by Mark Overmeer with PPresenter on 5 August 2001