Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Inspecting the name of a variable

by remiah (Hermit)
on Sep 02, 2012 at 14:46 UTC ( #991280=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Inspecting the name of a variable
in thread Inspecting the name of a variable

Hello

I found Data::Dumper::Names with this thread . In this manual of Data::Dumper::Names, there is "Unknown Variables" section.

"Unknown Variables" section seems to me having some relation with your case... not printing name "$x".

update:
Sorry if I am looking into wrong direction.


Comment on Re^3: Inspecting the name of a variable
Re^4: Inspecting the name of a variable
by LanX (Canon) on Sep 02, 2012 at 20:50 UTC
    Thats where I started, but if you look into Ovid's code you will see that he's only inspecting lexical variables.

    Cheers Rolf

      I saw it. It used the same module, PadWalker.

      With -d debug, when I type V at for loop, I see "$x = 42" in the list. It seems there is some way for printing variable names...

      I know nothing for perlguts,and don't understand what is Alias here ...
      Hope you get some hints from superior monks.

      regrads.

        The problem is that a variable (i.e. the refrence) can be bound to multiple names.

        So using PadWalker doesn't really help... but I think I have a better idea how to solve it. :)

        Cheers Rolf

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2014-10-23 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (126 votes), past polls