line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JSON::Pointer::Context; |
2
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
289
|
use 5.008_001; |
|
17
|
|
|
|
|
46
|
|
4
|
17
|
|
|
17
|
|
812
|
use strict; |
|
17
|
|
|
|
|
23
|
|
|
17
|
|
|
|
|
1921
|
|
5
|
17
|
|
|
17
|
|
58
|
use warnings; |
|
17
|
|
|
|
|
19
|
|
|
17
|
|
|
|
|
764
|
|
6
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
7
|
17
|
|
|
|
|
117
|
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
|
17
|
|
|
17
|
|
8407
|
); |
|
17
|
|
|
|
|
19483
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = "0.07"; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
25
|
162
|
|
|
162
|
1
|
175
|
my $class = shift; |
26
|
162
|
100
|
|
|
|
327
|
my $args = ref $_[0] ? $_[0] : +{ @_ }; |
27
|
162
|
|
|
|
|
1328
|
%$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
|
162
|
|
|
|
|
536
|
bless $args => $class; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub begin { |
41
|
197
|
|
|
197
|
1
|
223
|
my ($self, $token) = @_; |
42
|
197
|
|
|
|
|
268
|
$self->{last_token} = $token; |
43
|
|
|
|
|
|
|
### assign before target into parent |
44
|
197
|
|
|
|
|
330
|
$self->{parent} = $self->{target}; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub next { |
48
|
161
|
|
|
161
|
1
|
183
|
my ($self, $target) = @_; |
49
|
161
|
|
|
|
|
188
|
$self->{target} = $target; |
50
|
161
|
|
|
|
|
138
|
push(@{$self->{processed_tokens}}, $self->{last_token}); |
|
161
|
|
|
|
|
423
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |