in reply to Re: Class::DBI 'distinct' records
in thread Class::DBI 'distinct' records

Thanks for the helpful replies so far. I think that maybe I wasn't entirely clear, however. I was thinking of returning a list of distinct objects:
table units: name location ------------------ foo_unit 1 foo_unit 2 bar_unit 1 baz_unit 3
I was hoping to find something like:
$iterator = Package::units->search_distinct(name); while ($iterator->next) { print }; foo bar baz
While the first suggestion will allow me to do this (thank you), I was hoping that I could find a way to do it without hardcoding each individual query into the class.

Regarding the schema: It is part of an existing project that cannot (easily) be changed.