Prev: FAQ 4.30 How do I capitalize all the words on one line?
Next: FAQ 8.15 How do I set the time and date?
From: Chris Nehren on 15 Jun 2010 22:08 On 2010-06-15, Keith Thompson scribbled these curious markings: > PerlFAQ Server <brian(a)theperlreview.com> writes: > [...] >> If exception handling is all you're interested in, try the >> "exceptions.pl" library (part of the standard perl distribution). > [...] > > You probably don't want to recommend "exceptions.pl". Note the ".pl" > rather than ".pm" suffix; as I understand it, that means you have > to use > do 'exceptions.pl'; > rather than the modern: > use exceptions; > > And the comment header says: > > # This library is no longer being maintained, and is included for backward > # compatibility with Perl 4 programs which may require it. > # > # In particular, this should not be used as an example of modern Perl > # programming techniques. Wow, indeed. Probably best with Try::Tiny these days. Or, if you've already got {Devel,MooseX}::Declare loaded or want the extra features, see TryCatch. -- Thanks and best regards, Chris Nehren Unless noted, all content I post is CC-BY-SA. |