Branch Coverage

blib/lib/Mic/Assembler.pm
Criterion Covered Total %
branch 118 146 80.8


line true false branch
32 47 0 unless $cls_stash->get_symbol('%__meta__')
49 0 49 unless $pkg ne $spec->{'name'}
58 0 49 unless $meta->{'has'}
71 49 0 if @_ > 0
87 1 151 if ($is_classmethod->{$sub})
90 1 151 if ($type)
101 44 5 unless ($stash->has_symbol('%__meta__'))
105 0 49 unless ($stash->has_symbol('%__meta__'))
119 49 49 if ($type eq 'interface' and ref $spec->{$type} eq 'HASH')
139 46 3 if ref $spec->{'interface'}
143 3 1 if (my $methods = $Mic::Spec_for{$spec->{'interface'}}{'interface'}) { }
148 0 1 if $count > 0
160 49 2 unless ($interfaces)
168 0 2 if $super eq $spec->{'name'}
171 0 2 unless my $declared_interface = $Mic::Spec_for{$super}{'interface'}
181 49 2 unless defined $x
182 1 1 ref $x eq 'ARRAY' ? :
189 2 12 if (exists $h1->{$k}) { }
190 2 0 if (ref $h1->{$k} eq 'HASH' and ref $h2->{$k} eq 'HASH')
206 1 193 unless defined $spec->{'implementation'}{'methods'}{$method}
210 0 48 unless $count > 0
221 2 6 unless ($r)
223 0 2 $spec->{'interface_name'} ? :
224 0 2 unless defined wantarray
225 2 0 wantarray ? :
236 0 75 unless ($f)
238 0 0 unless defined wantarray
239 0 0 wantarray ? :
247 14 50 if (not $spec->{'implementation'}{'methods'}{$meta->{'reader'}} and $meta->{'reader'} and $$in_interface{$meta->{'reader'}})
255 142 1 if (&reftype($self) eq 'HASH')
262 1 63 if (not $spec->{'implementation'}{'methods'}{$meta->{'property'}} and $meta->{'property'} and $$in_interface{$meta->{'property'}})
266 0 1 if $] lt '5.016'
272 0 2 if (&reftype($self) eq 'HASH')
279 1 63 if (not $spec->{'implementation'}{'methods'}{$meta->{'writer'}} and $meta->{'writer'} and $$in_interface{$meta->{'writer'}})
286 0 1 if (&reftype($self) eq 'HASH') { }
299 24 292 unless $in_interface->{$name}
324 44 5 unless $Mic::Contracts_for{$spec->{'name'}}{'invariant'}
330 0 5 unless my $inv_hash = !ref($spec->{'interface'}) && $Mic::Spec_for{$spec->{'interface'}}{'interface_meta'}{'invariant'} || $spec->{'interface_meta'}{'invariant'}
334 562 125 if (caller 1)[0] eq $spec->{'name'}
338 3 122 unless &$sub(@_)
351 222 21 unless $Mic::Contracts_for{$spec->{'name'}}{'pre'}
355 15 6 unless my $pre_cond_hash = $spec->{'interface_meta'}{$type}{$name}{'require'}
360 2 11 unless &$sub(@_)
370 201 42 unless $Mic::Contracts_for{$spec->{'name'}}{'post'}
374 24 18 unless my $post_cond_hash = $spec->{'interface_meta'}{$type}{$name}{'ensure'}
384 24 6 if ($type eq 'object')
390 6 24 if ($type eq 'class' and $name eq $constructor_spec->{'name'})
397 4 40 unless &$sub(@invocant, @old, $results_to_check, @_)
400 19 7 unless defined wantarray
401 1 6 wantarray ? :
431 6 45 if (my $builder = $impl_pkg->can('BUILD'))
440 46 5 unless exists $spec->{'invariant_guard'}
479 15 49 if ($meta->{'handles'})
482 14 1 if (ref $meta->{'handles'} eq 'ARRAY') { }
1 0 elsif (ref $meta->{'handles'} eq 'HASH') { }
491 0 51 if (defined $spec->{'implementation'}{'methods'}{$meth}) { }
502 261 24 &reftype($obj) eq 'HASH' ? :
503 187 98 if (wantarray) { }
83 15 elsif (defined wantarray) { }
523 0 116 unless (ref $spec->{'interface'})
526 0 0 if $s = $Mic::Spec_for{$spec->{'interface'}}{'constructor'}
539 48 1 if (not exists $spec->{'class_methods'}{$sub_name})
544 18 33 if (scalar @_ == 1) { }
2 31 elsif (scalar @_ > 1) { }
553 18 33 ref $arg eq 'HASH' ? :
559 0 18 if ($dup)
562 17 1 if ($attr)
564 13 4 if (&reftype($obj) eq 'HASH') { }
591 17 35 $spec->{'implementation'}{'arrayimp'} ? :
599 40 26 ref $meta->{'default'} eq 'CODE' ? :
1 66 $init->{$attr} ? :
600 19 48 if ($spec->{'implementation'}{'arrayimp'}) { }
613 35 17 if (&reftype($obj) eq 'HASH')