in reply to wat ::DESTROY will do
See perlobj for what AUTOLOAD is for:
If neither the current class, its named base classes, nor the UNIVERSAL class contains the requested method, these three places are searched all over again, this time looking for a method named AUTOLOAD(). If an AUTOLOAD is found, this method is called on behalf of the missing method, setting the package global $AUTOLOAD to be the fully qualified name of the method that was intended to be called.This guy is trying to override AUTOLOAD for any class/object, and ignoring DESTROY method calls, which would be called whenever a object is destroyed, and no DESTROY method exists.
It's usually considered bad to use AUTOLOAD and not have an explicit DESTROY method. Note that if you do, AUTOLOAD won't be called. It's faster, too.
|
|---|