I'm a little curious about your constraints...
- The result must be a reference to the object which called the sub.
- The reference to the calling object must be obtained on the fly (no saving it anyplace first to be retrieved later).
- No changes may be made to the calling object (say, to have it pass $self to the receiving object).
While they have provided some interesting (if somewhat baroque :-) solutions, I'd love to know what causes them in your particular instance?
For example, why can't you use Hook::LexWrap to temporarily override the method in question to stash the object somewhere for your later use (which would violate constraint (2) and (3)?
Just curious :-)
In reply to Re: How can I find the calling object?
by adrianh
in thread How can I find the calling object?
by strider corinth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |