line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::Pointer::Context; |
2
|
|
|
|
|
|
|
|
3
|
16
|
|
|
16
|
|
329
|
use 5.008_001; |
|
16
|
|
|
|
|
57
|
|
|
16
|
|
|
|
|
634
|
|
4
|
16
|
|
|
16
|
|
86
|
use strict; |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
592
|
|
5
|
16
|
|
|
16
|
|
89
|
use warnings; |
|
16
|
|
|
|
|
27
|
|
|
16
|
|
|
|
|
951
|
|
6
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
7
|
16
|
|
|
|
|
158
|
new => 0, |
8
|
|
|
|
|
|
|
rw => [ |
9
|
|
|
|
|
|
|
qw/ |
10
|
|
|
|
|
|
|
pointer |
11
|
|
|
|
|
|
|
tokens |
12
|
|
|
|
|
|
|
processed_tokens |
13
|
|
|
|
|
|
|
last_token |
14
|
|
|
|
|
|
|
last_error |
15
|
|
|
|
|
|
|
result |
16
|
|
|
|
|
|
|
target |
17
|
|
|
|
|
|
|
parent |
18
|
|
|
|
|
|
|
/ |
19
|
|
|
|
|
|
|
], |
20
|
16
|
|
|
16
|
|
23026
|
); |
|
16
|
|
|
|
|
27674
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = "0.04"; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
25
|
143
|
|
|
143
|
1
|
312
|
my $class = shift; |
26
|
143
|
100
|
|
|
|
495
|
my $args = ref $_[0] ? $_[0] : +{ @_ }; |
27
|
143
|
|
|
|
|
2083
|
%$args = ( |
28
|
|
|
|
|
|
|
tokens => [], |
29
|
|
|
|
|
|
|
processed_tokens => [], |
30
|
|
|
|
|
|
|
last_token => undef, |
31
|
|
|
|
|
|
|
last_error => undef, |
32
|
|
|
|
|
|
|
result => 0, |
33
|
|
|
|
|
|
|
target => undef, |
34
|
|
|
|
|
|
|
parent => undef, |
35
|
|
|
|
|
|
|
%$args, |
36
|
|
|
|
|
|
|
); |
37
|
143
|
|
|
|
|
954
|
bless $args => $class; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub begin { |
41
|
181
|
|
|
181
|
1
|
398
|
my ($self, $token) = @_; |
42
|
181
|
|
|
|
|
388
|
$self->{last_token} = $token; |
43
|
|
|
|
|
|
|
### assign before target into parent |
44
|
181
|
|
|
|
|
586
|
$self->{parent} = $self->{target}; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub next { |
48
|
146
|
|
|
146
|
1
|
241
|
my ($self, $target) = @_; |
49
|
146
|
|
|
|
|
429
|
$self->{target} = $target; |
50
|
146
|
|
|
|
|
173
|
push(@{$self->{processed_tokens}}, $self->{last_token}); |
|
146
|
|
|
|
|
587
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |