Created
October 1, 2013 04:28
-
-
Save wakaba/6773867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Called = 0; | |
{ | |
package Package1; | |
sub DESTROY { | |
$main::Object1 = $_[0]; | |
$main::Called++; | |
} | |
} | |
my $obj = bless {}, 'Package1'; | |
undef $obj; | |
undef $main::Object1; | |
warn $Called; | |
__END__ | |
2 at aa.pl line 18. | |
DESTROY created new reference to dead object 'Package1' during global destruction. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment