X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2Fautovivification.pm;h=4f4f98b8581691e2280cace1c0e87ab275450adf;hb=2f09368e79cc5a25515ba2845ce3afd8875c7f6e;hp=bf8b735bc444f8b818a6016ef270182011f8a609;hpb=66428fedeb44f5f3e3d49a94c20d7ce3021dd283;p=perl%2Fmodules%2Fautovivification.git diff --git a/lib/autovivification.pm b/lib/autovivification.pm index bf8b735..4f4f98b 100644 --- a/lib/autovivification.pm +++ b/lib/autovivification.pm @@ -110,6 +110,8 @@ Turns off autovivification for lvalue dereferencing expressions, such as : $hashref->{$key} = $value for ($arrayref->[$idx]) { ... } for ($hashref->{$key}) { ... } + function($arrayref->[$idx]) + function($hashref->{$key}) 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 C<$arrayref> (resp. C<$hashref>) to already be an array (resp. hash) reference.