Branch Coverage

blib/lib/YATT/Lite/MFields.pm
Criterion Covered Total %
branch 37 52 71.1


line true false branch
42 788 10 unless *{$sym;}{'HASH'}
69 1 935 if (@_ == 1 and ref $_[0] eq 'CODE') { }
73 210 4295 ref $item ? :
84 106 1263 if (ref $item) { }
85 0 106 unless (UNIVERSAL::isa($item, 'YATT::Lite::MFields'))
90 106 0 if $self->{'known_parent'}{$class}++
94 372 891 if $self->{'known_parent'}{$class}++
95 68 823 unless my $sym = look_for_globref($class, 'FIELDS')
98 0 823 unless $fields = *{$sym;}{'HASH'}
103 0 12473 unless (UNIVERSAL::isa($importing, $self->Decl))
107 0 395 do { $importing->{'cf_only_if_missing'} } ? :
0 395 do { not UNIVERSAL::isa($existing, $self->Decl) } ? :
395 12078 (my YATT::Lite::MFields::Decl $existing = $self->{'fields'}{$name}) ? :
126 2 0 wantarray ? :
132 0 4509 if (my $old = $self->{'fields'}{$attName})
135 0 4509 unless (@atts % 2 == 0)
141 33 4476 if ($field->{'cf_getter'})
143 19 14 if (not defined $code) { }
14 0 elsif (not ref $code) { }
0 0 elsif (ref $code ne 'CODE') { }
157 0 14 unless my $builder = $self->can("make_accessor_type_$type")
174 19 4490 if ($_[0] =~ /^(\w*)\^(\w+)$/) { }
3310 1180 elsif ($_[0] =~ /^cf_(\w+)$/) { }
175 19 0 $1 ? :
187 0 817 unless ($isa = *{$sym;}{'ARRAY'})
192 1 905 if grep {$_ eq $base;} @$isa