Skip Menu |
 

This queue is for tickets about the Array-Utils CPAN distribution.

Report information
The Basics
Id: 75847
Status: new
Priority: 0/
Queue: Array-Utils

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

Bug Information
Severity: Normal
Broken in: 0.5
Fixed in: (no value)



Subject: unique shuffles the array
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1332008801-10814-401"
Content-Length: 0
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 258
Download (untitled) / with headers
text/plain 258b
The `unique` method seems to shuffle the array order. Can this be updated to preserve the existing order yet unique-fy by "first occurrence wins"? If not - please update the documentation to reflect the _shuffle_ behavior. Patch attached. Thanks, Mithun
Subject: Utils.pm.patch
MIME-Version: 1.0
Content-Type: application/octet-stream; name="Utils.pm.patch"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline; filename="Utils.pm.patch"
Content-Transfer-Encoding: base64
Content-Length: 115
Download Utils.pm.patch
text/x-diff 115b
109,110c109 < my %e; < return grep { ! $e{$_}++ } @_; --- > return keys %{ {map { $_ => undef } @_}};


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.