Branch Coverage

blib/lib/Kavorka/Parameter.pm
Criterion Covered Total %
branch 100 150 66.6


line true false branch
58 1 268 if exists $traits->{'rw'} and not exists $traits->{'ro'}
62 1 268 if exists $traits->{'ro'} and not exists $traits->{'rw'}
66 0 269 if exists $traits->{'copy'} and not exists $traits->{'alias'}
70 0 269 if exists $traits->{'alias'} and not exists $traits->{'copy'}
88 42 227 if @custom_traits
95 9 257 /\A[\$\@\%](?:\W|_\z)/u ? :
1 266 /::/u ? :
114 0 0 if (lex_peek(6) eq 'slurpy')
123 60 133 if ($peek =~ /\A[^\W0-9]/u and not $peek =~ /\A(my|our)\b/u) { }
9 124 elsif ($peek =~ /\A\(/u) { }
144 0 0 unless my $expr = parse_listexpr()
147 0 0 unless lex_peek() eq ')'
154 0 9 unless $type->isa('Type::Tiny')
161 0 0 if (lex_peek(2) =~ /\A\:\w/u)
169 0 0 if (lex_peek() eq '(')
180 0 0 if (lex_peek() eq ':')
187 0 0 if (lex_peek() eq '\\')
194 0 0 if (lex_peek(3) =~ /\A(my|our)/u)
201 0 0 if (lex_peek() eq '\\')
203 0 0 if $traits{'ref_alias'}++
208 16 177 if $saw_colon
212 16 177 if ($peek eq ':') { }
177 0 elsif ($peek eq '$' or $peek eq '@' or $peek eq '%') { }
226 174 3 unless @paramname
234 0 0 lex_peek(1) eq ')' ? :
240 0 0 if (lex_peek() eq '!') { }
0 0 elsif (lex_peek() eq '?') { }
272 0 0 if (lex_peek(5) =~ m[ \A ( (?: [/]{2} | [|]{2} )?= ) ]ux)
279 0 0 lex_peek(5) =~ / \A (?: when\b | [,)] ) /ux ? :
290 22 171 if defined $varname and not $traits{'ref_alias'} and $varname =~ /\A[\@\%]/u
313 19 174 if ($self->named)
316 0 19 unless $self->named_names
318 0 19 if $self->invocant
319 0 19 if $self->slurpy
322 182 11 if ($self->kind eq 'my') { }
324 0 182 if $name =~ /(::|\^)/u
328 0 11 if length $name < 2
331 0 193 if $self->invocant and $self->slurpy
341 8 293 if (length $var == 1)
352 8 293 $is_dummy ? :
361 290 10 $kind eq 'my' ? :
1 300 $kind eq 'our' ? :
379 122 157 $condition eq '1' ? :
10 279 $sigil eq '%' ? :
12 289 $sigil eq '@' ? :
385 106 195 if $type =~ /\{ \}\z/u
387 25 170 if $sig->nobble_checks
400 295 6 unless $self->coerce
403 0 6 unless my $type = $self->type
405 0 6 unless $type->has_coercion
412 0 6 if ($type->coercion->can_be_inlined) { }
429 2 4 if ($sigil eq '@') { }
0 4 elsif ($sigil eq '%') { }
0 4 elsif ($sigil eq '$' and $type->coercion->can_be_inlined) { }
4 0 elsif ($sigil eq '$') { }
461 6 0 wantarray ? :
469 26 576 if $self->default
470 345 231 if defined $fallback
472 1 230 if $self->named
477 96 134 if $self->invocant
497 35 266 if ($self->slurpy) { }
19 247 elsif ($self->named) { }
96 151 elsif ($self->invocant) { }
499 13 22 if ($self->sigil eq '%' or $self->sigil eq '$' and $self->type and do { require Types::Standard; $self->type->is_a_type_of(Types::Standard::HashRef()) }) { }
504 10 23 $_->named ? :
505 6 7 if (@names) { }
507 0 6 if $self->alias
510 1 5 $_->name eq '%_' ? :
536 0 22 if $sig->has_named
548 13 22 if ($self->sigil eq '$')
550 3 10 $slurpy_style eq '%' ? :
592 13 288 if $self->_injection_default_value('@@') ne '@@'
594 301 0 wantarray ? :
603 88 213 if (my $type = $self->type)
610 78 10 if (not $can_xs and $type->can_be_inlined) { }