Next | Tricks of the Wizards | 96 |
What happens when you call a function that isn't there?
Perl looks for a function named AUTOLOAD in the same package
If it finds it, it calls it
AUTOLOAD is a catchall for undefined functions
Similarly for methods
$o->METH searches the inheritance tree for METH
If it's not there, the inheritance tree is searched again for AUTOLOAD
Next | Copyright © 2003 M. J. Dominus |