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

2017-07-05 Thread Thomas (HFM) Wyant
> On July 3, 2017 at 7:09 AM Rick Measham wrote: > > > I'm not sure what you mean by 'local DIE handlers'. Are you talking about > defining a local $SIG{__DIE__} ? > > I've been out of perl for a couple of years, but surely you should just > use eval{} ? > > >

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

2017-07-05 Thread Bill Moseley
Haven't those issues with eval been addressed in more recent versions of Perl? For example, in older Perls this used to reset $@, but now $@ is retained: use strict; use warnings; sub Foo::DESTROY { print "in Foo Destroy\n"; eval { 1 }; print "Foo has \$@ as '$@'\n" return; }

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

2017-07-05 Thread Dave Rolsky
On Wed, Jul 5, 2017 at 10:23 AM, Eric Brine wrote: > On Wed, Jul 5, 2017 at 10:59 AM, Thomas (HFM) Wyant < > harryfm...@comcast.net> wrote: > >> One of the edge cases with eval {} is ... >> > > All the edge cases are covered by the previously linked: >

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

2017-07-05 Thread Dave Rolsky
On Wed, Jul 5, 2017 at 12:49 PM, Eric Brine wrote: > On Wed, Jul 5, 2017 at 12:43 PM, Dave Rolsky wrote: > >> On Wed, Jul 5, 2017 at 11:27 AM, Bill Moseley wrote: >> >>> Haven't those issues with eval been addressed in more recent

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

2017-07-05 Thread Eric Brine
On Wed, Jul 5, 2017 at 1:56 PM, Eric Brine wrote: > On Wed, Jul 5, 2017 at 1:53 PM, Dave Rolsky wrote: > >> On Wed, Jul 5, 2017 at 12:49 PM, Eric Brine wrote: >> >>> On Wed, Jul 5, 2017 at 12:43 PM, Dave Rolsky

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

2017-07-05 Thread Eric Brine
On Wed, Jul 5, 2017 at 12:43 PM, Dave Rolsky wrote: > On Wed, Jul 5, 2017 at 11:27 AM, Bill Moseley wrote: > >> Haven't those issues with eval been addressed in more recent versions of >> Perl? Well, that's one issue, but there are others, for example $@

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

2017-07-05 Thread Eric Brine
On Wed, Jul 5, 2017 at 1:53 PM, Dave Rolsky wrote: > On Wed, Jul 5, 2017 at 12:49 PM, Eric Brine wrote: > >> On Wed, Jul 5, 2017 at 12:43 PM, Dave Rolsky wrote: >> >>> On Wed, Jul 5, 2017 at 11:27 AM, Bill Moseley