Revision history for autovivification
+0.02 2009-06-17 18:05 UTC
+ + Add : 'fetch' also applies to aliasing ("for ($hashref->{key}) { }").
+ + Fix : Don't segfault on "keys/values %$hashref", and don't vivify if
+ 'fetch' is set.
+ + Fix : Plain dereferencing shouldn't have a different behaviour when
+ the pragma is in use.
+ + Tst : Improved coverage.
+
0.01 2009-06-14 20:10 UTC
First version, released on an unsuspecting world.
autovivification - Lexically disable autovivification.
VERSION
- Version 0.01
+ Version 0.02
SYNOPSIS
no autovivification;
* 'fetch'
Turn off autovivification for rvalue dereferencing expressions, such
- as "$value = $hashref->{key}[$idx]{$field}". "undef" is returned
- when the expression would have autovivified.
+ as "$value = $hashref->{key}[$idx]{$field}", "keys
+ %{$hashref->{key}}" or "values %{$hashref->{key}}". When the
+ expression would have autovivified, "undef" is returned for a plain
+ fetch, while "keys" and "values" return 0 in scalar context and the
+ empty list in list context.
* 'exists'