Right
It's a general rule that when you do OO-Perl and you use an AUTOLOAD method you should always explicitly define a DESTROY method as well (unless AUTOLOAD takes care of DESTROY, too); even an empty one.
Another trick that you could use to speed up things is to have AUTOLOAD install a method in the package namespace each time it is called. This was a trick that TheDamian explained in his book "Object Oriented Perl". Take a look at this node by Ovid to see how (or buy the book ;)
Ciao!
--bronto
The very nature of Perl to be like natural language--inconsistant and full of dwim and special cases--makes it impossible to know it all without simply memorizing the documentation (which is not complete or totally correct anyway).
--John M. Dlugosz
In reply to Re: Re: DESTROY not defined error
by bronto
in thread DESTROY not defined error
by fireartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |