Ronald J Kimall wrote:
> So, going back to the original question, what should the behavior be
in this
> situation, where the key field passed to selectall_hashref() is not
unique?
>
> Should the current behavior continue, where it silently throws away
the
> extra rows, or should it throw an error or warning? Either way the
> documentation should be updated.
How about supporting multiple rows per key field? If there are multiple
rows, they could be returned as an array:
{
foo => [
{ col1 => foo, col2 => bar },
{ col1 => foo, col2 => moo },
],
}
I realize this would break some existing code (although this code is
_already_ broken in a certain sense), so perhaps it is best implemented
as an option?
This solution would resolve the problem, it seems like overkill to
account for "misuse" of selecttall_hashref().
- Jim