< Perl Programming < Keywords
The AUTOLOAD keyword
AUTOLOAD is a keyword that is used to mark a subroutine for autoloading. This subroutine is called, if a subroutine that doesn't exist was called with exactly the same number of arguments.
Syntax
sub AUTOLOAD BLOCK
Examples
sub AUTOLOAD {
my $callit = $AUTOLOAD;
[…]
system($callit, @_);
}
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.