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

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2020-05-25 02:26 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (143 votes). Check out past polls.