blib/lib/MarpaX/ESLIF/JSON/Decoder.pm

filter: Statementstmt 62.5% 15 / 24 Branchbran n/a Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 50.0% 4 / 8 Podpod 100% 1 / 1 totaltotal 43.4% 20 / 46 CC 4 SCAR 21.0
CC
4
Cov
45%
__ANON__
20.0
_ALLOCATE
2.0
_EQ
2.0
CRAP 8.2
« blib/lib/MarpaX/ESLIF/JSON/Encoder.pm ↑ Summary blib/lib/MarpaX/ESLIF.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package MarpaX::ESLIF::JSON::Decoder;
5 2 ▶use parent qw/MarpaX::ESLIF::Grammar/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use MarpaX::ESLIF::JSON::Decoder::RecognizerInterface;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 #
9 # Base required class methods
10 #
11 0 ▶sub _ALLOCATE { return \&MarpaX::ESLIF::JSON::Decoder::allocate }
Subroutine _ALLOCATE: not called CC=1 SCAR=6.9
12 0 ▶sub _EQ {
Subroutine _EQ: not called CC=1 SCAR=6.9
13 0 ▶ return sub {
Subroutine __ANON__: not called CC=4 SCAR=30.0
14 0 my ($class, $args_ref, $eslif, $strict) = @_;
15  
16 0 my $definedStrict = defined($strict);
17 0 my $_definedStrict = defined($args_ref->[1]);
18  
19 return
20 0 ▶ ($eslif == $args_ref->[0])
Condition0%0/9
$eslif == $args_ref->[0] && ($definedStrict && $_definedStrict && $strict == $args_ref->[1])
!ll&&!rl&&r
000
$definedStrict and $_definedStrict and $strict == $args_ref->[1]
!ll&&!rl&&r
000
$definedStrict and $_definedStrict
!ll&&!rl&&r
000
MC/DC0%0/4
$eslif == $args_ref->[0] && ($definedStrict && $_definedStrict && $strict == $args_ref->[1])
$eslif == $args_ref->[0] $definedStrict $_definedStrict $strict == $args_ref->[1]
Truth table0%0/5
A && B and C and D
A= $eslif == $args_ref->[0]B= $definedStrictC= $_definedStrictD= $strict == $args_ref->[1]
ABCDresult
0XXX0
10XX0
110X0
11100
11111
21 &&
22 ($definedStrict && $_definedStrict && ($strict == $args_ref->[1]))
23 }
24 0 }
25  
26 # ABSTRACT: ESLIF's JSON decoder interface
27  
28 2 our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY
29  
30 2 our $VERSION = '6.0.35.1'; # VERSION
31  
32  
33  
34 0 ▶sub decode {
Subroutine decode: not called CC=1 SCAR=6.9
Pod documented
35 0 my ($self, $string, %options) = @_;
36  
37 0 my $recognizerInterface = MarpaX::ESLIF::JSON::Decoder::RecognizerInterface->new($string, $options{encoding});
38 return $self->_decode($recognizerInterface, $options{disallowDupkeys}, $options{maxDepth}, $options{noReplacementCharacter})
39 0 }
40  
41  
42 2 1;
43  
44 __END__
« blib/lib/MarpaX/ESLIF/JSON/Encoder.pm ↑ Summary blib/lib/MarpaX/ESLIF.pm »