Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MongoDB CPAN distribution.

Maintainer(s)' notes

Please don't report bugs here. Please use the MongoDB Perl driver issue tracker instead.

Report information
The Basics
Id: 67535
Status: resolved
Priority: 0/
Queue: MongoDB

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

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



Subject: if group() exists, I can't find the docs on it. is $cmd necessary?
If there is a group() somewhere and I just can't find it, there should probably be a doc for it. If $cmd is necessary, something like this (ie, an example) should be added to tutorial or ::Database or something. It took me a while to work out the esoteric characters involved. my $cmd = MongoDB::Connection->new->databasename->get_collectin('$cmd'); my $sum = $cmd->group({group=>{ ns=>"collection", '$reduce'=>'function(o,p){p.sum += o.o;}', initial=>{sum=>0}}})->{retval}{sum}; }; If this *is* in the docs somewhere, then sorry in advance. That happens to me a lot. -Paul -- If riding in an airplane is flying, then riding in a boat is swimming. 116 jumps, 48.6 minutes of freefall, 92.9 freefall miles.
You can use MongoDB::Database::run_command. I'll add an example for group to the docs.