This queue is for tickets about the Class-DBI CPAN distribution.

Report information
The Basics
Id:
15018
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
support [...] 2rad.net
Cc:
AdminCc:

BugTracker
Severity:
Wishlist
Broken in:
(no value)
Fixed in:
(no value)

Attachments


Subject: Added distinct() support for Iterator
This is not a problem, but a first attempt at a new feature. I've included a patch with an added method distinct('methodname') to Iterator. The purpose is to return an Iterator or Array of all the items that are distinct from the original Iterator. Example: my $it = My::Class->search(foo => 'bar'); $it->count(); # lets say it returns 80 my $distinct_iterator = $it->distinct('myfoo'); $distinct_iterator->count(); # now returns 35 It is not very efficient as it will create the objects to run the methods, but it does get the job done. Hope its useful.

Message body not shown because it is not plain text.

Date: Wed, 12 Oct 2005 10:05:44 +0100
From: Tony Bowden <tony@tmtm.com>
To: bug-Class-DBI@rt.cpan.org
Subject: Re: [cpan #15018] Added distinct() support for Iterator
RT-Send-Cc:
Guest via RT wrote:
Show quoted text
> This is not a problem, but a first attempt at a new feature. I've included a patch with an added method distinct('methodname') to Iterator. The purpose is to return an Iterator or Array of all the items that are distinct from the original Iterator.
I have to admit that I don't really see the point of this. However, you could always bundle this up as a Plugin that users can download from CPAN and use if they want this sort of feature. Tony


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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