The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

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

VERSION

version 0.13

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;
        });