Branch Coverage

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


line true false branch
75 75 5 if $_ ne "id"
94 37 4 if ($val =~ /(\S+):(\S+)/) { }
102 0 4 if (defined $self->metadata->{'ontology'} and $self->metadata->{'ontology'} eq 'ro') { }
151 0 79 unless (defined $object)
155 10 40 if ($object->{'def'} and $object->{'def'}{'dbxrefs'} and $object->{'alt_id'})
168 2 2 if ($object->{'is_obsolete'} and $object->{'name'} and not $object->{'name'} =~ /^obsolete/i)
172 10 0 if ($object->{'is_relationshiptype'} and $object->{'name'})
178 72 7 if ($options)
179 34 38 if ($options->{'namespace_from_metadata'})
188 11 68 unless (($db_name, $accession) = $object->{'id'} =~ /^(\S+):(.+?)\s*$/)
189 0 11 if ($object->{'id'} eq 'part_of') { }
208 0 79 unless (defined $object->{'source_file'})
212 0 79 unless (defined $object->{'source_file_line_number'})
235 1 13 if $self == $other_term
240 0 13 if (scalar $lc->get_intersection == 0)
254 28 0 if (defined $field_conf) { }
255 15 13 if (defined $field_conf->{'type'} and $field_conf->{'type'} eq 'SINGLE' || $field_conf->{'type'} eq 'SINGLE_HASH') { }
258 7 8 if (defined $field_conf->{'merge'})
262 1 14 if (defined $res) { }
267 10 4 if (defined $new_field_value) { }
268 7 3 if (not defined $self->{$name} or $name eq 'namespace' and $self->{'_namespace_from_metadata'}) { }
273 3 0 if ($name ne "namespace" or not $other_term->{'_namespace_from_metadata'})
294 8 1 unless (grep {Compare($_, $single_value);} @{$$self{$name};})
305 26 182 if $field_name eq "id" or $field_name eq "alt_id"
307 28 154 unless (Compare($self->{$field_name}, $other_term->{$field_name}))
321 0 12 if ($self->is_relationshiptype) { }
333 26 34 if (ref $value) { }
335 2 24 if ($field_conf{$name}{'type'} eq 'SINGLE_HASH') { }
343 19 22 if (defined $to_string_proc) { }
360 60 132 if (defined $field_value)