Subject: | Infinite recursion in normalize() |
Hi,
The following code causes infinite recursion in DateTime::Format::Duration::_denegate(). From a quick look at the source, my understanding so far is that _denegate() checks, but never adjusts the nanoseconds value, leading to "%delta = _denegate(%delta)" being called over and over again.
use DateTime::Duration;
use DateTime::Format::Duration;
my $dur = DateTime::Duration->new(minutes=>1,
seconds=>-1, nanoseconds=>-1);
my $fmt = DateTime::Format::Duration->new();
$fmt->normalize($dur);
Regards,
-- Hauke D