Branch Coverage

blib/lib/FFI/C/Struct.pm
Criterion Covered Total %
branch 41 46 89.1


line true false branch
19 217 6 if (my $member = $self->{'def'}{'members'}{$name}) { }
23 9 208 if ($member->{'nest'})
26 3 6 if @_
32 56 152 if (defined $member->{'count'})
34 42 14 if (defined $_[0]) { }
36 40 2 if (not XXX) { }
2 0 elsif (XXX) { }
39 2 38 if $index < 0
40 2 36 if $index >= $member->{'count'}
46 0 2 if @$array > $member->{'count'}
67 60 128 if (@_)
69 0 60 if XXX
74 2 58 if $member->{'rec'} and $member->{'size'} > do { use bytes; length $_[0] }
76 4 56 if (my $enum = $member->{'enum'})
78 2 2 if (exists $enum->str_lookup->{$$src}) { }
2 0 elsif (exists $enum->int_lookup->{$$src}) { }
97 182 6 unless $member->{'rec'}
98 3 185 if $member->{'trim_string'}
100 10 178 if (my $enum = $member->{'enum'})
102 5 5 if ($enum->rev eq "str")
104 5 0 if (exists $enum->int_lookup->{$value})
124 92 55 $self->{'def'}{'members'}{$name} ? :
130 19 87 if ($self->{'ptr'} and not $self->{'owner'})