| 1 | package Jmespath::ParsedResult; | ||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 2 | ▶ | use Jmespath::TreeInterpreter; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 760 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 7 | 760 | my ( $class, $expression, $parsed ) = @_; | |||||||||||
| 8 | 760 | my $self = bless {}, $class; | |||||||||||
| 9 | 760 | $self->{expression} = $expression; | |||||||||||
| 10 | 760 | $self->{parsed} = $parsed; | |||||||||||
| 11 | 760 | return $self; | |||||||||||
| 12 | } | ||||||||||||
| 13 | |||||||||||||
| 14 | 760 | ▶ | sub search { | ||||||||||
|
Subroutine
search: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||
| 15 | 760 | my ( $self, $data, $options ) = @_; | |||||||||||
| 16 | 760 | ▶ | $options = $options || undef; | ||||||||||
|
Condition50%1/2
$options || undef
MC/DC0%0/1
$options || undef
$options
Truth table50%1/2
A
A= $options
| |||||||||||||
| 17 | 760 | my $interpreter = Jmespath::TreeInterpreter->new($options); | |||||||||||
| 18 | 760 | my $result = $interpreter->visit( $self->{ parsed }, $data ); | |||||||||||
| 19 | 715 | return $result; | |||||||||||
| 20 | } | ||||||||||||
| 21 | |||||||||||||
| 22 | 0 | ▶ | sub _render_dot_file { | ||||||||||
|
Subroutine
_render_dot_file: not called CC=1 SCAR=6.9
| |||||||||||||
| 23 | 0 | my ($self) = @_; | |||||||||||
| 24 | 0 | my $renderer = Jmespath::GraphvizVisitor->new; | |||||||||||
| 25 | 0 | my $contents = Jmespath::Renderer->visit( $self->parsed ); | |||||||||||
| 26 | 0 | return $contents; | |||||||||||
| 27 | } | ||||||||||||
| 28 | |||||||||||||
| 29 | # try to emulate __REPR__ | ||||||||||||
| 30 | 0 | ▶ | sub stringify { | ||||||||||
|
Subroutine
stringify: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 31 | 0 | return shift->{parsed}; | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 2 | 1; | |||||||||||