]> git.vpit.fr Git - perl/modules/Variable-Magic.git/blobdiff - lib/Variable/Magic.pm
Set $_[2] to the default length for len magic on scalars
[perl/modules/Variable-Magic.git] / lib / Variable / Magic.pm
index aa7ee22136d71a0c31849f6a0dafed9f9d761431..2700f7112ef08381f73ba5bbe9a785d141cc8258 100644 (file)
@@ -329,8 +329,8 @@ Other arguments are specific to the magic hooked :
 
 C<len>
 
-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<undef> to default to the normal length.
 
 =item *