Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Devel::Symdump and symbol table woesby trammell (Priest) |
on Sep 17, 2007 at 17:43 UTC ( [id://639450]=note: print w/replies, xml ) | Need Help?? |
Just a couple of notes as a I retrace my understanding of this behavior.
Here's some relevant text from perlref, section "Making References":
*foo{THING} returns undef if that particular THING hasn’t been used yet, except in the case of scalars. *foo{SCALAR} returns a reference to an anonymous scalar if $foo hasn’t been used yet. This might change in a future release.One consequence of this is that at the symbol-table level, the following two packages are indistinguishable: ... which I may demonstrate with some code of my own, once I come up with something convincing that navigates the sea of casting and dereferencing that is the Perl symbol table. So while I think I appreciate what broquaint is trying to get across, I don't think the above post addresses the "spirit" of the OP. I would agree with the as-yet unmade statement that Devel::Symdump is doing its best, but the underlying data is ambiguous, and so are the values returned from the module. Indeed, such is the nature of globs. Thanks, bpphillips, for starting this conversation. Update: Here's a more concrete example, following the package definitions above:
In Section
Seekers of Perl Wisdom
|
|