]> git.vpit.fr Git - perl/modules/Variable-Magic.git/commitdiff
A note on global destruction and free callbacks
authorVincent Pit <vince@profvince.com>
Sun, 22 Feb 2009 11:08:30 +0000 (12:08 +0100)
committerVincent Pit <vince@profvince.com>
Sun, 22 Feb 2009 11:08:30 +0000 (12:08 +0100)
lib/Variable/Magic.pm

index ac1f80676074026591be2e87afd3f54e0dad5006..45ba9b533fda18fc139a78ceb47001802882f393 100644 (file)
@@ -293,6 +293,8 @@ However, only the return value of the C<len> callback currently holds a meaning.
                      set  => sub { print STDERR "set to ${$_[0]}\n" },
                      free => sub { print STDERR "${$_[0]} was deleted\n" }
 
+Note that C<free> callbacks are I<never> called during global destruction, as there's no way to ensure that the wizard and the C<free> coderef weren't destroyed before the scalar.
+
 =cut
 
 sub wizard {