lib/Neo4j/Types/Path.pm

filter: Statementstmt 100% 24 / 24 Branchbran 100% 6 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 3 / 3 totaltotal 100% 39 / 39 SCAR 13.9
CC
4
Cov
100%
elements
2.0
nodes
2.0
relationships
2.0
CRAP 4.0
« lib/Neo4j/Types/Node.pm ↑ Summary lib/Neo4j/Types/Point.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Neo4j::Types::Path;
5 # ABSTRACT: Represents a directed sequence of relationships between two nodes
6 2 $Neo4j::Types::Path::VERSION = '1.00';
7  
8 2 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10  
11 sub elements {
12 6 ▶ my ($self) = @_;
Subroutine elements: called CC=2 SCAR=6.9
Pod documented
13
14 6 ▶ croak 'elements() in scalar context not supported' unless wantarray;
Branch: 1 branch
BranchTrueFalseTotal
unless wantarray 2 4 6
15 4 return @$self;
16 }
17  
18  
19 sub nodes {
20 6 ▶ my ($self) = @_;
Subroutine nodes: called CC=2 SCAR=6.9
Pod documented
21
22 6 ▶ croak 'nodes() in scalar context not supported' unless wantarray;
Branch: 1 branch
BranchTrueFalseTotal
unless wantarray 2 4 6
23 4 my $i = 0;
24 4 return grep { ++$i & 1 } @$self;
25 }
26  
27  
28 sub relationships {
29 6 ▶ my ($self) = @_;
Subroutine relationships: called CC=2 SCAR=6.9
Pod documented
30
31 6 ▶ croak 'relationships() in scalar context not supported' unless wantarray;
Branch: 1 branch
BranchTrueFalseTotal
unless wantarray 2 4 6
32 4 my $i = 0;
33 4 return grep { $i++ & 1 } @$self;
34 }
35  
36  
37 2 1;
38  
39 __END__
« lib/Neo4j/Types/Node.pm ↑ Summary lib/Neo4j/Types/Point.pm »