Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Which incarnation of try/catch to use?

by BillKSmith (Monsignor)
on Oct 02, 2023 at 15:01 UTC ( [id://11154795] : note . print w/replies, xml ) Need Help??


in reply to Which incarnation of try/catch to use?

Regardless of which try/catch you choose, you should consider using object oriented exceptions (Exception::Class). They are usually overkill, but can offer a big advantage when your catch has to know which exception it is handling.

The documentation is terse, but very good on how to use it, but offers little help on when. The only guidelines that I know of are in the book "Perl Best Practices".

Bill
  • Comment on Re: Which incarnation of try/catch to use?