Branch Coverage

blib/lib/Perl/Critic/Policy/ValuesAndExpressions/RequireNumericVersion.pm
Criterion Covered Total %
branch 31 46 67.3


line true false branch
51 0 27 unless $assign eq '='
56 8 19 unless ($value->isa('PPI::Token::Quote'))
60 0 19 if (_following_expression($value))
66 16 3 if ($value->isa('PPI::Token::Quote::Double') or $value->isa('PPI::Token::Quote::Interpolate'))
72 3 16 if (_any_eval_VERSION($document, $package))
76 7 9 unless (defined Perl::Critic::Pulp::Utils::version_if_valid($str))
88 0 9 if ($str =~ /e/i)
96 2 7 if (defined $got_perl and $got_perl >= $perl_510)
102 7 0 unless (&Scalar::Util::looks_like_number($str))
112 13 6 unless my $after = $elem->snext_sibling
115 6 0 if ($after->isa('PPI::Token::Structure')) { }
0 0 elsif ($after->isa('PPI::Token::Operator')) { }
118 0 0 if (precedence_of($after) >= $assignment_precedence)
121 0 0 if ($after eq '.')
136 0 66 unless $elem->canonical =~ /^\$((\w+::)*)VERSION$/
140 54 12 if ($package eq '')
147 3 62 if ($package eq 'main')
162 2 25 unless $got_package eq $want_package
165 0 24 unless $assign eq '='
168 20 4 unless $value->isa('PPI::Token::Word')
169 0 4 unless $value eq 'eval'
172 1 3 unless $value->isa('PPI::Token::Symbol')
174 0 3 unless $got_package eq $want_package