Skip Menu |

This queue is for tickets about the Iterator-Util CPAN distribution.

Report information
The Basics
Id: 72248
Status: new
Priority: 0/
Queue: Iterator-Util

People
Owner: Nobody in particular
Requestors: DAMS [...] cpan.org
Cc:
AdminCc:

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



Subject: ihead doesn't test for exhaustion properly
line 195, in the ihead() function : Iterator::is_done if $num <= 0; That means that the ihead() will report exhaustion as soon as $num values have been returned. That's all good, except when $iter contains *less* elements than $num. In this case, exhaustion is not properly reported. I propose the line to be changed into : Iterator::is_done if $num <= 0 || $iter->is_exhausted();