Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Variable Name Mistery. Who calls?

by porta (Sexton)
on Oct 25, 2006 at 22:17 UTC ( [id://580664]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Variable Name Mistery. Who calls?
in thread Variable Name Mistery. Who calls?

It's almost there. this is the output I've got: ~$ perl p.pl This will work This will work as well Couldn't execute three at p.pl line 9 And, what I want to achieve is to print (for example) which variable raised that warning. Something like this: Couldn't execute three on $o at p.pl line 9 Perhaps am I asking to much?
  • Comment on Re^4: Variable Name Mistery. Who calls?

Replies are listed 'Best First'.
Re^5: Variable Name Mistery. Who calls?
by ikegami (Patriarch) on Oct 26, 2006 at 02:19 UTC

    Well, you could use PadWalker's var_name. var_name won't always work, though.

    Before using PadWalker, ask yourself if you really think the tiny bit of extra usefulness to help debug the rare situation where a non-existant function is called more than once in a given statement is really worth the extra work, complexity and maintenance issues of displaying the variable's name (when there might not even be one).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-23 16:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found