X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FVariable%2FMagic.pm;h=179605ed1be97874555348dbf3ae6da488e2a818;hb=c9093dd650fe5e0229e16db9a60f521ec4046552;hp=a94fbe377ca5c3c2956c68e4f1210544f07070ef;hpb=03eb870636b3e9f56a04a7a5291752e26f36829e;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index a94fbe3..179605e 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -1,6 +1,6 @@ package Variable::Magic; -use 5.007003; +use 5.008; use strict; use warnings; @@ -13,13 +13,13 @@ Variable::Magic - Associate user-defined magic to variables from Perl. =head1 VERSION -Version 0.27 +Version 0.28 =cut our $VERSION; BEGIN { - $VERSION = '0.27'; + $VERSION = '0.28'; } =head1 SYNOPSIS @@ -325,21 +325,21 @@ Other arguments are specific to the magic hooked : =over 8 -=item - +=item * C -When the variable is an array, C<$_[2]> contains the normal length. -The callback is also expected to return the new scalar or array length. +When the variable is an array or a scalar, C<$_[2]> contains the non-magical length. +The callback can return the new scalar or array length to use, or C to default to the normal length. -=item - +=item * C C<$_[2]> is a either a copy or an alias of the current key, which means that it is useless to try to change or cast magic on it. C<$_[3]> is an alias to the current element (i.e. the value). -=item - +=item * C, C, C and C @@ -464,7 +464,7 @@ If you define a wizard with a C callback and cast it on itself, this destr =head1 DEPENDENCIES -L 5.7.3. +L 5.8. L (standard since perl 5), L (standard since perl 5.006).