]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - lib/Variable/Magic.pm
Document the return values of the callbacks
[perl/modules/Variable-Magic.git] / lib / Variable / Magic.pm
index bad596178e799583e7e2b473cd3e4ca426cd4cc3..448ea299075aacc48af2ca663c0b4339a3eb3710 100644 (file)
@@ -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