X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FVariable%2FMagic.pm;h=9261808b371f23b8da8d41585d5ca2f32528e1ac;hb=refs%2Ftags%2Fv0.27;hp=bad596178e799583e7e2b473cd3e4ca426cd4cc3;hpb=6c5abbf8d209a585843831e5b47ce8ef19c44440;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index bad5961..9261808 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -13,13 +13,13 @@ Variable::Magic - Associate user-defined magic to variables from Perl. =head1 VERSION -Version 0.26 +Version 0.27 =cut our $VERSION; BEGIN { - $VERSION = '0.26'; + $VERSION = '0.27'; } =head1 SYNOPSIS @@ -324,6 +324,9 @@ In the special case of C magic and when the variable is an array, C<$_[2]> C<$_[2]> is the current key in C, C, C, C and C callbacks, although for C it may just be a copy of the actual key so it's useless to (for example) cast magic on it. C magic also receives the current element (i.e. the value) in C<$_[3]>. +All the callbacks are expected to return an integer, which is passed straight to the perl magic API. +However, only the return value of the C callback currently holds a meaning. + =back # A simple scalar tracer @@ -432,6 +435,8 @@ The only way to address this would be to return a reference. If you define a wizard with a C callback and cast it on itself, this destructor won't be called because the wizard will be destroyed first. +Using C and C magics on hashes may cause segfaults. + =head1 DEPENDENCIES L 5.7.3. @@ -472,7 +477,7 @@ Tests code coverage report is available at L