| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package JSON::Pointer::Context; |
|
2
|
|
|
|
|
|
|
|
|
3
|
16
|
|
|
16
|
|
317
|
use 5.008_001; |
|
|
16
|
|
|
|
|
57
|
|
|
|
16
|
|
|
|
|
636
|
|
|
4
|
16
|
|
|
16
|
|
82
|
use strict; |
|
|
16
|
|
|
|
|
28
|
|
|
|
16
|
|
|
|
|
594
|
|
|
5
|
16
|
|
|
16
|
|
83
|
use warnings; |
|
|
16
|
|
|
|
|
28
|
|
|
|
16
|
|
|
|
|
714
|
|
|
6
|
|
|
|
|
|
|
use Class::Accessor::Lite ( |
|
7
|
16
|
|
|
|
|
132
|
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
|
|
15504
|
); |
|
|
16
|
|
|
|
|
20327
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = "0.06"; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub new { |
|
25
|
144
|
|
|
144
|
1
|
205
|
my $class = shift; |
|
26
|
144
|
100
|
|
|
|
348
|
my $args = ref $_[0] ? $_[0] : +{ @_ }; |
|
27
|
144
|
|
|
|
|
1436
|
%$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
|
144
|
|
|
|
|
803
|
bless $args => $class; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub begin { |
|
41
|
182
|
|
|
182
|
1
|
267
|
my ($self, $token) = @_; |
|
42
|
182
|
|
|
|
|
347
|
$self->{last_token} = $token; |
|
43
|
|
|
|
|
|
|
### assign before target into parent |
|
44
|
182
|
|
|
|
|
453
|
$self->{parent} = $self->{target}; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub next { |
|
48
|
146
|
|
|
146
|
1
|
211
|
my ($self, $target) = @_; |
|
49
|
146
|
|
|
|
|
224
|
$self->{target} = $target; |
|
50
|
146
|
|
|
|
|
150
|
push(@{$self->{processed_tokens}}, $self->{last_token}); |
|
|
146
|
|
|
|
|
469
|
|
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |