Variable::Magic - Associate user-defined magic to variables from Perl.
VERSION
- Version 0.28
+ Version 0.29
SYNOPSIS
use Variable::Magic qw/wizard cast dispell/;
(or "undef" when no private data constructor was supplied). Other
arguments are specific to the magic hooked :
- - "len"
+ * "len"
- When the variable is an array, $_[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, $_[2] contains
+ the non-magical length. The callback can return the new
+ scalar or array length to use, or "undef" to default to the
+ normal length.
- - "copy"
+ * "copy"
$_[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. $_[3] is an alias to the current element (i.e.
the value).
- - "fetch", "store", "exists" and "delete"
+ * "fetch", "store", "exists" and "delete"
$_[2] is an alias to the current key. Nothing prevents you
from changing it, but be aware that there lurk dangerous
first.
DEPENDENCIES
- perl 5.7.3.
+ perl 5.8.
Carp (standard since perl 5), XSLoader (standard since perl 5.006).