Commit
27bdec06841 uses a loop variable that is not strictly local to
the loop. Perlcritic disapproves, and there's really no reason as the
variable is not used outside the loop.
Per buildfarm animals koel and crake.
sub make_ranges
{
my ($nums, $limit) = @_;
- my ($prev, $start, $curr, $total, @sorted, @range);
+ my ($prev, $start, $total, @sorted, @range);
@sorted = sort { $a <=> $b } @$nums;
# append final 'undef' to signal final iteration
push @sorted, undef;
- foreach $curr (@sorted)
+ foreach my $curr (@sorted)
{
# if last iteration always append the range
if (!defined($curr) || ($curr - $prev > $limit))