From: Vincent Pit Date: Tue, 23 Jun 2009 22:20:28 +0000 (+0200) Subject: This is 0.03 X-Git-Tag: v0.03^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=45b4c5c2fa9d50471d929ed8561ada3201d58389;p=perl%2Fmodules%2Fautovivification.git This is 0.03 --- diff --git a/Changes b/Changes index 6edb3f0..dd93f87 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,17 @@ Revision history for autovivification +0.03 2009-06-23 22:20 UTC + + Add : Handle old-fashion dereferencing (like $$hashref{key}). + + Chg : Aliasing constructs (for ($x{foo}) { ... }) are now covered by + the 'store' category (and no longer the 'fetch' one). This is + because there's no way to know at compile-time if the alias + will be assigned to. + + Fix : Quadratic complexity at compile-time. + + Fix : Segfaults when dereferencing globals. + + Fix : Segfaults on big-endian systems. + + Tst : Really test plain arrays and hashes. + + Tst : Improved coverage. + 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 diff --git a/META.yml b/META.yml index 646e605..5edfebb 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: autovivification -version: 0.02 +version: 0.03 abstract: Lexically disable autovivification. author: - Vincent Pit diff --git a/README b/README index 88c204c..2163a42 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME autovivification - Lexically disable autovivification. VERSION - Version 0.02 + Version 0.03 SYNOPSIS no autovivification; @@ -62,8 +62,9 @@ METHODS * 'store' Turn off autovivification for lvalue dereferencing expressions, such - as "$hashref->{key}[$idx]{$field} = $value". An exception is thrown - if vivification is needed to store the value, which means that + as "$hashref->{key}[$idx]{$field} = $value" or "for + ($hashref->{key}[$idx]{$field}) { ... }". An exception is thrown if + vivification is needed to store the value, which means that effectively you can only assign to levels that are already defined (in the example, this would require "$hashref->{key}[$idx]" to already be a hash reference). diff --git a/lib/autovivification.pm b/lib/autovivification.pm index 5e42f1f..bff3f85 100644 --- a/lib/autovivification.pm +++ b/lib/autovivification.pm @@ -11,13 +11,13 @@ autovivification - Lexically disable autovivification. =head1 VERSION -Version 0.02 +Version 0.03 =cut our $VERSION; BEGIN { - $VERSION = '0.02'; + $VERSION = '0.03'; } =head1 SYNOPSIS