Mongoose
view release on metacpan or search on metacpan
lib/Mongoose/Cursor.pm view on Meta::CPAN
map { $self->_class->expand( $_ ) } $self->$orig(@_);
};
}
# Dumb re-implementation of deprecated count() method
sub count {
my $self = shift;
$self->_class->count($self->_query->filter);
}
sub each(&) {
my ( $self, $cb ) = @_;
while( my $r = $self->next ) { last unless defined $cb->($r) }
}
sub hash_on {
my ($self, $key) = @_;
my %hash;
while( my $r = $self->next ) {
$hash{ $r->{$key} } = $r unless exists $hash{ $r->{$key} };
( run in 0.306 second using v1.01-cache-2.11-cpan-49f99fa48dc )