Skip Menu |

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

Report information
The Basics
Id: 132112
Status: open
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: is_uniq and assert_uniq
Sometimes you want to make sure an array has no duplicate values. One way is scalar(@items) == scalar(uniq(@items)) It would be handy to have is_uniq(@items) Very often you just want to die on duplicate values. In that case an assert_uniq() routine is handy and it's also able to give a good error message. assert_uniq(@items) It would die with a message like List expected to contain unique values, but the value "xyz" appears more than once
I seriously see a use-case for is_uniq (or is_distinct), but the assert is a but to special to add a dedicated function for.