Branch Coverage

blib/lib/Struct/Conditional.pm
Criterion Covered Total %
branch 74 100 74.0


line true false branch
12 0 15 if defined $struct and not ref $struct and $struct eq 'compiled_null'
20 51 66 if ($ref eq 'HASH') { }
6 60 elsif ($ref eq 'ARRAY') { }
29 0 81 $value && $value eq 'compiled_null' ? :
33 51 0 keys %{$json;} ? :
39 0 21 $value && $value eq 'compiled_null' ? :
53 7 44 if ($loops{'for'})
55 0 7 unless defined $key
56 5 2 if ($loops{'for'}{'each'})
60 0 5 unless (ref $params->{$key} || '') eq 'ARRAY'
63 20 0 if scalar keys %{$jsn;}
65 5 0 if scalar @each
67 2 5 if ($loops{'for'}{'keys'})
71 0 2 unless (ref $params->{$key} || '') eq 'HASH'
77 8 0 if scalar keys %{$jsn;}
79 2 0 if (scalar %keys)
84 1 1 $map =~ /^1$/ ? :
99 26 53 if ($keywords{'if'})
101 17 9 unless ($expression)
102 17 0 if ($keywords{'elsif'})
105 7 10 unless ($expression)
106 7 0 if ($keywords{'else'})
111 26 0 if ($expression)
115 4 75 if ($keywords{'given'})
116 0 4 unless $keywords{'given'}{'key'}
117 0 4 unless ref $keywords{'given'}{'when'}
120 2 2 if ($ref eq 'ARRAY') { }
2 0 elsif ($ref eq 'HASH') { }
124 1 3 if $expression
137 1 2 if $expression
142 2 2 unless $expression
143 4 0 if ($expression)
154 0 56 if defined $keyword->{'exists'}
156 56 0 if (defined $key)
158 52 4 if not $success and defined $keyword->{'m'}
160 0 56 if not $success and defined $keyword->{'im'}
162 0 56 if not $success and defined $keyword->{'nm'}
164 0 56 if not $success and defined $keyword->{'inm'}
166 1 55 if not $success and defined $keyword->{'eq'}
168 3 53 if not $success and defined $keyword->{'ne'}
170 0 56 if not $success and defined $keyword->{'gt'}
173 0 56 if not $success and defined $keyword->{'lt'}
174 2 54 if ($keyword->{'or'} and not $success)
178 2 54 if ($keyword->{'and'} and $success)
182 2 54 if ($keyword->{'elsif'} and not $success)
187 0 56 if $keyword->{'else'} and not $success
188 27 29 $success ? :
195 49 135 if ($ref eq 'HASH') { }
6 129 elsif ($ref eq 'ARRAY') { }
10 125 elsif (defined $then and $then =~ /\{($params_reg)\}/) { }