in reply to Re: Re: Re: Re^3: How can I find the calling object?
in thread How can I find the calling object?

Perhaps the caller DB trick is best, then, since it is reported to give the "original" parameters to the function. Then it doesn't matter what the function named it locally, or shifted it off or not.
  • Comment on Re: Re: Re: Re: Re^3: How can I find the calling object?

Replies are listed 'Best First'.
Re^8: How can I find the calling object?
by strider corinth (Friar) on Nov 18, 2002 at 21:12 UTC
    The only problem is that in my particular case, I wanted to do this with a Tk::Listbox-derived class I wrote. Since it has to be a Tk module, the DB trick wouldn't work. You're probably right for all other situations, though.
    --
    Love justice; desire mercy.
      Why not? The function implemented in DB:: can be written anywhere in the source. Your called function calls it to get the enhanced caller() info. You don't have to put your called function itself into a funny package.