Safer Polymorphism with Exceptions Sometimes, it is cool to just call a method. If it is not defined, the program dies and you correct the situation. Sometimes it is not cool. Perl uses die and eval to provide runtime exception handling. eval { print $object->foo; # Calls die() without foo. }; if ($@) { warn "object has no attribute foo"; }