Branch Coverage

blib/lib/Type/Params/Signature.pm
Criterion Covered Total %
branch 201 224 89.7


line true false branch
10 0 52 if ($] < "5.01")
43 0 290 @_ == 1 ? :
57 9 281 if ($self->{'named_to_list'} and not ref $self->{'named_to_list'})
61 290 0 if (delete $self->{'rationalize_slurpies'})
65 29 256 if ($self->{'method'})
69 0 0 $self->{'package'} ? :
0 7 is_Str($type) ? :
22 7 is_Int($type) ? :
77 30 122 if (defined $self->{'bless'} and $self->{'bless'} eq 1 and not $self->{'named_to_list'})
80 30 0 unless exists $self->{'oo_trace'}
83 8 275 if (is_ArrayRef($self->{'class'}))
94 1 29 if ($self->has_slurpy)
111 155 135 if ($self->is_named) { }
133 2 elsif (@$parameters) { }
115 26 355 if ($parameter->type->is_strictly_a_type_of(&Slurpy())) { }
1 354 elsif ($parameter->{'slurpy'}) { }
127 25 130 if (@slurpy == 1) { }
1 129 elsif (@slurpy) { }
129 24 1 if ($constraint->type_parameter and $constraint->type_parameter->{'uniq'} == &Any()->{'uniq'} or $constraint->my_slurp_into eq 'HASH') { }
142 40 93 if ($parameters->[-1]->type->is_strictly_a_type_of(&Slurpy())) { }
6 87 elsif ($parameters->[-1]{'slurpy'}) { }
151 3 181 if ($parameter->type->is_strictly_a_type_of(&Slurpy()) or $parameter->{'slurpy'})
157 1 284 if ($self->{'slurpy'} and $self->{'slurpy'}->has_default)
172 381 305 if ($is_named)
175 2 684 if (is_HashRef($list->[0]) and exists $list->[0]{'slurpy'} and not is_Bool($list->[0]{'slurpy'})) { }
183 60 626 if (is_HashRef($list->[0]))
184 58 2 unless (exists $list->[0]{'slurpy'} and not is_Bool($list->[0]{'slurpy'}))
190 3 4 $type ? :
0 0 $opts{'package'} ? :
0 679 is_Str($type) ? :
7 679 is_Int($type) ? :
210 541 39 unless defined $opts{$pos}
211 6 33 if (is_Int($opts{$pos}))
232 2 171 unless $positional or $named or $multiple
235 19 291 if ($multiple)
236 2 17 unless is_ArrayRef($multiple)
237 2 17 if $positional
238 2 17 if $named
248 156 135 if ($named)
249 22 134 unless exists $opts->{'bless'}
251 2 154 if $positional
276 39 3 defined $_[0]{'method_invocant'} ? :
280 298 150 if exists $_[0]{'can_shortcut'}
299 51 248 if $self->has_head
300 16 283 if $self->has_tail
302 69 229 if ($self->has_slurpy) { }
126 103 elsif ($self->is_named) { }
319 33 268 if (my $next = $self->goto_next)
320 32 1 if (is_CodeLike($next)) { }
329 38 263 if ($self->method)
339 51 249 if ($self->has_head)
342 16 284 if ($self->has_tail)
346 150 150 if ($self->is_named) { }
85 65 elsif ($self->can_shortcut) { }
356 6 294 if ($self->has_on_die)
375 1 281 if (defined $self->strictness and $self->strictness eq 1) { }
3 278 elsif ($self->strictness) { }
1 277 elsif ($self->has_strictness) { }
386 51 230 if $self->has_head
387 16 265 if $self->has_tail
394 117 412 if ($parameter->optional) { }
399 1 411 if $seen_optional and not $is_named
407 69 211 if $self->has_slurpy
416 150 130 if ($is_named) { }
418 131 19 unless $self->head
436 143 7 if $min_args_if_hash
456 85 45 if defined $max_args
461 67 63 if (defined $max_args and $min_args == $max_args) { }
10 53 elsif ($min_args and defined $max_args) { }
502 0 51 unless $self->has_head
533 0 16 unless $self->has_tail
566 150 149 if ($self->is_named) { }
591 32 117 $self->has_head ? :
595 119 60 $can_shortcut ? :
119 60 $can_shortcut ? :
613 0 69 unless $self->has_slurpy
620 24 45 if ($self->is_named) { }
1 44 elsif ($real_type and $real_type->{'uniq'} == &Any()->{'uniq'}) { }
29 15 elsif ($slurp_into eq 'HASH') { }
659 24 45 $self->is_named ? :
674 0 126 if $self->has_strictness and not $self->strictness
678 8 118 if ($Type::Tiny::AvoidCallbacks)
683 0 126 defined $self->strictness && $self->strictness ne 1 ? :
699 28 270 if ($self->bless and $self->oo_trace)
702 28 0 if (defined $package and defined $subname)
725 51 248 if ($self->has_head)
729 149 150 if (not $self->is_named) { }
11 139 elsif ($self->named_to_list) { }
24 115 elsif ($self->class) { }
36 79 elsif ($self->bless) { }
730 85 64 $self->can_shortcut ? :
755 16 283 if ($self->has_tail)
767 33 284 if ($self->goto_next) { }
19 265 elsif ($args{'is_early'} or not exists $args{'is_early'}) { }
768 7 26 if ($list eq '@_') { }
792 3 442 $self->has_on_die ? :
805 7 676 $self->has_on_die ? :
813 280 0 if ($args{'got'})
820 353 207 unless is_Int($args{$c})
828 5 275 $self->has_on_die ? :
847 1 29 if ($self->has_slurpy)
854 20 43 if (my $predicate = $parameter->predicate)
855 0 20 unless $predicate =~ /^[^0-9\W]\w*$/
859 63 0 if (my $getter = $parameter->getter)
860 2 61 unless $getter =~ /^[^0-9\W]\w*$/
876 0 30 if ($env eq "PP" or $ENV{'PERL_ONLY'})
886 0 30 unless eval {
907 0 0 unless eval $code
914 6 13 unless $self->is_named and $self->bless and not $self->named_to_list
955 7 281 if ($self->{'want_source'}) { }
1 280 elsif ($self->{'want_object'}) { }
52 228 elsif ($self->{'want_details'}) { }