Branch Coverage

blib/lib/Parse/Method/Signatures.pm
Criterion Covered Total %
branch 154 168 91.6


line true false branch
100 0 147 unless $ppi->significant
109 180 10 $args->{'variable_name'} ? :
190 16 unless exists $args->{'unpacking'}
110 51 155 $args->{'named'} ? :
112 16 190 if exists $args->{'unpacking'}
160 145 2 unless $doc->find('Token::Regexp')
163 1 1 unless defined $node->{'operator'}
183 135 12 unless $doc->find('Token::Magic')
184 10 7 unless my($op) = $node->content =~ /^\$([,?:!)])$/
195 141 6 unless $doc->find('Token::Label')
196 0 8 unless my($word, $ws) = $node->content =~ /^(.*?)(\s+)?:$/s
199 7 1 if defined $ws
208 144 3 unless $doc->find('Token::Number::Hex')
210 3 0 unless $next->isa('PPI::Token::Word') and $next->content =~ /^[0-9a-f]+$/i
222 1 146 if ($ppi->class eq 'PPI::Token::Word' and exists $LEXTABLE{"$ppi"})
242 119 1 unless &blessed($self)
251 13 95 if ($param and $self->ppi->content eq ':')
254 1 12 if NamedParam()->check($param)
256 1 11 unless $param->required
258 1 10 if $param->has_default_value
261 3 7 if UnpackedParam()->check($param) or $param->sigil ne '$'
269 95 7 if ($param)
272 7 88 $param->sigil ne '$' ? :
280 1 41 unless $param
284 26 15 unless ($is_named)
285 1 25 if ($param->required and $opt_pos_param)
289 4 21 if ($greedy)
298 4 32 $param->sigil ne '$' ? :
335 2 230 unless (&blessed($self))
336 2 0 unless &blessed($self)
349 2 0 unless $self->_param_opt_or_req($self->_param_labeled($param) || $self->_param_named($param) || $self->_param_variable($param) || $self->_unpacked_param($param)) or $err_ctx == $self->ppi and return
362 0 2 wantarray ? :
204 2 !$class_meth ? :
372 10 209 unless $param
374 115 94 if ($self->ppi->class eq 'PPI::Token::Operator')
376 9 106 if ($c eq '?') { }
7 99 elsif ($c eq '!') { }
402 215 13 unless $self->ppi->isa('PPI::Token::LexSymbol') and $self->ppi->lex eq 'WHERE'
411 1 12 unless $ppi->class eq 'PPI::Token::Structure' and $ppi->content eq '{'
418 1 11 unless $ppi->finish
430 206 9 unless $self->ppi->isa('PPI::Token::LexSymbol') and $self->ppi->lex eq 'TRAIT'
435 1 8 unless $self->ppi->isa('PPI::Token::Word')
448 216 14 unless $self->ppi->content eq ':' and $self->ppi->next_token->isa('PPI::Token::Word')
453 0 14 if $self->ppi->content =~ /[^-\w]/
461 1 9 unless $self->_unpacked_param($param) or $self->_param_variable($param)
481 171 45 unless $self->ppi->content eq ':' and $self->ppi->next_token->isa('PPI::Token::Symbol')
492 3 42 if $param->{'sigil'} ne '$'
500 201 29 unless my $tc = $self->tc
504 1 28 $self->has_type_constraint_callback ? :
0 29 $self->has_from_namespace ? :
523 184 25 unless $self->ppi->content eq '='
528 0 25 unless $param->{'default_value'} = $self->_consume_if_isa('PPI::Token::QuoteLike', 'PPI::Token::Number', 'PPI::Token::Quote', 'PPI::Token::Symbol', 'PPI::Token::Magic', 'PPI::Token::ArrayIndex') || $self->bracketed('[') || $self->bracketed('{')
549 25 197 unless $class eq 'PPI::Token::Symbol' or $class eq 'PPI::Token::Cast'
552 187 10 if ($class eq 'PPI::Token::Symbol') { }
553 1 186 unless $ppi->symbol_type eq $ppi->raw_type
570 0 20 unless my $p = $self->param
573 1 19 if $p->sigil eq '$' and PositionalParam()->check($p)
577 8 11 if $self->ppi->content eq '}'
592 0 26 unless my $param = $self->param
595 2 24 if NamedParam()->check($param)
598 1 23 unless $param->required
603 8 15 if $self->ppi->content eq ']'
617 201 0 unless $ident or $required and $self->error($self->ppi)
634 1 14 if $self->ppi->content eq ']'
641 4 2 if $op->content eq '=>'
654 2 12 if $class eq 'Token::Number' or $class =~ /^Token::Quote::(?:Single|Double|Literal|Interpolate)/
664 52 9 unless $self->ppi->content eq '|'
681 1 3 unless $last->isa('PPI::Token::Word')
694 91 40 unless $ppi->content eq $type
701 2 38 unless $ppi->finish
706 36 2 if ($code) { }
710 1 29 if $self->ppi != $ppi->finish
732 4 15 if $sub =~ /(?:\b|_)tc(?:\b|_)/
733 1 14 if $sub =~ /(?:\b|_)unpacked(?:\b|_)/
735 5 9 if $sub =~ /(?:\b|_)param(?:\b|_)/
736 9 0 if $sub =~ /(?:\b|_)signature(?:\b|_)/
745 7 23 unless $msg
749 3 27 $no_in ? :
754 0 30 if ($DEBUG) { }
764 9 256 if ($self->ppi->content ne $need)
781 66 204 if $ppi->class eq 'PPI::Token::Word'
790 23 51 if $self->ppi->isa($_)
804 833 219 if $ppi->significant
807 22 811 if ($ppi->class eq 'PPI::Token::Word' and exists $LEXTABLE{"$ppi"})