X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2Fautovivification.pm;h=56f37a9169fd807fd6804593661b6dd18bbde985;hb=a4fef27a144878d158a7379e990c2e0e311bf870;hp=9d009a86756d96477e6ae45a4c0fc196212022f7;hpb=c3fc4d9635093e7de8f4d59aacfee773c7100e24;p=perl%2Fmodules%2Fautovivification.git diff --git a/lib/autovivification.pm b/lib/autovivification.pm index 9d009a8..56f37a9 100644 --- a/lib/autovivification.pm +++ b/lib/autovivification.pm @@ -1,6 +1,6 @@ package autovivification; -use 5.008; +use 5.008001; use strict; use warnings; @@ -11,13 +11,13 @@ autovivification - Lexically disable autovivification. =head1 VERSION -Version 0.04 +Version 0.06 =cut our $VERSION; BEGIN { - $VERSION = '0.04'; + $VERSION = '0.06'; } =head1 SYNOPSIS @@ -65,7 +65,7 @@ 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<< keys %{$hashref->{key}} >> or C<< values %{$hashref->{key}} >>. -Starting from perl C<5.11>, it also covers C and C on array references. +Starting from perl C<5.11>, it also covers C and C on array references. When the expression would have autovivified, C is returned for a plain fetch, while C and C return C<0> in scalar context and the empty list in list context. =item * @@ -151,6 +151,18 @@ sub import { (); } +=head1 CONSTANTS + +=head2 C + +True iff the module could have been built with thread-safety features enabled. +This constant only has a meaning with your perl is threaded ; otherwise, it'll always be false. + +=head2 C + +True iff this module could have been built with fork-safety features enabled. +This will always be true except on Windows where it's false for perl 5.10.0 and below . + =head1 CAVEATS The pragma doesn't apply when one dereferences the returned value of an array or hash slice, as in C<< @array[$id]->{member} >> or C<< @hash{$key}->{member} >>. @@ -159,7 +171,7 @@ If warnings are turned on, Perl will complain about one-element slices. =head1 DEPENDENCIES -L 5.8. +L 5.8.1. L (standard since perl 5.006).