Skip Menu |
 

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

Report information
The Basics
Id: 49800
Status: resolved
Priority: 0/
Queue: List-MoreUtils

People
Owner: Nobody in particular
Requestors: dekimsey [...] gmail.com
THEPLER [...] cpan.org
user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: bug: uniq doesn't like undef values.
Download (untitled) / with headers
text/plain 419b
When using uniq on an array with undef values, warnings complains loudly. "Use of uninitialized value in subroutine entry at line 7". Although the correct uniq results will be returned, warnings doens't like it much. === use warnings; use List::MoreUtils qw(uniq); use Data::Dumper; my @foo = ('a','b', undef, 'b'); @foo = uniq @foo; # line 7. print Dumper \@foo; === This is perl 5.8.8 on linux.
Subject: XS version of uniq warns on undef values
Download (untitled) / with headers
text/plain 519b
This warns: $ perl -MList::MoreUtils=uniq -e 'use warnings; my @x = (undef, undef); @x = uniq(@x);' Use of uninitialized value in subroutine entry at -e line 1. Use of uninitialized value in subroutine entry at -e line 1. Use of uninitialized value in subroutine entry at -e line 1. But this does not: $ LIST_MOREUTILS_PP=1 perl -MList::MoreUtils=uniq -e 'use warnings; my @x = (undef, undef); @x = uniq(@x);' This is on perl 5.8.8. Seems like they should either both warn, or both not. I'd like them to not warn.
This is resolved in 0.23 which I just uploaded to the CPAN.
This is resolved in 0.23 which I just uploaded to the CPAN.
Subject: docs of how uniq() compares
Date: Fri, 18 Sep 2009 09:25:03 +1000
To: bug-List-MoreUtils [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
Download (untitled) / with headers
text/plain 188b
It'd be good if the docs of uniq() said how it compared for uniqueness. The example shows only numbers, but I see the code does it by string, with a slightly doubtful allowance for undef.
Download (untitled) / with headers
text/plain 265b
On Sun Jul 12 14:47:01 2009, VPARSEVAL wrote: Show quoted text
> This is resolved in 0.23 which I just uploaded to the CPAN.
Note that the 0.23 code line is no longer in the latest release, 0.26. Consequently this and a number of other tickets in this queue are no longer resolved.
Download (untitled) / with headers
text/plain 265b
On Sun Jul 12 14:47:57 2009, VPARSEVAL wrote: Show quoted text
> This is resolved in 0.23 which I just uploaded to the CPAN.
Note that the 0.23 code line is no longer in the latest release, 0.26. Consequently this and a number of other tickets in this queue are no longer resolved.
RT-Send-CC: dagolden [...] cpan.org
Download (untitled) / with headers
text/plain 319b
Patched in d33f81de - but the behavior is weird anyway. However, it's in the wild and I tend to keep the existing behavior until lot's of CPAN admins sign with their blood that's ok to modify the behavior. If reasonable I would add a $u{defined $_ ? $_ : ""}++ - which will slow down the routine but stops complaining.
That's finally the same issue


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.