Branch Coverage

blib/lib/JSON/MaybeXS.pm
Criterion Covered Total %
branch 19 24 79.1


line true false branch
11 1 6 if $INC{'Cpanel/JSON/XS.pm'}
12 0 6 if $INC{'JSON/XS.pm'} and eval { do { "JSON::XS"->VERSION(3); 1 } }
16 2 4 if eval { do { require Cpanel::JSON::XS; 1 } }
19 0 4 if eval { do { require JSON::XS; "JSON::XS"->VERSION(3); 1 } }
22 3 1 if eval { do { require JSON::PP; 1 } }
48 1 4 @_ == 1 ? :
59 0 104 if @_ > 1
61 41 63 unless builtin::is_bool($_[0])
73 1 1 if (ref($_[0]) =~ /^JSON/ or $_[0] =~ /^JSON/)
78 0 1 if (@_ == 2 and ref $_[1] eq "HASH")
89 1 1 if (ref($_[0]) =~ /^JSON/ or @_ > 2 and $_[0] =~ /^JSON/)
97 0 1 if (@_ == 2 and ref $_[1] eq "HASH")