Next Tricks of the Wizards 97

Simple AUTOLOAD Example

        @funcs = qw(red yellow blue);
        sub red    { ... }
        sub yellow { ... }
        sub blue   { ... }
        sub AUTOLOAD {
           die "Function $AUTOLOAD unknown; try [@funcs]\n";
        }
        green(...);
        Function main::green unknown; try [red yellow blue]


Next Copyright © 2003 M. J. Dominus