in reply to Autovivification with hash of hashes
To auto-vivificate when you call exists or defined is conceptually wrong, and it is actually a reported bug. However it is not likely that this will be fixed before Perl 6. If you look into the c code, you would see how complex the fix would be.
In Perl 6, auto-vivification would still be there, and you know that it is extreamly helpful in creating complex reference structures.
But it would become more context aware, and most likely only auto-vivificate if you use the ref structure as lvalue.
|