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 07:49
Subject:
Re: How to check if a DateTime is invalid (again - but this timewithout using eval)?
Message ID:
9e216844-3ad0-e835-fe39-15134f64c19b@binarus.de
On 02.07.2017 22:02, Eric Brine wrote:
> `eval BLOCK` is very different `eval EXPR`. 
> 
> The latter involves the need to generate Perl code, and ask the related
> risks. That's not the case for the former, which is the right tool for
> the job here. 
> 

Thank you very much for your answer. I have decided to solve my problem
by using a block eval, probably with a local DIE handler added in the
block (but still thinking about whether this is necessary - I won't use
other DIE handlers and don't need to "catch errors" at any other places).

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