From: Vincent Pit Date: Wed, 17 Jun 2009 18:04:37 +0000 (+0200) Subject: This is 0.02 X-Git-Tag: v0.02^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fautovivification.git;a=commitdiff_plain;h=029cd913066b88040c4efaa966c96bf2d4e584d9 This is 0.02 --- diff --git a/Changes b/Changes index dfd6379..6edb3f0 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,13 @@ 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. diff --git a/META.yml b/META.yml index 82d09fd..646e605 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: autovivification -version: 0.01 +version: 0.02 abstract: Lexically disable autovivification. author: - Vincent Pit diff --git a/README b/README index bc02476..88c204c 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME autovivification - Lexically disable autovivification. VERSION - Version 0.01 + Version 0.02 SYNOPSIS no autovivification; @@ -40,8 +40,11 @@ METHODS * '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' diff --git a/lib/autovivification.pm b/lib/autovivification.pm index ac9bd98..5d189a0 100644 --- a/lib/autovivification.pm +++ b/lib/autovivification.pm @@ -11,13 +11,13 @@ autovivification - Lexically disable autovivification. =head1 VERSION -Version 0.01 +Version 0.02 =cut our $VERSION; BEGIN { - $VERSION = '0.01'; + $VERSION = '0.02'; } =head1 SYNOPSIS