Skip Menu |

This queue is for tickets about the List-MoreUtils CPAN distribution.

Report information
The Basics
Id: 132111
Status: rejected
Priority: 0/
Queue: List-MoreUtils

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

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



Subject: Wishlist: classical 'uniq' equivalent, trimming consecutive duplicates only
uniq() removes duplicate elements no matter what order they are seen in. This differs from Unix's uniq(1) which only removes consecutive duplicates (and so requires sorted input if you want to guarantee all duplicates are removed). However, the consecutive-only behaviour requires less memory and sometimes the weaker filtering is what you want. Please add uniq_consecutive() which trims consecutive repeats of the same string.
Please send a patch including patch for Tests and XS.
In List::Util is already an implementation for a behavior, which fits exactly to the expressed wish. Since List::Util comes with core, there is no reason to add a likely weird named additional slightly different behaving uniq here.