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:
Binarus
Date:
July 3, 2017 08:00
Subject:
Re: How to check if a DateTime is invalid (again - but this timewithout using eval)?
Message ID:
209240c3-2cbe-1536-35af-f360f4662ab1@binarus.de
On 03.07.2017 05:57, Bill Ricker wrote:

> Unpacking it a little ...​
> 
> ​1. Scalar Eval​
> [...] 
> 
> 2. Block Eval
> [...]
> 
> 3. Try-Catch
> [...]
> 

Thank you very much for your elaborated and understandable answer.

My main problem was that from my readings I got the impression that even
the block eval might be problematic (please see my answer to Thomas
Klausner's first post if you are interested what made me believe so).

In the meantime, I have decided to go the way everybody proposes here.
I'll use a block eval to catch the error, probably with a local DIE
handler in the block (still thinking about that - I don't need to "catch
errors" at other places, and I don't use DIE handlers at other places,
so it is probably not necessary).

Regards,

Binarus

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