Branch Coverage

blib/lib/PomBase/Chobo/OntologyTerm.pm
Criterion Covered Total %
branch 50 60 83.3


line true false branch
74 70 5 if $_ ne "id"
93 37 4 if ($val =~ /(\S+):(\S+)/) { }
101 0 4 if (defined $self->metadata->{'ontology'} and $self->metadata->{'ontology'} eq 'ro') { }
143 0 79 unless (defined $object)
147 10 40 if ($object->{'def'} and $object->{'def'}{'dbxrefs'} and $object->{'alt_id'})
160 2 2 if ($object->{'is_obsolete'} and $object->{'name'} and not $object->{'name'} =~ /^obsolete/i)
164 10 0 if ($object->{'is_relationshiptype'} and $object->{'name'})
170 72 7 if ($options)
171 34 38 if ($options->{'namespace_from_metadata'})
180 11 68 unless (($db_name, $accession) = $object->{'id'} =~ /^(\S+):(.+?)\s*$/)
181 0 11 if ($object->{'id'} eq 'part_of') { }
200 0 79 unless (defined $object->{'source_file'})
204 0 79 unless (defined $object->{'source_file_line_number'})
227 1 13 if $self == $other_term
232 0 13 if (scalar $lc->get_intersection == 0)
246 26 0 if (defined $field_conf) { }
247 15 11 if (defined $field_conf->{'type'} and $field_conf->{'type'} eq 'SINGLE' || $field_conf->{'type'} eq 'SINGLE_HASH') { }
250 7 8 if (defined $field_conf->{'merge'})
254 1 14 if (defined $res) { }
259 10 4 if (defined $new_field_value) { }
260 7 3 if (not defined $self->{$name} or $name eq 'namespace' and $self->{'_namespace_from_metadata'}) { }
265 3 0 if ($name ne "namespace" or not $other_term->{'_namespace_from_metadata'})
286 7 1 unless (grep {Compare($_, $single_value);} @{$$self{$name};})
297 26 169 if $field_name eq "id" or $field_name eq "alt_id"
299 26 143 unless (Compare($self->{$field_name}, $other_term->{$field_name}))
313 0 12 if ($self->is_relationshiptype) { }
325 26 34 if (ref $value) { }
327 2 24 if ($field_conf{$name}{'type'} eq 'SINGLE_HASH') { }
335 19 22 if (defined $to_string_proc) { }
352 60 120 if (defined $field_value)