line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Jmespath::Visitor; |
2
|
2
|
|
|
2
|
|
7
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
103
|
|
3
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
265
|
|
4
|
|
|
|
|
|
|
#no strict 'refs'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
760
|
|
|
760
|
0
|
557
|
my ($class) = @_; |
8
|
760
|
|
|
|
|
847
|
my $self = bless {}, $class; |
9
|
760
|
|
|
|
|
964
|
$self->{_method_cache} = {}; |
10
|
760
|
|
|
|
|
1065
|
return $self; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub visit { |
14
|
0
|
|
|
0
|
0
|
|
my ($self, $node, $args) = @_; |
15
|
0
|
|
|
|
|
|
my $node_type = $node->{type}; |
16
|
0
|
|
|
|
|
|
my $method = 'visit_' . $node->{type}; |
17
|
0
|
|
|
|
|
|
return &$method; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub default_visit { |
21
|
0
|
|
|
0
|
0
|
|
my ($self, $node, @args) = @_; |
22
|
0
|
|
|
|
|
|
Jmespath::NotImplementedException->new($node->{type})->throw; |
23
|
0
|
|
|
|
|
|
return; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |