It continued , "How can I get around" the call of death "in the Perl library that I can not change? .
I have a routine that causes a library to crash - sometimes many times. Instead of eating every call inside this routine with eval {}, I just let it die and use eval {} at the level that calls my routine:
my $status=eval{function($param);};
unless($status){print $@; next;};
However, there are errors that I can and can catch in the function (). What is the most correct / elegant way to develop errors in a subroutine and calling procedure so that I get the correct behavior for both caught and uncaught errors?
source
share