Branch Coverage

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


line true false branch
10 0 51 if ($] < "5.01")
43 0 287 @_ == 1 ? :
57 8 279 if ($self->{'named_to_list'} and not ref $self->{'named_to_list'})
61 287 0 if (delete $self->{'rationalize_slurpies'})
65 26 256 if ($self->{'method'})
69 0 0 $self->{'package'} ? :
0 4 is_Str($type) ? :
22 4 is_Int($type) ? :
77 30 121 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 272 if (is_ArrayRef($self->{'class'}))
94 1 29 if ($self->has_slurpy)
111 154 133 if ($self->is_named) { }
131 2 elsif (@$parameters) { }
115 26 352 if ($parameter->type->is_strictly_a_type_of(&Slurpy())) { }
1 351 elsif ($parameter->{'slurpy'}) { }
127 25 129 if (@slurpy == 1) { }
1 128 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 91 if ($parameters->[-1]->type->is_strictly_a_type_of(&Slurpy())) { }
6 85 elsif ($parameters->[-1]{'slurpy'}) { }
151 3 176 if ($parameter->type->is_strictly_a_type_of(&Slurpy()) or $parameter->{'slurpy'})
157 1 281 if ($self->{'slurpy'} and $self->{'slurpy'}->has_default)
172 378 300 if ($is_named)
175 2 676 if (is_HashRef($list->[0]) and exists $list->[0]{'slurpy'} and not is_Bool($list->[0]{'slurpy'})) { }
183 57 621 if (is_HashRef($list->[0]))
184 55 2 unless (exists $list->[0]{'slurpy'} and not is_Bool($list->[0]{'slurpy'}))
190 3 4 $type ? :
0 0 $opts{'package'} ? :
0 671 is_Str($type) ? :
7 671 is_Int($type) ? :
210 535 39 unless defined $opts{$pos}
211 6 33 if (is_Int($opts{$pos}))
232 2 169 unless $positional or $named or $multiple
235 18 288 if ($multiple)
236 2 16 unless is_ArrayRef($multiple)
237 2 16 if $positional
238 2 16 if $named
248 155 133 if ($named)
249 21 134 unless exists $opts->{'bless'}
251 2 153 if $positional
276 35 3 defined $_[0]{'method_invocant'} ? :
280 293 147 if exists $_[0]{'can_shortcut'}
299 48 247 if $self->has_head
300 16 279 if $self->has_tail
302 69 225 if ($self->has_slurpy) { }
125 100 elsif ($self->is_named) { }
319 31 266 if (my $next = $self->goto_next)
320 30 1 if (is_CodeLike($next)) { }
329 34 263 if ($self->method)
339 48 248 if ($self->has_head)
342 16 280 if ($self->has_tail)
346 149 147 if ($self->is_named) { }
84 63 elsif ($self->can_shortcut) { }
356 6 290 if ($self->has_on_die)
375 1 278 if (defined $self->strictness and $self->strictness eq 1) { }
3 275 elsif ($self->strictness) { }
1 274 elsif ($self->has_strictness) { }
386 48 230 if $self->has_head
387 16 262 if $self->has_tail
394 114 407 if ($parameter->optional) { }
399 1 406 if $seen_optional and not $is_named
407 69 208 if $self->has_slurpy
416 149 128 if ($is_named) { }
418 131 18 unless $self->head
436 142 7 if $min_args_if_hash
456 83 45 if defined $max_args
461 67 61 if (defined $max_args and $min_args == $max_args) { }
8 53 elsif ($min_args and defined $max_args) { }
502 0 48 unless $self->has_head
533 0 16 unless $self->has_tail
566 149 146 if ($self->is_named) { }
591 30 116 $self->has_head ? :
595 119 55 $can_shortcut ? :
119 55 $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 125 if $self->has_strictness and not $self->strictness
678 8 117 if ($Type::Tiny::AvoidCallbacks)
683 0 125 defined $self->strictness && $self->strictness ne 1 ? :
699 28 266 if ($self->bless and $self->oo_trace)
702 28 0 if (defined $package and defined $subname)
725 48 248 if ($self->has_head)
729 147 149 if (not $self->is_named) { }
10 139 elsif ($self->named_to_list) { }
24 115 elsif ($self->class) { }
36 79 elsif ($self->bless) { }
730 85 62 $self->can_shortcut ? :
755 16 280 if ($self->has_tail)
767 31 282 if ($self->goto_next) { }
19 263 elsif ($args{'is_early'} or not exists $args{'is_early'}) { }
768 7 24 if ($list eq '@_') { }
792 3 438 $self->has_on_die ? :
805 7 665 $self->has_on_die ? :
813 277 0 if ($args{'got'})
820 351 203 unless is_Int($args{$c})
828 5 272 $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 { do { require Class::XSAccessor; "Class::XSAccessor"->VERSION("1.17"); 1 } }
907 0 0 unless eval $code
914 5 13 unless $self->is_named and $self->bless and not $self->named_to_list
955 7 278 if ($self->{'want_source'}) { }
1 277 elsif ($self->{'want_object'}) { }
49 228 elsif ($self->{'want_details'}) { }