Handling errors the smart way
l For simple applications immediate death on error is fine
l For more advanced applications greater control is needed
l Life after death:
$h->{RaiseError} = 1;
eval { … $h->method; … };
if ($@) { … }
l Bonus prize
n Other, non-DBI, code within the eval block may also raise an
exception that will be caught and handled cleanly
19