Condition Coverage

blib/lib/Gedcom/Item.pm
Criterion Covered Total %
condition 74 137 54.0


and 3 conditions

line !l l&&!r l&&r condition
32 0 9321 8 $self->{'file'} and $self->{'file'} ne '*'
81 8 0 0 $encoding eq 'utf-8' and $] >= 5.8
101 8 0 0 $callback and not &$callback($title, $txt1, "Record $count", tell $fh, $size)
108 6 0 2 $self->{'gedcom'}{'read_only'} and defined($gf = -M $self->{'file'})
6 1 1 $self->{'gedcom'}{'read_only'} and defined($gf = -M $self->{'file'}) and defined($gc = -M $if)
1 0 1 $self->{'gedcom'}{'read_only'} and defined($gf = -M $self->{'file'}) and defined($gc = -M $if) and $gc < $gf
153 0 0 0 defined $tag and length $tag
166 0 905 0 ref $item and $callback
905 0 0 ref $item and $callback and not &$callback($title, $txt1, "Record $count line " . $item->{'line'}, tell $fh, $size)
176 6 0 2 $self->{'gedcom'}{'read_only'} and defined $gf
6 2 0 $self->{'gedcom'}{'read_only'} and defined $gf and !defined($gc) || $gc > $gf
197 4282 29 9065 not $parse and $item->{'level'} >= 0
4311 6687 2378 not $parse and $item->{'level'} >= 0 and $self->{'gedcom'}{'read_only'}
6687 0 2378 not $parse and $item->{'level'} >= 0 and $self->{'gedcom'}{'read_only'} and $self->{'gedcom'}{'grammar'}
204 6716 1172 3110 $parse and $self->{'gedcom'}{'read_only'}
1172 0 3110 $parse and $self->{'gedcom'}{'read_only'} and $self->{'gedcom'}{'grammar'}
265 19972 0 0 $rec && $rec->{'level'}
0 1189 18783 not $rec && $rec->{'level'} and my $line = $self->next_text_line
340 2049 319 6697 defined $space and $self->{'grammar'}
341 0 377 8688 defined $star and $self->{'grammar'}
368 10805 0 9294 $rec and defined $rec->{'level'}
10805 200 9094 $rec and defined $rec->{'level'} and $rec->{'level'} > $item->{'level'}
394 6775 0 872 defined $self->{'xref'} and length $self->{'xref'}
401 167 1677 5803 defined $self->{'value'} and length $self->{'value'}
407 6754 7 879 $level < 0 and $c < @{$self->{'items'};} - 1
415 0 0 0 $self->{'tag'} and $self->{'tag'} =~ /^(CON[CT]|TRLR)$/
423 0 0 0 $level >= 0 && $self->{'tag'}
440 0 0 0 $events && defined $self->{'gedcom'}{'types'}{$self->{'tag'}} && $self->{'gedcom'}{'types'}{$self->{'tag'}} eq 'Event'
447 0 0 0 $tag =~ /^(FAM[SC]|HUSB|WIFE|CHIL|SUBM|NOTE)$/ and defined $value
0 0 0 $tag =~ /^(FAM[SC]|HUSB|WIFE|CHIL|SUBM|NOTE)$/ and defined $value and $self->resolve_xref($self->{'value'})
464 0 0 0 not $spaced and !(defined $value || $tag) || $tag eq 'EVEN' || $self->{'xref'}
496 10075 2 55859 wantarray and not $count
501 488 2 10077 $c->{'tag'} eq $tag and not --$count
590 235051 81 4282 not defined $self->{'_items'} and $self->{'level'} >= 0

or 2 conditions

line l !l condition
390 6761 886 $level ||= 0

or 3 conditions

line l !l&&r !l&&!r condition
23 9094 235 0 ref $proto || $proto
176 1 0 1 !defined($gc) || $gc > $gf
220 0 200 8189 not defined $next_level or $next_level <= $level
330 95 8970 9616 $level eq 'n' or $level > $item->{'level'}
383 1189 18783 22549 not defined $line or $line =~ /\S/
459 0 0 0 defined $value or $tag
464 0 0 0 !(defined $value || $tag) || $tag eq 'EVEN' || $self->{'xref'}
0 0 0 $sub_items or not $spaced and !(defined $value || $tag) || $tag eq 'EVEN' || $self->{'xref'}
468 0 0 0 $spaced or $sub_items
470 0 0 0 $spaced or $sub_items
480 0 0 0 $spaced or $sub_items