eval {
local $SIG{INT} = sub { die "SIGINT\n" };
# Do all the resource allocation and work here.
# All the resources have gone out of scope by the
# end of this block.
}
if($@) {
kill 'INT', $$ if $@ eq "SIGINT\n";
die $@;
}
####
sub DESTROY { print "DESTROY\n"; die; print "HUH\n"; }
{ my $x = bless []; }
print "DONE\n";
####
DESTROY
DONE