X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2Fautovivification.pm;h=9d009a86756d96477e6ae45a4c0fc196212022f7;hb=refs%2Ftags%2Fv0.04;hp=1bab02f6466839d44978531853d89c1c348125e6;hpb=c79d4e423275faf328a1cdb9e47fdd1ba432388d;p=perl%2Fmodules%2Fautovivification.git diff --git a/lib/autovivification.pm b/lib/autovivification.pm index 1bab02f..9d009a8 100644 --- a/lib/autovivification.pm +++ b/lib/autovivification.pm @@ -11,13 +11,13 @@ autovivification - Lexically disable autovivification. =head1 VERSION -Version 0.03 +Version 0.04 =cut our $VERSION; BEGIN { - $VERSION = '0.03'; + $VERSION = '0.04'; } =head1 SYNOPSIS @@ -151,6 +151,12 @@ sub import { (); } +=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} >>. +This syntax is valid Perl, yet it's discouraged as the slice is here useless since the dereferencing enforces scalar context. +If warnings are turned on, Perl will complain about one-element slices. + =head1 DEPENDENCIES L 5.8. @@ -186,7 +192,7 @@ Matt S. Trout asked for it. =head1 COPYRIGHT & LICENSE -Copyright 2009 Vincent Pit, all rights reserved. +Copyright 2009,2010 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.