Skip Menu |

This queue is for tickets about the DateTime-Format-Duration CPAN distribution.

Report information
The Basics
Id: 124083
Status: new
Priority: 0/
Queue: DateTime-Format-Duration

People
Owner: Nobody in particular
Requestors: haukex [...] zero-g.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.04
Fixed in: (no value)



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