Jmespath/ParsedResult.pm

filter: Statementstmt 80.0% 20 / 25 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 3 totaltotal 68.4% 26 / 38 CC 2 SCAR 4.1
CC
2
Cov
78%
search
2.0
_render_dot_file
2.0
stringify
2.0
CRAP 1.5
« Jmespath/VariadicArityException.pm ↑ Summary Jmespath/Visitor.pm »
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
l!l
0760
MC/DC0%0/1
$options || undef
$options
Truth table50%1/2
A
A= $options
Aresult
11
00
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;
« Jmespath/VariadicArityException.pm ↑ Summary Jmespath/Visitor.pm »