Mongol/Cursor.pm

filter: Statementstmt 46.6% 7 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 1 / 4 Podpod 100% 3 / 3 totaltotal 45.8% 11 / 24 CC 2 SCAR 12.2
CC
2
Cov
41%
next
6.0
all
2.0
has_next
2.0
CRAP 3.4
« Mongol/Roles/Core.pm ↑ Summary Mongol/Roles/UUID.pm »
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
BranchTrueFalseTotal
defined $document ? : 0 0 0
38 $self->type()->to_object( $document ) : undef;
39 }
40  
41 1 __PACKAGE__->meta()->make_immutable();
42  
43 1 1;
44  
45 __END__
« Mongol/Roles/Core.pm ↑ Summary Mongol/Roles/UUID.pm »