The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mongoose::Cursor - a Mongoose wrapper for MongoDB::Cursor

VERSION

version 0.04

DESCRIPTION

Extends Mongoose::Cursor.

Wraps MongoDB::Cursor's next and allmethods, so that it expands a document into a class.

METHODS

For your convenience:

each

Iterates over a cursor, calling your sub.

        Person->find->each( sub {
                my $obj = shift;

                # do stuff

                # return undef to break out
                return undef if $done;
        });