develooper Front page | perl.datetime | Postings from July 2017

Re: How to check if a DateTime is invalid (again - but this timewithout using eval)?

Thread Previous | Thread Next
From:
Ben Tilly
Date:
July 7, 2017 16:17
Subject:
Re: How to check if a DateTime is invalid (again - but this timewithout using eval)?
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 <ikegami@adaelis.com> wrote:

> On Wed, Jul 5, 2017 at 10:59 AM, Thomas (HFM) Wyant <
> harryfmudd@comcast.net> 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
>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About