Branch Coverage

blib/lib/FFI/Platypus/Record.pm
Criterion Covered Total %
branch 35 44 79.5


line true false branch
19 3 2 if (@_ % 2 == 0) { }
1 1 elsif (defined $_[0] and ref $_[0] eq 'ARRAY') { }
1 0 elsif (defined $_[0] and eval { do { $_[0]->isa('FFI::Platypus') } }) { }
47 24 0 if (defined $_[0])
49 2 22 if (ref $_[0] eq 'ARRAY') { }
7 15 elsif (eval { do { $_[0]->isa('FFI::Platypus') } }) { }
65 0 24 if scalar(@_) % 2
69 0 24 if ($caller->can("_ffi_record_size") or $caller->can("ffi_record_size"))
85 0 92 unless $name =~ /^[A-Za-z_][A-Za-z_0-9]*$/ or $name eq ":"
88 1 91 if $caller->can($name)
93 33 58 if $align > $record_align
102 9 82 if ($meta->{'type'} eq 'record') { }
111 66 16 unless defined $count
113 12 70 if $meta->{'type'} eq "string"
118 66 25 if ($name ne ":")
121 8 58 if ($meta->{'type'} eq "string" and $meta->{'access'} eq "rw")
129 0 8 if $@
138 0 66 if $error_str
152 1 20 ref $_[0] ? :
153 0 21 if @$args % 2
179 4 19 if (@destroy)
182 0 5 if _ffi_record_ro($_[0])