blib/lib/Jmespath/Expression.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 13 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 2 | 0.0 |
total | 17 | 19 | 89.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Jmespath::Expression; | ||||||
2 | 2 | 2 | 6 | use strict; | |||
2 | 2 | ||||||
2 | 40 | ||||||
3 | 2 | 2 | 6 | use warnings; | |||
2 | 2 | ||||||
2 | 175 | ||||||
4 | |||||||
5 | sub new { | ||||||
6 | 28 | 28 | 0 | 28 | my ($class, $expression, $interpreter) = @_; | ||
7 | 28 | 30 | my $self = bless {}, $class; | ||||
8 | 28 | 35 | $self->{expression} = $expression; | ||||
9 | 28 | 29 | $self->{interpreter} = $interpreter; | ||||
10 | 28 | 52 | return $self; | ||||
11 | } | ||||||
12 | |||||||
13 | sub visit { | ||||||
14 | 112 | 112 | 0 | 103 | my ($self, $node, $args) = @_; | ||
15 | 112 | 178 | return $self->{interpreter}->visit($node, $args); | ||||
16 | } | ||||||
17 | |||||||
18 | 1; |