tracking scope of a variable?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm presently having a "bit of an issue" with a variable,
which is declared, and exported in various interesting ways.

While I have no doubt I will eventually find the problem
and fix it, and even understand the fix, I would like to ask:

Is there a way to print out all the declarations
and references to a variable?

In particular I would like a routine to
dump all declarations of a named variable e.g. "flooble".

I would ideally like to see a list, including
all block scoped variable called "flooble", and
all module scoped variable (A::flooble, B::flooble).

Further, when I use a variable
($flooble = "test", or print "$flooble") I would
like to see a list of all the declarations
that this variable has (often multiple, due to exports).

My apologies for the vaguness and errors in this request,
but if I knew enough to write this up really
well, I probably wouldn't need to :-)


Site Timeline