K
K
Konvergent2019-09-12 15:14:06
Perl
Konvergent, 2019-09-12 15:14:06

Try-Catch in PERL yes or no?

I'm wondering who in the industry uses try-catch? I need a stable code on the project with rechecks for different cases, but in addition to all this, the product is associated with a large load, and code profiling shows a large load of such checks.
I would be grateful if anyone could share their opinion/experience on this matter.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zlo1, 2019-09-12
@zlo1

if you use the Try::Tiny (try-catch) module , this is a wrapper over eval
for multi-threaded applications, so as not to block eval with alarm,
except for the array of child PIDs, for each I store the start time - I kill long (hanging) processes

D
dionys, 2019-09-19
@dionys

I use Syntax::Keyword::Try. It works as a language extension rather than a wrapper around eval, so it doesn't have most of the limitations of modules like Try::Tiny.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question