Hey, monks. In my code, I have one object calling a sub in another. I'd like the called sub to be able to find (without being told directly) a reference to the object that called it.
I've thought of a few ways to do it, but none of them are the Right Way. To filter out stuff I've thought of already (or that don't fit what I'm looking for), here are some 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).
Love justice; desire mercy.