Branch Coverage

blib/lib/Zydeco/Lite.pm
Criterion Covered Total %
branch 111 208 53.3


line true false branch
38 186 52 if @$ref and $type->check($ref->[0])
44 175 14 if @$ref and $type->check($ref->[-1])
58 11 0 if is_Undef($nameref)
60 0 0 unless (is_Undef($$nameref))
72 0 133 unless defined $level
75 112 21 if (defined $coderef)
99 0 0 @_ > 1 ? :
109 12 4 if (is_Str($name)) { }
129 0 16 if (delete $args{'debug'})
138 4 12 if ($is_anon)
147 1 83 unless ($THIS{'APP_SPEC'})
163 77 7 @_ % 2 ? :
166 5 79 $dummy_dfn ? :
171 31 53 $args{'is_role'} ? :
0 84 $args{'abstract'} ? :
0 84 $args{'interface'} ? :
174 2 82 if (delete $args{'is_generator'})
177 2 0 if (is_Str($name)) { }
180 1 1 $args{'is_role'} ? :
184 0 2 if $finalize
188 0 0 $args{'is_role'} ? :
192 0 0 unless $THIS{'APP_SPEC'}
204 30 52 $args{'is_role'} ? :
75 7 is_Str($name) ? :
209 75 7 is_Str($name) ? :
217 7 75 if (not is_Str($name)) { }
29 46 elsif ($THIS{'CLASS_SPEC'}) { }
218 5 2 $args{'is_role'} ? :
222 0 7 unless $THIS{'APP_SPEC'}
231 0 29 unless defined $THIS{'CLASS'}
233 0 29 if $THIS{'CLASS_SPEC'}{'is_role'}
235 0 29 if $THIS{'CLASS_SPEC'}{'is_generator'}
244 0 75 if $finalize
250 0 31 unless $THIS{'APP_SPEC'}
259 0 0 unless $THIS{'APP_SPEC'}
268 0 0 unless $THIS{'APP_SPEC'}
300 2 0 $package ? :
310 0 33 unless my $definition = &_pop_type(scalar &CodeRef(), \@_)
316 0 33 if (is_ScalarRef($subname) or is_Undef($subname))
319 0 0 if ($sig or keys %args) { }
320 0 0 if (defined $sig)
325 0 0 unless exists $args{'named'}
342 7 26 if (defined $sig)
344 6 1 unless exists $args{'named'}
354 21 0 $THIS{'CLASS_SPEC'} ? :
357 21 0 if ($target) { }
378 7 0 if (my $target = $THIS{'CLASS_SPEC'} || $THIS{'APP_SPEC'}) { }
397 3 0 is_Str($_[0]) ? :
403 3 0 if ($target) { }
423 0 10 unless $THIS{'CLASS_SPEC'}
425 0 10 if $THIS{'CLASS_SPEC'}{'is_role'}
427 1 9 if (@_ == 0 and not $THIS{'CLASS_SPEC'}{'factory'})
433 0 9 unless my $subnames = &_shift_type(&Str() | &ArrayRef(), \@_)
438 3 6 if is_Str($subnames)
441 3 6 unless (is_ScalarRef($definition))
445 0 3 if $sig
453 0 2 unless my $target = $THIS{'CLASS_SPEC'}
455 0 2 if $target->{'is_role'}
457 2 0 is_Str($_[0]) ? :
470 0 12 unless my $definition = &_pop_type(scalar &CodeRef(), \@_)
472 0 12 unless my $subname = &_shift_type(&Str() | &ArrayRef(), \@_)
479 0 12 if (defined $sig)
481 0 0 unless exists $args{'named'}
485 0 12 if (@keys > 1)
491 12 0 if ($target) { }
492 4 8 ref $subname ? :
522 0 6 unless my $spec = $THIS{'CLASS_SPEC'} || $THIS{'APP_SPEC'}
524 0 6 if $spec->{'is_role'}
533 0 36 unless my $spec = $THIS{'CLASS_SPEC'} || $THIS{'APP_SPEC'}
542 0 19 unless $THIS{'CLASS_SPEC'}
544 0 19 unless my $names = &_shift_type(&ArrayRef() | &ScalarRef() | &Str(), \@_)
546 9 10 @_ == 1 ? :
548 0 19 if (is_ArrayRef($spec)) { }
16 3 elsif (is_HashRef($spec)) { }
555 19 0 unless is_ArrayRef($names)
562 0 5 unless my $names = &_shift_type(&ArrayRef() | &Str(), \@_)
566 5 0 unless is_ArrayRef($names)
568 5 0 if (my $spec = $THIS{'CLASS_SPEC'} || $THIS{'APP_SPEC'}) { }
583 0 0 unless $THIS{'CLASS_SPEC'} and $THIS{'CLASS_SPEC'}{'is_role'}
595 0 6 unless my $target = $THIS{'CLASS_SPEC'} || $THIS{'APP_SPEC'}
598 0 6 unless $toolkit
602 0 0 /^::(.+)/ ? :
610 0 3 unless $THIS{'CLASS_SPEC'}
612 0 3 unless @_ == 1 and (&Str() | &Undef())->check($_[0])
622 0 3 unless my $target = $THIS{'CLASS_SPEC'} || $THIS{'APP_SPEC'}
629 0 3 unless my $target = $THIS{'CLASS_SPEC'} || $THIS{'APP_SPEC'}
636 0 0 unless $THIS{'CLASS_SPEC'}
638 0 0 if $THIS{'CLASS_SPEC'}{'is_role'}
643 0 0 unless $THIS{'CLASS_SPEC'}{'overload'}
652 0 3 unless $THIS{'CLASS_SPEC'}
654 0 3 unless my $type = &_shift_type(&Str() | &Object(), \@_)
656 0 3 unless my $method = &_shift_type(scalar &Str(), \@_)
660 3 0 $code ? :
678 0 6 if keys %remains
686 0 0 unless $THIS{'CLASS_SPEC'}
688 0 0 unless is_CodeRef(my $coderef = shift())
703 0 0 unless $THIS{'CLASS_SPEC'}
705 0 0 unless is_CodeRef(my $coderef = shift())
720 0 2 unless $THIS{'CLASS_SPEC'} and $THIS{'CLASS_SPEC'}{'is_role'}
722 0 2 unless is_CodeRef(my $coderef = shift())
729 0 2 'Role::Hooks'->is_role($_[1]) ? :
739 0 3 unless $THIS{'CLASS_SPEC'} and $THIS{'CLASS_SPEC'}{'is_role'}
741 0 3 unless is_CodeRef(my $coderef = shift())
748 1 3 'Role::Hooks'->is_role($_[1]) ? :