| Next | Tricks of the Wizards | 100 |
These two are almost the same:
sub AUTOLOAD { sub AUTOLOAD {
return &blue; goto &blue;
} }
On the right is magic goto.
Calls blue normally
But blue returns directly to AUTOLOAD's caller
Just as if AUTOLOAD had never been called
Magic goto is perfect for autoloaded functions
| Next | ![]() |
Copyright © 2003 M. J. Dominus |