in reply to The Bad, the Ugly, and the Good of autovivification
Yes, autovivification is capricious. It would be a great improvement if it only happened in lvalue contexts (ordinary value contexts could simply short-circuit and return null). If I may add an adjective to your canonical list, I'd like to present The Simple: if Perl has to go through (dereference) a reference to get to something, autovivification happens (obviously, it also happens if the reference is itself used in lvalue context).
Caution: Contents may have been coded under pressure.
The subject does, from time to time, come up here, as in Looping through a hash reference is creating a key...?.
Caution: Contents may have been coded under pressure.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: The Bad, the Ugly, and the Good of autovivification
by tlm (Prior) on Apr 08, 2005 at 03:31 UTC | |
by Anonymous Monk on Apr 08, 2005 at 03:45 UTC | |
by tlm (Prior) on Apr 08, 2005 at 03:54 UTC |
In Section
Meditations