Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: RFC: Array::GroupBy

by Jenda (Abbot)
on Jan 06, 2009 at 16:26 UTC ( [id://734466]=note: print w/replies, xml ) Need Help??


in reply to RFC: Array::GroupBy

I do not see a reason to disallow empty group_by.

What about passing the whole records to the custom (code reference) agregators for some specially named group_how options? Eg.

... group_how => { '&foo' => sub { my ( $result, $rec) = @_; return $result + $rec->{a} * $rec->{b} }, ...
producing a new attribute named 'foo' in the resulting records.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://734466]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-19 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found