| Next | Tricks of the Wizards | 102 |
sub closethewindow { ... }
sub AUTOLOAD {
my ($package, $func) = ($AUTOLOAD =~ /(.*)::(.*)/);
my $true_func = join '::', $package, lc $func;
goto &$true_func if defined &$true_func;
croak "Undefined subroutine &$AUTOLOAD";
}
defined &foo checks to see if the function exists
Now you can call closeTheWindow
or CloseTheWindow
or CLOSETHEWINDOW
It doesn't matter.
| Next | ![]() |
Copyright © 2003 M. J. Dominus |