Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: Autovivification and soft refs

by thelenm (Vicar)
on Jan 22, 2004 at 05:03 UTC ( [id://323091]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Autovivification and soft refs
in thread Autovivification and soft refs

Now that's interesting. Your post inspired me to dig a little deeper... it looks like the autovivification is still happening, but not on the lexical %stopper. Instead the global %::stopper is affected. Which makes sense, I suppose, because %::stopper is what was being affected in Abigail's original snippet, and with no lexical on scope, %stopper (i.e. the symbolic reference) was really referring to %::stopper. Very interesting, I certainly learned something. Thanks for pointing that out!

use Data::Dumper; my %stopper; $x = 'stopper'; exists $x->{'y'}->{'z'}; print Dumper $x; print Dumper \%stopper; print Dumper \%::stopper;

-- Mike

--
XML::Simpler does not require XML::Parser or a SAX parser. It does require File::Slurp.
-- grantm, perldoc XML::Simpler

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-19 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found