Branch Coverage

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


line true false branch
55 4 45 if (ref ${$ref;} eq 'ARRAY') { }
43 2 elsif (ref ${$ref;} eq 'HASH') { }
1 1 elsif (&isdual(${$ref;})) { }
57 3 10 if (ref ${$ref;}->[$_]) { }
4 6 elsif (&readonly(${$ref;}->[$_])) { }
3 3 elsif (&isdual(${$ref;}->[$_])) { }
60 2 2 ${$ref;}->[$_] ? :
67 28 89 if (ref ${$ref;}->{$_}) { }
4 85 elsif (&readonly(${$ref;}->{$_})) { }
19 66 elsif (&isdual(${$ref;}->{$_})) { }
70 2 2 delete ${$ref;}->{$_} ? :
93 9 0 if $YAML::XS::VERSION >= 0.67
95 9 0 if ($YAML::XS::VERSION >= 0.67)
96 9 0 if ref \1 eq 'JSON::PP::Boolean'
107 0 0 if (ref ${$ref;} eq 'ARRAY') { }
0 0 elsif (ref ${$ref;} eq 'HASH') { }
0 0 elsif (ref ${$ref;} eq $bool_type) { }
109 0 0 if (ref ${$ref;}->[$_]) { }
0 0 elsif (ref ${$ref;}->[$_] eq $bool_type) { }
112 0 0 ${$ref;}->[$_] ? :
117 0 0 if (ref ${$ref;}->{$_}) { }
0 0 elsif (ref ${$ref;}->{$_} eq $bool_type) { }
120 0 0 ${$ref;}->{$_} ? :
124 0 0 ${$ref;} ? :
135 263 19 if ($format eq 'JSON') { }
18 1 elsif ($format eq 'YAML') { }
1 0 elsif ($format eq 'RAW') { }
136 263 0 unless $opts
153 1 281 if $@
161 0 110 if $uri eq '-'
163 65 45 unless defined $fmt
166 38 72 if (ref $uri eq 'GLOB') { }
176 0 72 unless open my $fh, '>', $file
185 110 12 if ($format eq 'JSON' or $format eq 'RAW' and ref $data) { }
9 3 elsif ($format eq 'YAML') { }
3 0 elsif ($format eq 'RAW') { }
186 66 44 unless $opts
202 0 122 if $@
209 322 1 if (@names and @names > 1)
211 1 321 if $ext eq 'YML' or $ext eq 'YAML'
220 0 278 if $uri eq '-'
222 258 18 unless defined $fmt
231 0 278 if (ref $uri eq 'GLOB') { }
234 2 276 unless open my $fh, '<', $uri