Branch Coverage

blib/lib/Treex/Core/Document.pm
Criterion Covered Total %
branch 61 90 67.7


line true false branch
38 0 0 unless (defined $self->_hash)
125 0 2 if @_ != 1
128 0 2 if (defined $self->path and $self->path ne '')
130 0 0 unless $path =~ m[/$]
140 32 0 if (defined $params_rf)
143 0 32 if ($params_rf->{'pmldoc'}) { }
10 22 elsif ($params_rf->{'filename'}) { }
150 0 10 if ($params_rf->{'filename'} =~ /.streex$/) { }
173 0 10 if ($Treex::PML::FSError)
177 0 0 $@ ? :
0 10 unless defined $pmldoc
184 10 22 if ($pmldoc)
201 19 13 $tree->type->get_structure_name =~ /[at]-(root|node)/ ? :
203 19 13 $ordered ? :
206 28 14 if ($ordered)
212 28 14 if ($node->DOES('Treex::Core::Node::Interset'))
230 8 4 if (defined $bundle->{'zones'})
239 32 0 if ($tree->type->get_structure_name =~ /(\S)-(root|node|nonterminal|terminal)/) { }
248 3 9 if ($layer eq 'A' and $node->{'iset'})
303 303 111 if (defined $node) { }
324 5 25 unless defined $target
328 16 9 unless $target_backrefs->{$type}
340 0 16 unless defined $target
342 0 16 unless $target_backrefs
354 2 22 unless $backref->{$id}
371 65 4 unless $backref->{$id}
400 71 0 if (defined $self->_index->{$id}) { }
420 0 0 if @_ != 1
428 0 98 if @_ != 1
439 2 26 if ($arg_ref and $arg_ref->{'after'} || $arg_ref->{'before'}) { }
440 1 1 $arg_ref->{'after'} ? :
442 1 1 $arg_ref->{'after'} ? :
479 2 2 if (defined $meta->{'zones'}) { }
492 9 6 unless $meta->{'zones'}
507 4 8 if $zone->language eq $language and $zone->selector eq $selector
521 0 0 unless (defined $fs_zone)
540 1 10 if ($filename =~ /\.streex$/) { }
541 0 1 unless open my $F, '>:via(gzip)', $filename
564 28 14 if ($node->DOES('Treex::Core::Node::Interset'))
580 0 1 if (ref $file and &reftype($file) eq 'GLOB') { }
584 0 1 unless $file =~ /\.streex$/
586 0 1 unless open $FILEHANDLE, '<:via(gzip)', $file
598 1 0 if ($opened)
603 0 1 unless my $retrieved_doc = Storable::thaw($serialized)
605 1 0 unless (ref $file)