Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: How can I find the calling object?

by strider corinth (Friar)
on Nov 20, 2002 at 14:36 UTC ( [id://214457]=note: print w/replies, xml ) Need Help??


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

Well, the two DB related answers are close, but one constrains me to name my object (or an intermediate object) DB, and the other doesn't. That makes them very different for my use. As for PadWalker, I don't think it uses caller() or DB at all. Most of its work is done in XS, if I recall.
--
Love justice; desire mercy.
  • Comment on Re^4: How can I find the calling object?

Replies are listed 'Best First'.
Re: Re^4: How can I find the calling object?
by demerphq (Chancellor) on Nov 20, 2002 at 16:31 UTC
    Oh. Maybe im confused here. I thought that PadWalker wasn't suitable since @_ isnt a lexical. Maybe i havent read this thread closely enough (probably). And since I assumed that the PadWalker bit wasnt suitable it seemed likely you mean the caller() solution.

    As for the differences between the caller() implementation they are basically trivial. They all use the idea of using caller inside of the package DB. I lexically scope that package declaration, the other idea adds a subroutine to the DB namespace to make it "easier". Personally I like mine more... But im clearly biased. :-)

    BTW if you want a good snippet for seeing how to use caller like this (the one i learned all this from) have a look in Carp::Heavy

    Good luck.

    --- demerphq
    my friends call me, usually because I'm late....

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://214457]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-20 00:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found