line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
17
|
|
|
17
|
|
321
|
use 5.010; |
|
17
|
|
|
|
|
65
|
|
2
|
17
|
|
|
17
|
|
97
|
use strict; |
|
17
|
|
|
|
|
27
|
|
|
17
|
|
|
|
|
378
|
|
3
|
17
|
|
|
17
|
|
92
|
use warnings; |
|
17
|
|
|
|
|
32
|
|
|
17
|
|
|
|
|
452
|
|
4
|
17
|
|
|
17
|
|
96
|
use utf8; |
|
17
|
|
|
|
|
29
|
|
|
17
|
|
|
|
|
83
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package Neo4j::Driver::Type::Path; |
7
|
|
|
|
|
|
|
# ABSTRACT: Directed sequence of relationships between two nodes |
8
|
|
|
|
|
|
|
$Neo4j::Driver::Type::Path::VERSION = '0.40'; |
9
|
|
|
|
|
|
|
|
10
|
17
|
|
|
17
|
|
1023
|
use parent 'Neo4j::Types::Path'; |
|
17
|
|
|
|
|
38
|
|
|
17
|
|
|
|
|
100
|
|
11
|
17
|
|
|
17
|
|
14121
|
use overload '@{}' => \&_array, fallback => 1; |
|
17
|
|
|
|
|
38
|
|
|
17
|
|
|
|
|
120
|
|
12
|
|
|
|
|
|
|
|
13
|
17
|
|
|
17
|
|
1371
|
use Carp qw(croak); |
|
17
|
|
|
|
|
28
|
|
|
17
|
|
|
|
|
5953
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub nodes { |
17
|
14
|
|
|
14
|
1
|
9137
|
my ($self) = @_; |
18
|
|
|
|
|
|
|
|
19
|
14
|
|
|
|
|
24
|
my $i = 0; |
20
|
14
|
|
|
|
|
23
|
return grep { ++$i & 1 } @{$self->{path}}; |
|
46
|
|
|
|
|
132
|
|
|
14
|
|
|
|
|
43
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub relationships { |
25
|
13
|
|
|
13
|
1
|
6883
|
my ($self) = @_; |
26
|
|
|
|
|
|
|
|
27
|
13
|
|
|
|
|
24
|
my $i = 0; |
28
|
13
|
|
|
|
|
21
|
return grep { $i++ & 1 } @{$self->{path}}; |
|
39
|
|
|
|
|
114
|
|
|
13
|
|
|
|
|
77
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub elements { |
33
|
10
|
|
|
10
|
1
|
4510
|
my ($self) = @_; |
34
|
|
|
|
|
|
|
|
35
|
10
|
|
|
|
|
17
|
return @{$self->{path}}; |
|
10
|
|
|
|
|
56
|
|
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub path { |
40
|
|
|
|
|
|
|
# uncoverable pod (see Deprecations.pod) |
41
|
1
|
|
|
1
|
0
|
51
|
my ($self) = @_; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
16
|
warnings::warnif deprecated => __PACKAGE__ . "->path() is deprecated; use elements()"; |
44
|
1
|
|
|
|
|
675
|
return [ @{$self->{path}} ]; |
|
1
|
|
|
|
|
4
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _array { |
49
|
1
|
|
|
1
|
|
52
|
my ($self) = @_; |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
16
|
warnings::warnif deprecated => "Direct array access is deprecated; use " . __PACKAGE__ . "->elements()"; |
52
|
1
|
|
|
|
|
676
|
return $self->{path}; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# for experimental Cypher type system customisation only |
57
|
|
|
|
|
|
|
sub _private { |
58
|
2
|
|
|
2
|
|
6
|
my ($self) = @_; |
59
|
|
|
|
|
|
|
|
60
|
2
|
|
100
|
|
|
13
|
$self->{private} //= {}; |
61
|
2
|
|
|
|
|
14
|
return $self->{private}; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |