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

[email protected] (Binarus) Mon, 3 Jul 2017 09:02:59 +0200
Newsgroups perl.datetime
Message-ID <[email protected]>
On 02.07.2017 12:24, Zefram wrote:
> Binarus wrote:
>> - Most people recommend to "catch the error" DateTime throws when
>> encountering such date-times, but if I got it right, that always
>> involves eval, even when using modules like Try:Tiny and the like, so I
>> don't want to do that.
> 
> Do this.  eval is the right tool for the job.
> 

Thank you very much for your answer. I have decided to follow your
advice. I will use an eval block where I try to construct the date-time,
and will probably add a local DIE handler in there (although I have no
other DIE handlers installed anywhere, so I am still thinking about it).

Regards,

Binarus