Branch Coverage

blib/lib/Perl/Critic/Policy/ValuesAndExpressions/ProhibitComplexVersion.pm
Criterion Covered Total %
branch 30 34 88.2


line true false branch
57 168 197 if $VERSION_VARIABLE ne $elem->content
65 3 194 if not $operator = get_next_element_in_same_simple_statement($elem) or $Perl::Critic::Policy::ValuesAndExpressions::ProhibitComplexVersion::EQUAL ne $operator
70 0 194 unless my $statement = $self->_get_simple_statement($elem)
75 14 180 if $exception = $self->_validate_fully_qualified_symbols($elem, $statement, $doc)
83 171 9 unless my $module = get_previous_module_used_on_same_line($elem)
88 7 2 if $module eq $VERSION_MODULE and not $self->{'_forbid_use_version'}
108 197 243 if (is_ppi_simple_statement($statement)) { }
109 194 3 unless $parent = $statement->parent and $parent->isa("PPI::Structure::List")
129 167 27 unless $doc->find("PPI::Statement::Package")
134 0 194 unless $statement->find("PPI::Token::Symbol")
136 10 215 if ($symbol->canonical =~ / \A [\@\$%&] ([\w:]*) :: /msx)
137 9 1 unless $local_package{$1}
153 118 67 unless $statement->find(sub {
168 0 1 if $local_package{$1}
175 3 181 unless $statement->find("PPI::Token::Word")
176 4 271 if ($symbol->content =~ / \A ([\w:]*) :: /msx)
178 4 0 unless $local_package{$1}