]> git.vpit.fr Git - perl/modules/autovivification.git/blobdiff - lib/autovivification.pm
Don't autovivify in keys/values
[perl/modules/autovivification.git] / lib / autovivification.pm
index 825eb9976dceefb7d1cff06d9b101fc3b1091e22..ac9bd98f0231308244a657d081563fcb0838bc45 100644 (file)
@@ -64,8 +64,8 @@ Enables the features given in C<@opts>, which can be :
 
 C<'fetch'>
 
-Turn off autovivification for rvalue dereferencing expressions, such as C<< $value = $hashref->{key}[$idx]{$field} >>.
-C<undef> is returned when the expression would have autovivified.
+Turn off autovivification for rvalue dereferencing expressions, such as C<< $value = $hashref->{key}[$idx]{$field} >>, C<< keys %{$hashref->{key}} >> or C<< values %{$hashref->{key}} >>.
+When the expression would have autovivified, C<undef> is returned for a plain fetch, while C<keys> and C<values> return C<0> in scalar context and the empty list in list context.
 
 =item *