Re: How to check if a DateTime is invalid (again - but this time without using eval)?
[email protected] (Ben Tilly) Fri, 7 Jul 2017 09:17:08 -0700
| Newsgroups | perl.datetime |
|---|---|
| Message-ID | <CANoac9V0HiyN0A-BCQ0tWMba-BEGozR+qp9HyPD=hFBywHg=yw@mail.gmail.com> |
That is not true.
One of the biggest edge cases is what happens if you have signals from
other processes. A signal caught inside of an eval {} that generates an
exception will generate a $@ there. This has to be handled each and every
time. The odds of catching an individual signal inside of a fast eval {}
like this are low, but if you've got a lot of evals and subprocesses,
eventually you'll encounter weird random misbehaviors that are hard to
understand...and which if understood can require a lot of rewriting to fix.
On Wed, Jul 5, 2017 at 8:23 AM, Eric Brine <[email protected]> wrote:
> On Wed, Jul 5, 2017 at 10:59 AM, Thomas (HFM) Wyant <
> [email protected]> wrote:
>
>> One of the edge cases with eval {} is ...
>>
>
> All the edge cases are covered by the previously linked:
> https://metacpan.org/pod/Try::Tiny#BACKGROUND
>