Branch Coverage

blib/lib/Mic/Assembler.pm
Criterion Covered Total %
branch 110 136 80.8


line true false branch
33 47 0 unless $cls_stash->get_symbol('%__meta__')
50 0 49 unless $pkg ne $spec->{'name'}
59 0 49 unless $meta->{'has'}
72 49 0 if @_ > 0
88 1 133 if ($is_classmethod->{$sub})
91 1 133 if ($type)
102 44 5 unless ($stash->has_symbol('%__meta__'))
106 0 49 unless ($stash->has_symbol('%__meta__'))
120 49 49 if ($type eq 'interface' and ref $spec->{$type} eq 'HASH')
140 46 3 if ref $spec->{'interface'}
144 3 1 if (my $methods = $Mic::Spec_for{$spec->{'interface'}}{'interface'}) { }
149 0 1 if $count > 0
161 47 2 unless $spec->{'interface'}{'extends'}
164 0 2 unless my $declared_interface = $Mic::Spec_for{$super}{'interface'}
174 1 192 unless defined $spec->{'implementation'}{'methods'}{$method}
178 0 48 unless $count > 0
189 2 6 unless ($r)
191 0 2 $spec->{'interface_name'} ? :
192 0 2 unless defined wantarray
193 2 0 wantarray ? :
204 0 75 unless ($f)
206 0 0 unless defined wantarray
207 0 0 wantarray ? :
215 14 50 if (not $spec->{'implementation'}{'methods'}{$name} and $meta->{'reader'} and $$in_interface{$meta->{'reader'}})
223 143 1 if (&reftype($self) eq 'HASH')
230 1 63 if (not $spec->{'implementation'}{'methods'}{$name} and $meta->{'property'} and $$in_interface{$meta->{'property'}})
234 0 1 if $] lt '5.016'
240 0 2 if (&reftype($self) eq 'HASH')
247 1 63 if (not $spec->{'implementation'}{'methods'}{$name} and $meta->{'writer'} and $$in_interface{$meta->{'writer'}})
254 0 1 if (&reftype($self) eq 'HASH') { }
267 6 292 unless $in_interface->{$name}
292 44 5 unless $Mic::Contracts_for{$spec->{'name'}}{'invariant'}
298 0 5 unless my $inv_hash = !ref($spec->{'interface'}) && $Mic::Spec_for{$spec->{'interface'}}{'interface_meta'}{'invariant'} || $spec->{'interface_meta'}{'invariant'}
302 562 125 if (caller 1)[0] eq $spec->{'name'}
306 3 122 unless &$sub(@_)
319 222 21 unless $Mic::Contracts_for{$spec->{'name'}}{'pre'}
323 15 6 unless my $pre_cond_hash = $spec->{'interface_meta'}{$type}{$name}{'require'}
328 2 11 unless &$sub(@_)
338 201 42 unless $Mic::Contracts_for{$spec->{'name'}}{'post'}
342 24 18 unless my $post_cond_hash = $spec->{'interface_meta'}{$type}{$name}{'ensure'}
352 24 6 if ($type eq 'object')
358 6 24 if ($type eq 'class' and $name eq $constructor_spec->{'name'})
365 4 41 unless &$sub(@invocant, @old, $results_to_check, @_)
368 19 7 unless defined wantarray
369 1 6 wantarray ? :
399 6 45 if (my $builder = $impl_pkg->can('BUILD'))
408 46 5 unless exists $spec->{'invariant_guard'}
447 15 49 if ($meta->{'handles'})
450 14 1 if (ref $meta->{'handles'} eq 'ARRAY') { }
1 0 elsif (ref $meta->{'handles'} eq 'HASH') { }
459 0 51 if (defined $spec->{'implementation'}{'methods'}{$meth}) { }
470 276 12 &reftype($obj) eq 'HASH' ? :
471 187 101 if (wantarray) { }
86 15 elsif (defined wantarray) { }
491 0 116 unless (ref $spec->{'interface'})
494 0 0 if $s = $Mic::Spec_for{$spec->{'interface'}}{'constructor'}
507 48 1 if (not exists $spec->{'class_methods'}{$sub_name})
512 18 33 if (scalar @_ == 1) { }
2 31 elsif (scalar @_ > 1) { }
521 18 33 ref $arg eq 'HASH' ? :
527 0 18 if ($dup)
530 17 1 if ($attr)
532 14 3 if (&reftype($obj) eq 'HASH') { }
559 10 42 $spec->{'implementation'}{'arrayimp'} ? :
567 40 26 ref $meta->{'default'} eq 'CODE' ? :
1 66 $init->{$attr} ? :
568 11 56 if ($spec->{'implementation'}{'arrayimp'}) { }
581 42 10 if (&reftype($obj) eq 'HASH')