Skip Menu |
 

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

Report information
The Basics
Id: 132112
Status: new
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
Download (untitled) / with headers
text/plain 468b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.