I'm not sure what you mean by "once and losing the method cache". Perhaps there's something I didn't read in the thread.
AUTOLOAD tends to be slow as Perl must walk through the inheritance tree (if any beyond UNIVERSAL) and search for an appropriate method. Then Perl goes back to the top and looks for AUTOLOAD methods. If it finds one (and you hope it's the right one if there's more than one), then Perl has to execute your AUTOLOAD code prior to getting to the correct method call. Whether or not this is a significant hit depends upon the how frequently AUTOLOAD is going to get called in your application.
Cheers,
Ovid
New address of my CGI Course.
In reply to Re^5: Using AUTOLOAD to create class methods
by Ovid
in thread Using AUTOLOAD to create class methods
by radiantmatrix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |