Branch Coverage

blib/lib/Brat/Handler/File.pm
Criterion Covered Total %
branch 43 114 37.7


line true false branch
24 21 6 if (defined $filename)
25 21 0 if (ref $filename eq '') { }
0 0 elsif (ref $filename eq 'ARRAY') { }
38 0 21 unless open FILE, $textFilename
62 21 6 if (defined $filename)
63 21 0 if (ref $filename eq '') { }
0 0 elsif (ref $filename eq 'ARRAY') { }
75 3 3 if (@_)
85 1 6 if (@_)
93 24 3 if (@_)
95 21 3 if ($arg =~ /^\d+$/) { }
107 0 5577 if (@_)
123 669 0 if (@_)
127 596 73 if ($self->_maxTermId < $self->_terms->{$id}{'numId'})
138 596 674 if (@_)
148 1812 0 if (defined $id and exists $self->_terms->{$id})
156 0 1044 if (@_)
171 105 0 if (@_)
176 97 8 if ($self->_maxRelationId < $self->_relations->{$id}{'numId'})
187 97 110 if (@_)
197 359 0 if (defined $id and exists $self->_relations->{$id})
205 0 94 if (@_)
220 15 0 if (@_)
224 15 0 if ($self->_maxAttributeId < $self->_attributes->{$id}{'numId'})
235 15 20 if (@_)
245 22 0 if (defined $id and exists $self->_attributes->{$id})
268 0 21 unless open FILE, '<:utf8', $self->_annotationFilename(0)
275 586 106 if ($id =~ /^TS?(?[\d]+)/)
279 586 0 if ($info =~ /^(?[^ ]+) (?.*)/)
299 13 679 if ($id =~ /^A(?\d+)/)
313 93 599 if ($id =~ /^R(?\d+)/)
341 0 0 if ($filename eq '-') { }
344 0 0 if (defined $addmode) { }
345 0 0 unless open $fh, '>>:utf8', $filename
347 0 0 unless open $fh, '>:utf8', $filename
353 0 0 if ($filename ne '-')
419 0 0 if ($filename eq '-') { }
423 0 0 if (defined $addmode) { }
424 0 0 unless open $fh, '>>:utf8', $filename
426 0 0 unless open $fh, '>:utf8', $filename
434 0 0 if ($filename ne '-')
467 0 0 if ($filename eq '-') { }
470 0 0 if (defined $addmode) { }
471 0 0 unless open $fh, '>>:utf8', $filename
473 0 0 unless open $fh, '>:utf8', $filename
477 0 0 if ($filename ne '-')
564 0 0 if ($filename eq '-') { }
567 0 0 if (defined $addmode) { }
568 0 0 unless open $fh, '>>:utf8', $textFilename
570 0 0 unless open $fh, '>:utf8', $textFilename
574 0 0 unless open FILE, $file
580 0 0 if ($filename ne '-')
585 0 0 if ($filename eq '-') { }
588 0 0 if (defined $addmode) { }
589 0 0 unless open $fh, '>>:utf8', $annotationFilename
591 0 0 unless open $fh, '>:utf8', $annotationFilename
595 0 0 if ($filename ne '-')