Subject: | Explicitly calling object->AUTOLOAD |
Explicitly calling AUTOLOAD on a lazy object may not do what you expect.
If you never explicitly call $a_lazy_object->AUTOLOAD, this caveat does not apply to you. (Calling AUTOLOADed methods, on the other hand, is fine.)
If you set $AUTOLOAD in a package with a hardcoded value (because you think you know in which package the AUTOLOAD sub is defined for a particular class) and then call $a_lazy_object->AUTOLOAD, the object will inflate, but a different method will be called on the inflated object than you intended. If you're trying to spoof calls to AUTOLOAD, you should really be searching through the inheritance hierarchy of the object (with the help of something like Class::ISA) until you find the package that the object's AUTOLOAD method is defined in, and then set that package's $AUTOLOAD. (In fact, Class::LazyObject does this kind of AUTOLOAD search itself.)
I will most likely revise this caveat to make more sense.