From: Vincent Pit <vince@profvince.com>
Date: Fri, 17 Feb 2012 23:38:07 +0000 (+0100)
Subject: This is 0.48
X-Git-Tag: v0.48^0
X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=b2fbd6650bf935caee0c11a5c93f15070cdfd1d9;p=perl%2Fmodules%2FVariable-Magic.git

This is 0.48
---

diff --git a/Changes b/Changes
index 1a1ccb7..1ac305f 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
 Revision history for Variable-Magic
 
+0.48    2012-02-17 23:40 UTC
+        + Add : You can now pass a reference to undef as the magic callback in
+                order to install a no-op callback.
+                Thanks Florian Ragwitz for the suggestion.
+
 0.47    2011-10-27 16:55 UTC
         + Add : The new constant VMG_COMPAT_HASH_DELETE_NOUVAR_VOID evaluates
                 to true when "delete $hash{key}" does not call 'delete' uvar
diff --git a/META.json b/META.json
index dcdf96f..aec4415 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Vincent Pit <perl@profvince.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112621",
+   "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120351",
    "license" : [
       "perl_5"
    ],
@@ -22,27 +22,27 @@
    "prereqs" : {
       "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"
          }
       },
       "runtime" : {
          "requires" : {
-            "Carp" : 0,
-            "Exporter" : 0,
-            "XSLoader" : 0,
-            "base" : 0,
+            "Carp" : "0",
+            "Exporter" : "0",
+            "XSLoader" : "0",
+            "base" : "0",
             "perl" : "5.008"
          }
       }
@@ -60,5 +60,5 @@
          "url" : "http://git.profvince.com/?p=perl%2Fmodules%2FVariable-Magic.git"
       }
    },
-   "version" : "0.47"
+   "version" : "0.48"
 }
diff --git a/META.yml b/META.yml
index 7c5a46c..b40f326 100644
--- a/META.yml
+++ b/META.yml
@@ -14,7 +14,7 @@ configure_requires:
   Config: 0
   ExtUtils::MakeMaker: 0
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112621'
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.120351'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -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.47
+version: 0.48
diff --git a/README b/README
index 9ab46cb..abba925 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
     Variable::Magic - Associate user-defined magic to variables from Perl.
 
 VERSION
-    Version 0.47
+    Version 0.48
 
 SYNOPSIS
         use Variable::Magic qw<wizard cast VMG_OP_INFO_NAME>;
@@ -234,8 +234,19 @@ FUNCTIONS
         straight to the perl magic API. However, only the return value of
         the "len" callback currently holds a meaning.
 
-    Each callback can be specified as a code or a string reference, in which
-    case the function denoted by the string will be used as the callback.
+    Each callback can be specified as :
+
+    *   a code reference, which will be called as a subroutine.
+
+    *   a string reference, where the string denotes which subroutine is to
+        be called when magic is triggered. If the subroutine name is not
+        fully qualified, then the current package at the time the magic is
+        invoked will be used instead.
+
+    *   a reference to "undef", in which case a no-op magic callback is
+        installed instead of the default one. This may especially be helpful
+        for 'local' magic, where an empty callback prevents magic from being
+        copied during localization.
 
     Note that "free" callbacks are *never* called during global destruction,
     as there's no way to ensure that the wizard and the "free" callback
@@ -550,7 +561,8 @@ SUPPORT
     <http://www.profvince.com/perl/cover/Variable-Magic>.
 
 COPYRIGHT & LICENSE
-    Copyright 2007,2008,2009,2010,2011 Vincent Pit, all rights reserved.
+    Copyright 2007,2008,2009,2010,2011,2012 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.
diff --git a/lib/Variable/Magic.pm b/lib/Variable/Magic.pm
index bfa64d0..0a727bd 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.47
+Version 0.48
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.47';
+ $VERSION = '0.48';
 }
 
 =head1 SYNOPSIS