JSONY/Receiver.pm

filter: Statementstmt 100% 16 / 16 Branchbran 100% 8 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 6 totaltotal 84.2% 32 / 38 CC 5 SCAR 9.8
CC
5
Cov
100%
got_bare
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
↑ Summary JSONY.pm »
1 ###############################################################################
2 # The receiver class can reshape the data at any given rule match.
3 ###############################################################################
4 package JSONY::Receiver;
5 6 ▶use base 'Pegex::Tree';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 6 ▶use boolean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 31 ▶sub got_top_seq_entry { $_[1][0][0] }
Subroutine got_top_seq_entry: called CC=1 SCAR=0.0
Pod undocumented
9 3 ▶sub got_top_map { $_[0]->got_map([$_[1]]) }
Subroutine got_top_map: called CC=1 SCAR=0.0
Pod undocumented
10 21 ▶sub got_seq { $_[1]->[0] }
Subroutine got_seq: called CC=1 SCAR=0.0
Pod undocumented
11 29 ▶sub got_map { +{ map {($_->[0], $_->[1])} @{$_[1]->[0]} } }
Subroutine got_map: called CC=1 SCAR=0.0
Pod undocumented
12 81 ▶sub got_string {"$_[1]"}
Subroutine got_string: called CC=1 SCAR=0.0
Pod undocumented
13 sub got_bare {
14 159 ▶ $_ = pop;
Subroutine got_bare: called CC=5 SCAR=16.1
Pod undocumented
15 159 ▶ /^true$/ ? true :
Branch: 4 branches
BranchTrueFalseTotal
/^true$/ ? : 4 155 159
/^false$/ ? : 2 153 155
/^null$/ ? : 2 151 153
/^( -? (?: 0 | [1-9] [0-9]* ) (?: \. [0-9]* )? (?: [eE] [\-\+]? [0-9]+ )? )$/x ? : 26 125 151
16 /^false$/ ? false :
17 /^null$/ ? undef :
18 /^(
19 -?
20 (?: 0 | [1-9] [0-9]* )
21 (?: \. [0-9]* )?
22 (?: [eE] [\-\+]? [0-9]+ )?
23 )$/x ? ($_ + 0) :
24 "$_"
25 }
26  
27 6 1;
↑ Summary JSONY.pm »