Skip to content

Instantly share code, notes, and snippets.

@wakaba
Created October 1, 2013 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wakaba/6773867 to your computer and use it in GitHub Desktop.
Save wakaba/6773867 to your computer and use it in GitHub Desktop.
$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