Branch Coverage

blib/lib/Image/ExifTool/Import.pm
Criterion Covered Total %
branch 52 136 38.2


line true false branch
37 0 0 if (UNIVERSAL::isa($file, 'File::RandomAccess')) { }
0 0 elsif (ref $file eq 'GLOB') { }
44 0 0 unless open CSVFILE, $file
49 0 0 unless defined $delim
53 0 0 if $buff =~ /(\x0d\x0a|\x0d|\x0a)/
61 0 0 if ($v =~ s/^"//) { }
64 0 0 if (@toks) { }
68 0 0 unless $raf->ReadLine($buff)
70 0 0 unless @toks
81 0 0 if (@tags) { }
86 0 0 unless length $vals[$i] or defined $missingValue and $missingValue eq ""
88 0 0 defined $missingValue && $vals[$i] eq $missingValue ? :
93 0 0 if ($fileInfo{'SourceFile'})
101 0 0 unless length $_
102 0 0 unless @tags
103 0 0 unless /^([-_0-9A-Z]+:)*[-_0-9A-Z]+#?$/i
106 0 0 if $err
107 0 0 unless @tags
109 0 0 if lc $tags[0] eq "sourcefile"
112 0 0 if $openedFile
114 0 0 unless $found or $err
115 0 0 $err ? :
140 449 61 if ($buffPt) { }
142 0 449 unless defined $pos
151 0 510 unless defined $pos
152 61 449 if ($pos >= length $$buffPt or $readMore)
153 0 61 unless defined $raf
156 0 61 if ($offset) { }
158 0 0 unless $raf->Read($buff, 65536)
161 0 61 unless $raf->Read($$buffPt, 65536)
163 61 0 unless ($didBOM)
170 510 0 unless ($tok)
172 0 510 unless $$buffPt =~ /(\S)/g
177 107 403 if ($tok eq '{') { }
17 386 elsif ($tok eq '[') { }
295 91 elsif ($tok eq '"') { }
8 83 elsif ($tok eq ']' or $tok eq '}' or $tok eq ',') { }
178 107 0 unless defined $rtnVal
181 208 0 unless (defined $key)
186 205 3 if (defined $key)
188 0 205 unless $$buffPt =~ /(\S)/g
189 0 205 unless $1 eq ":"
192 0 205 unless defined $val
198 0 208 unless $$buffPt =~ /(\S)/g
199 107 101 if $1 eq "}"
200 0 101 unless $1 eq ","
203 17 0 unless defined $rtnVal
208 28 5 if defined $item
210 0 33 unless $$buffPt =~ /(\S)/g
211 17 16 if $1 eq "]"
212 0 16 unless $1 eq ","
216 0 295 unless $$buffPt =~ /(\\*)"/g
217 295 0 unless length $1 & 1
222 0 0 unless $unescapeJSON{$1}
224 0 295 if ($rtnVal =~ m[^base64:[A-Za-z0-9+/]*={0,2}$] and length($rtnVal) % 4 == 3)
233 0 83 unless $$buffPt =~ /([\s:,\}\]])/g
255 61 0 if (UNIVERSAL::isa($file, 'File::RandomAccess')) { }
0 0 elsif (ref $file eq 'GLOB') { }
0 0 elsif (ref $file eq 'SCALAR') { }
265 0 0 unless open JSONFILE, $file
271 0 61 if $openedFile
272 61 0 unless (ref $obj eq "ARRAY")
273 0 61 unless ref $obj eq "HASH"
278 0 61 unless ref $info eq "HASH"
280 61 0 unless (defined $info->{'SourceFile'})
282 0 61 if ($key) { }
289 1 60 if (defined $missingValue)
295 61 0 $found ? :