From: Vincent Pit Date: Sat, 18 Aug 2012 15:00:32 +0000 (+0200) Subject: This is 0.51 X-Git-Tag: v0.51^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=22768b2c966463cd2574d2f7f7ea5c1cf494456b This is 0.51 --- diff --git a/Changes b/Changes index 4ad0f49..2c1ca8d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,17 @@ Revision history for Variable-Magic +0.51 2012-08-18 15:00 UTC + + Fix : It is now safe to call dispell() from inside 'free', 'copy' and + 'uvar' callbacks to dispell the magic currently in use. + Thanks Clinton Gormley for reporting. + + Fix : Exceptions thrown from inside a 'free' callback are now always + consistently propagated outside of the callback. They used to + be lost when the 'free' callback was invoked at the end of an + eval block or string. + + Fix : The 'reset RMG flag' workaroundn used to allow wizards with + both 'uvar' and 'clear' magics to be cast onto a hash, has been + made thread-safe. + 0.50 2012-06-24 23:00 UTC + Fix : Less memory is leaked when a wizard is freed during global destruction, or when an exception is thrown from a 'free' diff --git a/META.json b/META.json index 556c5e4..a1c163b 100644 --- a/META.json +++ b/META.json @@ -60,5 +60,5 @@ "url" : "http://git.profvince.com/?p=perl%2Fmodules%2FVariable-Magic.git" } }, - "version" : "0.50" + "version" : "0.51" } diff --git a/META.yml b/META.yml index 19949bf..ea2399a 100644 --- a/META.yml +++ b/META.yml @@ -35,4 +35,4 @@ resources: 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.50 +version: 0.51 diff --git a/README b/README index cc595c2..a7c0959 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Variable::Magic - Associate user-defined magic to variables from Perl. VERSION - Version 0.50 + Version 0.51 SYNOPSIS use Variable::Magic qw; @@ -63,13 +63,18 @@ DESCRIPTION the correct "Tie::Std*" class and overriding individual methods in your own class. + * Magic is multivalued. + + You can safely apply different kinds of magics to the same variable, + and each of them will be invoked successively. + * Magic is type-agnostic. The same magic can be applied on scalars, arrays, hashes, subs or globs. But the same hook (see below for a list) may trigger differently depending on the the type of the variable. - * Magic is invisible at the Perl level. + * Magic is invisible at Perl level. Magical and non-magical variables cannot be distinguished with "ref", "tied" or another trick. @@ -111,9 +116,11 @@ DESCRIPTION * *free* - This magic is called when an object is destroyed as the result of - the variable going out of scope (but not when the variable is - undefined). + This magic is called when a variable is destroyed as the result of + going out of scope (but not when it is undefined). It behaves + roughly like Perl object destructors (i.e. "DESTROY" methods), + except that exceptions thrown from inside a *free* callback will + always be propagated to the surrounding code. * *copy* diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm index 5b2086b..2fe47c9 100644 --- a/lib/Variable/Magic.pm +++ b/lib/Variable/Magic.pm @@ -11,13 +11,13 @@ Variable::Magic - Associate user-defined magic to variables from Perl. =head1 VERSION -Version 0.50 +Version 0.51 =cut our $VERSION; BEGIN { - $VERSION = '0.50'; + $VERSION = '0.51'; } =head1 SYNOPSIS