Branch Coverage

blib/lib/Image/ExifTool/Text.pm
Criterion Covered Total %
branch 38 80 47.5


line true false branch
65 0 14 unless length $$dataPt
68 0 14 if ($fast < 3 and length $$dataPt == $Image::ExifTool::testLen)
69 0 0 unless $raf->Read($buff, 65536)
75 1 13 if ($$dataPt =~ /([\0-\x06\x0e-\x1a\x1c-\x1f\x7f])/) { }
77 0 1 if ($$dataPt =~ /^(\xff\xfe\0\0|\0\0\xfe\xff)/) { }
1 0 elsif ($$dataPt =~ /^(\xff\xfe|\xfe\xff)/) { }
78 0 0 if ($1 eq "\377\376\000\000") { }
80 0 0 if $$dataPt =~ /(\r\0\0\0\n|\r|\n)\0\0\0/
83 0 0 if $$dataPt =~ /\0\0\0(\r\0\0\0\n|\r|\n)/
86 0 1 if ($1 eq "\377\376") { }
88 0 0 if $$dataPt =~ /(\r\0\n|\r|\n)\0/
91 1 0 if $$dataPt =~ /\0(\r\0\n|\r|\n)/
100 10 3 if ($isUTF8 == 0) { }
1 2 elsif ($isUTF8 > 0) { }
1 1 elsif (not $$dataPt =~ /[\x80-\x9f]/) { }
104 1 0 $$dataPt =~ /^\xef\xbb\xbf/ ? :
110 5 8 if $$dataPt =~ /(\r\n|\r|\n)/
118 0 14 if $fast == 3 or not $raf->Seek(0, 0)
120 2 12 if defined $isBOM
123 1 13 if $fast or not defined $isUTF8
127 1 12 if ($et->{'FileType'} eq "CSV")
131 1 2 if (not defined $delim) { }
2 0 elsif (not $quot) { }
134 1 0 if ($count{','} > $count{';'} and $count{','} > $count{"\t"}) { }
0 0 elsif ($count{';'} > $count{"\t"}) { }
0 0 elsif ($count{"\t"}) { }
144 1 0 unless ($ncols)
154 0 2 if $buff =~ /(^|$delim)(["'])(.*?)\2(?=$delim|$)/gs
156 0 3 if (++$nrows == 1000 and $et->Warn("Not counting rows past 1000", 2))
164 1 0 if $nrows
167 0 12 if $et->{'VALUE'}{'FileSize'} and $et->{'VALUE'}{'FileSize'} > 20000000 and $et->Warn("Not counting lines/words in text file larger than 20 MB", 2)
174 4 8 if $nl
178 0 12 if (not $nl and $buff =~ /(\r\n|\r|\n)$/)
182 12 0 if $raf->Tell < 65536
184 0 0 if ($isUTF8 >= 0) { }
0 0 elsif ($enc eq 'iso-8859-1' and $buff =~ /[\x80-\x9f]/) { }
186 0 0 if ($isUTF8 > 0) { }
0 0 elsif ($isUTF8 < 0) { }
189 0 0 $buff =~ /[\x80-\x9f]/ ? :
195 0 12 if ($et->{'VALUE'}{'MIMEEncoding'} ne $enc)