use 5.010; use strict; use warnings; sub DESTROY { eval { "no error here" } } eval { my $x = bless {}; die "an error here"; }; say $@ ? "ERROR" : "no error caught";