Branch Coverage

blib/lib/Brat/Handler.pm
Criterion Covered Total %
branch 16 66 24.2


line true false branch
41 4 0 if (defined $inputDir)
42 0 4 unless opendir DIR, $inputDir
44 12 20 if ($file ne '.' and $file ne '..' and $file =~ /\.ann$/)
66 13 9 if (@_)
68 1 12 if (ref $fileList eq 'ARRAY') { }
80 15 10 if (@_)
96 3 0 if (@_)
117 0 1 unless open LIST, $list
130 15 0 if ($file =~ /\.ann$/ or $file =~ /\.txt$/)
256 0 0 if ($filename eq '-') { }
260 0 0 if (defined $addmode) { }
261 0 0 unless open $fh, '>>:utf8', $filename
263 0 0 unless open $fh, '>:utf8', $filename
268 0 0 if ($filename ne '-')
282 74 9 if (not exists $termList{$term->{'str'}}) { }
308 12 0 unless (exists $relationList{$key})
325 0 0 if ($filename eq '-') { }
329 0 0 if (defined $addmode) { }
330 0 0 unless open $fh, '>>:utf8', $filename
332 0 0 unless open $fh, '>:utf8', $filename
337 0 0 if ($filename ne '-')
366 0 0 if ($nbFiles > 0)
374 0 0 if ($minTextSize > $bratFile->_textSize)
377 0 0 if ($maxTextSize < $bratFile->_textSize)
381 0 0 if ($minTerms > scalar keys %{$bratFile->_terms;})
384 0 0 if ($maxTerms < scalar keys %{$bratFile->_terms;})
388 0 0 if ($minRels > scalar keys %{$bratFile->_relations;})
391 0 0 if ($maxRels < scalar keys %{$bratFile->_relations;})
452 0 0 if ($filename eq '-') { }
455 0 0 if (defined $addmode) { }
456 0 0 unless open $fh, '>>:utf8', $filename
458 0 0 unless open $fh, '>:utf8', $filename
464 0 0 if ($filename ne '-')