in reply to Re^2: Standard method for documenting AUTOLOAD methods in pod
in thread Standard method for documenting AUTOLOAD methods in pod
AUTOLOAD is not obsolete, especially if you're using it for generally "unknown" methods. The "usual" implementation of an AUTOLOAD subroutine then generates and installs the code (well, subroutine) to handle the specific case:
sub AUTOLOAD { my $method = $AUTOLOAD; my $handler = sub { ... }; # Install the handler: no strict 'refs'; *{ $method } = $handler; goto &$handler; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Standard method for documenting AUTOLOAD methods in pod
by nysus (Parson) on Sep 03, 2019 at 08:48 UTC | |
by Corion (Patriarch) on Sep 03, 2019 at 09:03 UTC | |
by nysus (Parson) on Sep 03, 2019 at 09:25 UTC |