LanX has asked for the wisdom of the Perl Monks concerning the following question:
Are there any introspection mechanisms for perl labels?
For instance is it possible to get the line number of a label?
Cheers Rolf
PS: to be more precise: I don't include "code filter" in "any mechanism" and would rather prefer a CORE solution...
To be more explicit: I'm rather thinking of using something like investigation a package stash or (more likely) using something like PadWalker (since labels are scoped) - the common ways to introspect variables.
UPDATE: I'm not sure if I should better ask for "reflection" instead of "introspection" ... reading WP I couldn't find out if these concepts are really different or just synonyms(!?!).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Introspection of labels possible?
by ig (Vicar) on Aug 30, 2009 at 22:15 UTC | |
by LanX (Saint) on Aug 30, 2009 at 22:20 UTC | |
|
Re: Introspection of labels possible?
by shmem (Chancellor) on Aug 30, 2009 at 19:12 UTC |