Branch Coverage

blib/lib/App/NDTools/Slurp.pm
Criterion Covered Total %
branch 57 88 64.7


line true false branch
56 4 45 if (ref ${$ref;} eq 'ARRAY') { }
43 2 elsif (ref ${$ref;} eq 'HASH') { }
1 1 elsif (&is_number(${$ref;})) { }
58 3 10 if (ref ${$ref;}->[$_]) { }
4 6 elsif (&readonly(${$ref;}->[$_])) { }
3 3 elsif (&is_number(${$ref;}->[$_])) { }
61 2 2 ${$ref;}->[$_] ? :
68 28 89 if (ref ${$ref;}->{$_}) { }
4 85 elsif (&readonly(${$ref;}->{$_})) { }
19 66 elsif (&is_number(${$ref;}->{$_})) { }
71 2 2 delete ${$ref;}->{$_} ? :
95 9 0 if $modern_yaml_xs
97 9 0 if ($modern_yaml_xs)
98 9 0 if ref \1 eq 'JSON::PP::Boolean'
109 0 0 if (ref ${$ref;} eq 'ARRAY') { }
0 0 elsif (ref ${$ref;} eq 'HASH') { }
0 0 elsif (ref ${$ref;} eq $bool_type) { }
111 0 0 if (ref ${$ref;}->[$_]) { }
0 0 elsif (ref ${$ref;}->[$_] eq $bool_type) { }
114 0 0 ${$ref;}->[$_] ? :
119 0 0 if (ref ${$ref;}->{$_}) { }
0 0 elsif (ref ${$ref;}->{$_} eq $bool_type) { }
122 0 0 ${$ref;}->{$_} ? :
126 0 0 ${$ref;} ? :
137 288 19 if ($format eq 'JSON') { }
18 1 elsif ($format eq 'YAML') { }
1 0 elsif ($format eq 'RAW') { }
138 288 0 unless $opts
155 1 306 if $@
163 0 110 if $uri eq '-'
165 65 45 unless defined $fmt
168 38 72 if (ref $uri eq 'GLOB') { }
178 0 72 unless open my $fh, '>', $file
187 111 12 if ($format eq 'JSON' or $format eq 'RAW' and ref $data) { }
9 3 elsif ($format eq 'YAML') { }
3 0 elsif ($format eq 'RAW') { }
188 66 45 unless $opts
204 0 123 if $@
211 346 1 if (@names and @names > 1)
213 1 345 if $ext eq 'YML' or $ext eq 'YAML'
222 0 302 if $uri eq '-'
224 282 18 unless defined $fmt
233 0 302 if (ref $uri eq 'GLOB') { }
236 2 300 unless open my $fh, '<', $uri