Condition Coverage

blib/lib/Treex/PML/Document.pm
Criterion Covered Total %
condition 17 143 11.8


and 3 conditions

line !l l&&!r l&&r condition
140 25 0 0 @_ == 1 and ref $_[0] eq 'HASH'
173 0 0 0 @_ == 1 && ref $_[0]
365 0 0 24 $backend and eval { do { no strict 'refs'; &{"${backend}::test";}($file, $self->encoding) } }
409 17 2 5 $url ne $file and $remove_file
433 6 0 5 defined $filename and $filename ne ''
475 0 0 0 $backend->can('write') && &{"${backend}::write";}($fileref, $self)
513 0 0 35 &blessed($filename) and $filename->isa('URI::file')
529 0 0 0 &blessed($filename) && $filename->isa('URI')
0 0 0 $filename and not &blessed($filename) && $filename->isa('URI')
1089 1 0 0 &blessed($result) and $result->isa('URI')
1481 0 0 0 $val =~ m[/] || $sentord =~ m[/] and ref $document->metaData('schema')
1610 0 0 0 defined $pos1 and 0 <= $pos1
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo and defined $pos2
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo and defined $pos2 and 0 <= $pos2
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo and defined $pos2 and 0 <= $pos2 and $pos2 <= $self->lastTreeNo
1631 0 0 0 defined $pos1 and 0 <= $pos1
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo and defined $pos2
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo and defined $pos2 and 0 <= $pos2
0 0 0 defined $pos1 and 0 <= $pos1 and $pos1 <= $self->lastTreeNo and defined $pos2 and 0 <= $pos2 and $pos2 <= $self->lastTreeNo
1698 0 0 0 $content_decl and $content_decl->get_role eq '#CHILDNODES'
1743 0 0 0 $member_decl and $member_decl->get_role eq '#CHILDNODES'
1749 0 0 0 $ntype and $ntype->get_role eq '#NODE'
0 0 0 $ntype and $ntype->get_role eq '#NODE' and !$has_children || _can_have_children($ntype)
1795 0 0 0 $ntype and $ntype->get_role eq '#NODE'
0 0 0 $ntype and $ntype->get_role eq '#NODE' and !$has_children || _can_have_children($ntype)
1823 0 0 0 ref $opts and $opts->{'choose_command'}
1825 0 0 0 $type and grep {$_ == $type;} @ntypes

or 2 conditions

line l !l condition
87 0 25 $opts ||= {}
434 11 0 $self->backend || 'Treex::PML::Backend::FS'
441 11 0 Treex::PML::BackendCanWrite($backend) || die("Backend $backend is not loaded or does not support writing\n")
443 11 0 &{"${backend}::write";}($fh, $self) || die("Write to '${filename}' failed using backend $backend\n")
469 0 0 $self->backend || 'Treex::PML::Backend::FS'
996 5 0 $self->metaData('references') || {}
1010 4 0 $self->metaData('refnames') || {}

or 3 conditions

line l !l&&r !l&&!r condition
143 0 25 0 ref $self || $self
411 5 0 0 $file || warn("couldn't unlink tmp file ${file}: $!\n")
978 0 0 0 $id_member{$node->type} ||= $node->get_id_member_name
1428 0 0 0 defined $attr or length $attr
1481 0 0 0 $val =~ m[/] || $sentord =~ m[/]
1484 0 0 0 $value eq '' or $value eq '???'
0 0 0 $value eq '' or $value eq '???' or $node->attr($sentord) >= 999
1501 0 0 0 $node->{$val} eq '' or $node->{$val} eq '???'
0 0 0 $node->{$val} eq '' or $node->{$val} eq '???' or $node->{$sentord} >= 999
1538 0 0 0 not ref $nr or ref $pos
1749 0 0 0 !$has_children || _can_have_children($ntype)
1788 0 0 0 $tt_is == 13 or $tt_is == 12
0 0 0 $tt_is == 13 or $tt_is == 12 or $tt_is == 1
1795 0 0 0 !$has_children || _can_have_children($ntype)