| 1 | package Mongol::Cursor; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 1 | has 'result' => ( | |||||||||
| 6 | is => 'ro', | ||||||||||
| 7 | isa => 'MongoDB::QueryResult', | ||||||||||
| 8 | required => 1, | ||||||||||
| 9 | ); | ||||||||||
| 10 | |||||||||||
| 11 | 1 | has 'type' => ( | |||||||||
| 12 | is => 'ro', | ||||||||||
| 13 | isa => 'Str', | ||||||||||
| 14 | required => 1, | ||||||||||
| 15 | ); | ||||||||||
| 16 | |||||||||||
| 17 | 0 | ▶ | sub all { | ||||||||
|
Subroutine
all: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 18 | 0 | my $self = shift(); | |||||||||
| 19 | |||||||||||
| 20 | 0 | return map { $self->type()->to_object( $_ ) } | |||||||||
| 21 | $self->result()->all(); | ||||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub has_next { | ||||||||
|
Subroutine
has_next: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 25 | 0 | my $self = shift(); | |||||||||
| 26 | |||||||||||
| 27 | 0 | return $self->_result() | |||||||||
| 28 | ->has_next() | ||||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | ▶ | sub next { | ||||||||
|
Subroutine
next: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 32 | 0 | my $self = shift(); | |||||||||
| 33 | |||||||||||
| 34 | 0 | my $document = $self->result() | |||||||||
| 35 | ->next(); | ||||||||||
| 36 | |||||||||||
| 37 | 0 | ▶ | return defined( $document ) ? | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | $self->type()->to_object( $document ) : undef; | ||||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 1 | __PACKAGE__->meta()->make_immutable(); | |||||||||
| 42 | |||||||||||
| 43 | 1 | 1; | |||||||||
| 44 | |||||||||||
| 45 | __END__ | ||||||||||