{ package Error; use strict; use warnings; sub new { bless {}, $_[0] } sub DESTROY { warn "NEIN!\n"; die { error => "NEEEEEEEEEEEIN!" }; warn "NEIN2!\n"; } } { my $error = Error->new(); print "ja\n"; } print "Dürfte nie erscheinen!\n"; if ( $@ ) { print $@->{error}, "\n"; }