]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - lib/Variable/Magic.pm
Be a little more precise about the get/clear problem
[perl/modules/Variable-Magic.git] / lib / Variable / Magic.pm
index bad596178e799583e7e2b473cd3e4ca426cd4cc3..52425fb565e5fa04f8da3fa9ec9c20560d14e99f 100644 (file)
@@ -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<len> magic and when the variable is an array, C<$_[2]>
 C<$_[2]> is the current key in C<copy>, C<fetch>, C<store>, C<exists> and C<delete> callbacks, although for C<copy> it may just be a copy of the actual key so it's useless to (for example) cast magic on it.
 C<copy> 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<len> 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<free> callback and cast it on itself, this destructor won't be called because the wizard will be destroyed first.
 
+Using simultaneously C<get> and C<clear> magics on hashes may cause segfaults.
+
 =head1 DEPENDENCIES
 
 L<perl> 5.7.3.
@@ -472,7 +477,7 @@ Tests code coverage report is available at L<http://www.profvince.com/perl/cover
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2007-2008 Vincent Pit, all rights reserved.
+Copyright 2007-2009 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.