- $_[2] is a either an alias or a copy of the current key, and
- $_[3] is an alias to the current element (i.e. the value).
- Because $_[2] might be a copy, it is useless to try to
- change it or cast magic on it.
+ When the variable for which the magic is invoked is an array
+ or an hash, $_[2] is a either an alias or a copy of the
+ current key, and $_[3] is an alias to the current element
+ (i.e. the value). Since $_[2] might be a copy, it is useless
+ to try to change it or cast magic on it.
+
+ Starting from perl 5.17.0, this magic can also be called for
+ code references. In this case, $_[2] is always "undef" and
+ $_[3] is a reference to the cloned anonymous subroutine.