Created
December 5, 2012 16:28
-
-
Save semifor/4217145 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
#!/usr/bn/env perl | |
use 5.12.1; | |
use warnings; | |
package Foo { | |
use Devel::GlobalDestruction; | |
sub new { bless {}, ref $_[0] || $_[0] } | |
sub DESTROY { | |
return if in_global_destruction; | |
say "Gasp!"; | |
} | |
} | |
my $foo = Foo->new; | |
exit 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment