Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Re: Autovivification and soft refs

by thelenm (Vicar)
on Jan 22, 2004 at 05:03 UTC ( #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


Comment on Re: Re: Re: Autovivification and soft refs
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2014-09-15 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls