From: Vincent Pit Date: Sun, 8 Feb 2009 11:06:33 +0000 (+0100) Subject: This is 0.29 X-Git-Tag: v0.29 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=refs%2Ftags%2Fv0.29;p=perl%2Fmodules%2FVariable-Magic.git This is 0.29 --- diff --git a/Changes b/Changes index 7c6fe67..c7f7067 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,15 @@ Revision history for Variable-Magic +0.29 2009-02-08 11:10 UTC + + Add : Set $_[2] to the default length for len magic on scalars. + + Chg : Perl 5.8 is required. + + Chg : The CLONE method will no longer be defined for non-threaded + perls. + + Doc : Nits. + + Fix : The logic for turning off the GMAGICAL flag on hashes when no + uvar magic is involved could do nasty things on tied hashes. + + Upd : More resources in META.yml. + 0.28 2009-01-24 17:05 UTC + Add : The 'copy_key' option to wizard(), that enables the safe edition of $_[2] in uvar callbacks to redirect actions to another key. diff --git a/META.yml b/META.yml index d276af4..5964435 100644 --- a/META.yml +++ b/META.yml @@ -1,17 +1,28 @@ --- #YAML:1.0 name: Variable-Magic -version: 0.28 +version: 0.29 abstract: Associate user-defined magic to variables from Perl. author: - Vincent Pit license: perl distribution_type: module configure_requires: + Config: 0 ExtUtils::MakeMaker: 0 +build_requires: + Config: 0 + ExtUtils::MakeMaker: 0 + Test::More: 0 requires: Carp: 0 Exporter: 0 + perl: 5.008 XSLoader: 0 +resources: + bugtracker: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Variable-Magic + homepage: http://search.cpan.org/dist/Variable-Magic/ + license: http://dev.perl.org/licenses/ + repository: http://git.profvince.com/perl/modules/Variable-Magic.git no_index: directory: - t @@ -20,10 +31,3 @@ generated_by: ExtUtils::MakeMaker version 6.48 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 -build_requires: - Config: 0 - ExtUtils::MakeMaker: 0 - Test::More: 0 -resources: - bugtracker: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Variable-Magic - repository: http://git.profvince.com/perl/modules/Variable-Magic.git diff --git a/README b/README index 03cda6c..476e5a3 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME 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/; @@ -249,20 +249,21 @@ FUNCTIONS (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 @@ -356,7 +357,7 @@ CAVEATS first. DEPENDENCIES - perl 5.7.3. + perl 5.8. Carp (standard since perl 5), XSLoader (standard since perl 5.006). diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index 179605e..79ca7e9 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -13,13 +13,13 @@ Variable::Magic - Associate user-defined magic to variables from Perl. =head1 VERSION -Version 0.28 +Version 0.29 =cut our $VERSION; BEGIN { - $VERSION = '0.28'; + $VERSION = '0.29'; } =head1 SYNOPSIS