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

[email protected] (Binarus) Mon, 3 Jul 2017 10:00:52 +0200
Newsgroups perl.datetime
Message-ID <[email protected]>
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