Revision history for Variable-Magic
+0.54 2014-09-22 17:30 UTC
+ + Add : The new constant VMG_COMPAT_CODE_COPY_CLONE evaluates to true
+ if your perl calls 'copy' magic when a magical code prototype
+ is cloned, which is currently the case for perl 5.17.0 and
+ above.
+ + Fix : [RT #90205] : copy magic on subs puts raw CV in $_[3]
+ $_[3] will now contain a reference to the cloned code when
+ 'copy' magic is called for a coderef.
+ Thanks Lukas Mai for reporting.
+ + Fix : t/35-stash.t has been taught about perl 5.21.4.
+ + Fix : Tests using run_perl() in t/17-ctl.t will no longer fail on
+ Android.
+
0.53 2013-09-01 17:50 UTC
This is a maintenance release. The code contains no functional change.
Satisfied users of version 0.52 can skip this update.
author:
- 'Vincent Pit <perl@profvince.com>'
build_requires:
- Carp: 0
- Config: 0
- Exporter: 0
- ExtUtils::MakeMaker: 0
- Test::More: 0
- XSLoader: 0
- base: 0
+ Carp: '0'
+ Config: '0'
+ Exporter: '0'
+ ExtUtils::MakeMaker: '0'
+ Test::More: '0'
+ XSLoader: '0'
+ base: '0'
configure_requires:
- Config: 0
- ExtUtils::MakeMaker: 0
+ Config: '0'
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921'
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142060'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Variable-Magic
no_index:
directory:
- t
- inc
requires:
- Carp: 0
- Exporter: 0
- XSLoader: 0
- base: 0
- perl: 5.008
+ Carp: '0'
+ Exporter: '0'
+ XSLoader: '0'
+ base: '0'
+ perl: '5.008'
resources:
bugtracker: http://rt.cpan.org/Dist/Display.html?Name=Variable-Magic
homepage: http://search.cpan.org/dist/Variable-Magic/
license: http://dev.perl.org/licenses/
repository: http://git.profvince.com/?p=perl%2Fmodules%2FVariable-Magic.git
-version: 0.53
+version: '0.54'
Variable::Magic - Associate user-defined magic to variables from Perl.
VERSION
- Version 0.53
+ Version 0.54
SYNOPSIS
use Variable::Magic qw<wizard cast VMG_OP_INFO_NAME>;
* *copy*
- This magic only applies to tied arrays and hashes, and fires when
- you try to access or change their elements.
+ When applied to tied arrays and hashes, this magic fires when you
+ try to access or change their elements.
+
+ Starting from perl 5.17.0, it can also be applied to closure
+ prototypes, in which case the magic will be called when the
+ prototype is cloned. The "VMG_COMPAT_CODE_COPY_CLONE" constant is
+ true when your perl support this feature.
* *dup*
* *copy*
- $_[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.
* *fetch*, *store*, *exists* and *delete*
True for perls that don't call *delete* magic when you delete an element
from a hash in void context.
+ "VMG_COMPAT_CODE_COPY_CLONE"
+ True for perls that call *copy* magic when a magical closure prototype
+ is cloned.
+
"VMG_COMPAT_GLOB_GET"
True for perls that call *get* magic for operations on globs.
<http://www.profvince.com/perl/cover/Variable-Magic>.
COPYRIGHT & LICENSE
- Copyright 2007,2008,2009,2010,2011,2012,2013 Vincent Pit, all rights
- reserved.
+ Copyright 2007,2008,2009,2010,2011,2012,2013,2014 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.