Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Devel::Symdump and symbol table woes

by ikegami (Patriarch)
on Nov 10, 2005 at 15:28 UTC ( [id://507402]=note: print w/replies, xml ) Need Help??


in reply to Devel::Symdump and symbol table woes

In the past, I've noticed that entries in the symbol table (%::) always have a SCALAR component. I guess every package symbol always has a scalar component due to how Perl's guts are written.

package main; our %test = ( a => 1 ); print('SCALAR: ', ( *{ $::{'main::'}{'test'} }{SCALAR} )?1:0, "\n"); print('ARRAY: ', ( *{ $::{'main::'}{'test'} }{ARRAY } )?1:0, "\n"); print('HASH: ', ( *{ $::{'main::'}{'test'} }{HASH } )?1:0, "\n"); ${ *{ $::{'main::'}{'test'} }{SCALAR} } = 'scalar'; print("$test\n"); __END__ SCALAR: 1 ARRAY: 0 HASH: 1 scalar

Replies are listed 'Best First'.
Re^2: Devel::Symdump and symbol table woes
by bpphillips (Friar) on Nov 10, 2005 at 15:35 UTC
    Is this documented anywhere that you know of? Do you think this is worthy of being labeled a "bug" in Devel::Symdump (if so, I'll report it in RT)?

    Thanks for confirming I'm not going crazy anyway! :-)

    --Brian

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-19 01:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found