Branch Coverage

blib/lib/PLS/Parser/Element.pm
Criterion Covered Total %
branch 16 90 17.7


line true false branch
28 0 555 unless &blessed($args{'element'}) and $args{'element'}->isa("PPI::Element")
69 0 152 unless $line_number
84 0 2157 unless $column_number
148 0 0 if (&blessed(scalar $element->statement) and $element->statement->isa("PPI::Statement::Include") and $element->statement->type eq "use")
153 0 0 if ($element->statement->module eq "parent" or $element->statement->module eq "base")
156 0 0 if CORE::length $import
162 0 0 if CORE::length $import
166 0 0 if (&blessed(scalar $element->statement) and $element->statement->isa("PPI::Statement::Include") and $element->statement->type eq "use")
172 0 0 if ($element->isa("PPI::Token::Word") and ref $element->snext_sibling eq "PPI::Token::Operator" and $element->snext_sibling eq "->")
180 0 0 if (&blessed(scalar $element->statement) and $element->statement->isa("PPI::Statement::Variable") and $element->statement->type eq "our" and &any(sub {
186 0 0 if CORE::length $import
205 0 0 if not &blessed($element) && $element->isa('PPI::Token::Word') && &blessed(scalar $element->sprevious_sibling) && $element->sprevious_sibling->isa('PPI::Token::Operator') or $element->sprevious_sibling ne "->"
227 0 0 unless &blessed($element) and $element->isa("PPI::Token::Word") and &blessed(scalar $element->sprevious_sibling) and $element->sprevious_sibling->isa("PPI::Token::Operator") and $element->sprevious_sibling eq "->" and &blessed(scalar $element->sprevious_sibling->sprevious_sibling) and $element->sprevious_sibling->sprevious_sibling->isa("PPI::Token::Word")
251 0 0 unless &blessed($element)
255 0 0 if &blessed(scalar $element->sprevious_sibling) and $element->sprevious_sibling->isa("PPI::Token::Operator") and $element->sprevious_sibling eq "->"
259 0 0 if ($element->isa('PPI::Token::Symbol') and $element->content =~ /^&/) { }
0 0 elsif ($element->isa('PPI::Token::Word')) { }
272 0 0 if ($content =~ /::/) { }
298 0 0 unless &blessed($element) and $element->isa("PPI::Token::Symbol")
323 0 0 if ($index <= $current_index + CORE::length($part))
325 0 0 if $i == $#parts
347 0 0 if ($element->isa("PPI::Token::Quote::Single") or $element->isa("PPI::Token::Quote::Literal"))
353 0 0 if ($element->isa("PPI::Token::Quote::Double") or $element->isa("PPI::Token::Quote::Interpolate"))
359 0 0 if ($element->isa("PPI::Token::QuoteLike::Words"))
362 0 0 if CORE::length $import
366 0 0 if ($element->isa("PPI::Structure::List"))
369 0 0 if CORE::length $import
387 0 0 unless $expr->isa("PPI::Statement::Expression")
392 0 0 unless $item->isa("PPI::Token::Quote")
394 0 0 if ($item->column_number <= $column_number and $item->column_number + CORE::length($item->content) >= $column_number)
396 0 0 if $item->can("literal")
414 0 0 unless CORE::length $content
423 0 0 if (not $word =~ /^\s*$/ and $current_column <= $column_number and $next_start > $column_number)
445 0 76 defined $last_line ? :
448 76 0 $lines == 0 ? :
482 0 92 if ref $self->{'_parent'} eq "PLS::Parser::Element"
483 0 92 unless $self->element->parent
497 55 24 if ref $self->{'_previous_sibling'} eq "PLS::Parser::Element"
498 6 18 unless $self->element->sprevious_sibling
513 25 5 if ref $self->{'_next_sibling'} eq "PLS::Parser::Element"
514 0 5 unless $self->element->snext_sibling
529 0 0 if ref $self->{'_children'} eq "ARRAY"
530 0 0 unless $self->element->can("children")
546 0 157 if ref $self->{'_tokens'} eq "ARRAY"
547 0 157 unless $self->element->can("tokens")