projects
/
p5sagit/Mutually-Assured-Destruction.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
68d6f88
)
demonstrate bless/cast order doesn't affect DESTROY versus magic destruction order
Matt S Trout [Mon, 15 Jun 2009 19:47:39 +0000 (20:47 +0100)]
notes/destruction-order.pl
patch
|
blob
|
blame
|
history
diff --git
a/notes/destruction-order.pl
b/notes/destruction-order.pl
index
6d465f8
..
2fe911e
100644
(file)
--- a/
notes/destruction-order.pl
+++ b/
notes/destruction-order.pl
@@
-25,6
+25,21
@@
my $wiz = wizard data => sub { $_[1] },
{
warn "Stanza 2\n";
+
+ my %foo;
+
+ my $foo = \%foo;
+
+ cast $foo, $wiz, '$foo';
+
+ cast %foo, $wiz, '%foo';
+
+ bless($foo, 'Foo');
+
+}
+
+{
+ warn "Stanza 3\n";
my $foo = do {
my %foo;