Branch Coverage

blib/lib/Perl/Version/Bumper.pm
Criterion Covered Total %
branch 135 180 75.0


line true false branch
29 6 174 if (/\A *([1-9][0-9.]*)/)
41 132 42 if $enabled
42 42 132 if $disabled
43 48 126 if $removed
44 42 132 if @compat
45 42 132 if $disabled
67 0 12860 unless length $o
69 56 12803 $v < 5.01 ? :
77 0 3865 unless length $o
79 0 3865 $v < 5.01 ? :
101 2 488 $v ne $s ? :
136 0 0 ref $_[0] eq 'HASH' ? :
0 3869 @_ % 2 ? :
0 3869 scalar @_ == 1 ? :
148 3 3863 if $version_num > $feature_version
150 2 3861 if $version_num ne stable_version($version_num)
172 0 0 $_->[0] eq '{' ? :
0 0 $_->[0] eq '[' ? :
0 0 $_->[0] eq 'CODE' ? :
0 17922 ref $_ ? :
183 0 17559 ref $_[-1] eq 'HASH' ? :
190 0 0 $tokens[0] ? :
0 17580 if ($token->isa('PPI::Token::Structure')) { }
87 17493 elsif ($token eq ',' or $token eq '=>') { }
0 17493 elsif ($token->isa('PPI::Token::Symbol')) { }
0 17493 elsif ($token->isa('PPI::Token::Word') and $token eq 'undef' and $tokens[0] ? $tokens[0] ne '=>' : !0) { }
0 17493 elsif ($token->isa('PPI::Token::HereDoc')) { }
191 0 0 if ($token =~ /\A[[{(]\z/) { }
0 0 elsif ($token =~ /\A[]})]\z/) { }
193 0 0 $token eq '{' && $prev && $prev eq 'sub' ? :
212 0 0 if ($subscript and $subscript->isa('PPI::Structure::Subscript')) { }
239 0 0 $token->isa('PPI::Token::Operator') ? :
0 0 $token->can('string') ? :
225 0 $token->can('simplify') ? :
17268 225 $token->can('literal') ? :
0 17493 exists $constants->{$token} && ($next_sibling ? $next_sibling ne '=>' : !0) ? :
241 225 0 $clone->simplify && $clone->can('literal') ? :
263 96 12309 if $prev_sibling->significant
264 11961 348 if $prev_sibling =~ /\n\z/
272 11961 96 if (not $stmt->sprevious_sibling or $stmt->sprevious_sibling->location->[0] ne $stmt->location->[0])
278 87 12189 if $next->significant
280 11874 315 if $next eq "\n"
284 114 11847 if $keep_comments and grep $_->isa("PPI::Token::Comment"), @to_drop
300 1194 264 if $elem->isa("PPI::Statement::Include") and $elem->module eq $module and $elem->type eq $type and not $elem->arguments
308 1194 9861 if (ref $use_module)
319 28623 3415770 if $elem->isa("PPI::Statement::Include") and $elem->module eq $module
325 0 146544 unless defined $found
327 133647 12897 unless $found
328 11994 903 $type ? :
336 7353 646365 if $elem->isa("PPI::Statement::Include") and $elem->version
340 0 15162 unless defined $version_stmts
342 7281 7881 $version_stmts ? :
463 291 714 if ($include_compat->type eq "no")
467 21 147 if (exists $feature_in_bundle->{'known'}{$feature} and not exists $feature_in_bundle->{'disabled'}{$feature} and $feature{$feature}{'compat'}{$compat} <= 0)
481 168 123 if exists $feature_in_bundle->{'known'}{$feature} or $feature{$feature}{'compat'}{$compat} > 0
485 714 291 if ($include_compat->type eq "use")
490 108 273 if (exists $feature_in_bundle->{'known'}{$feature} and !exists $feature_in_bundle->{'enabled'}{$feature} || exists $feature{$feature}{'unfeature'} and $feature{$feature}{'compat'}{$compat} >= 0)
508 273 288 if not exists $feature{$feature}{'unfeature'} and exists $feature_in_bundle->{'enabled'}{$feature} || $feature{$feature}{'compat'}{$compat} < 0
510 381 333 if $drop_stmt
534 3708 7410 if @new_args == @old_args
535 126 7284 if (@new_args) { }
559 4956 591 if @new_args == @old_args
560 45 546 if (@new_args) { }
578 12363 696 if $old_num < $feature_enabled and $version_num >= $feature_enabled and not $enabled_in_code{$feature} and not $disabled_in_code{$feature}
588 573 6 if $old_num < $feature_disabled and $version_num >= $feature_disabled and not $enabled_in_code{$feature} and not $disabled_in_code{$feature}
594 318 576 unless grep /\Aexperimental::/, @old_args
601 411 165 if @new_args == @old_args or @new_args + @keep_args == @old_args
603 30 135 if (@new_args or @keep_args) { }
615 8682 477 if $version_num >= "5.012"
618 2373 6786 if $version_num >= "5.036"
629 51 9159 unless defined $insert_point
635 273 414 if $insert_point->previous_sibling and $insert_point->previous_sibling->isa("PPI::Token::Whitespace") and not $insert_point->isa('PPI::Statement::Include') && $insert_point->version
641 9108 51 if ($insert_point->significant) { }
643 273 8835 if $indent
659 0 2778 unless open \*OLDERR, ">&", \*STDERR
660 0 2778 unless open \*STDERR, ">", $tmperr
671 0 2778 unless open \*STDERR, ">&", \*OLDERR
672 690 2088 if $exit
685 3465 6861 if (my(@version_stmts) = _version_stmts($doc)) { }
688 0 3465 if (@version_stmts > 1) { }
698 2349 1116 if ($old_num <= $self->version_num)
715 0 5882 unless defined $doc
723 2544 397 if ($bumped ne $code)
746 204 1071 unless (_try_compile_file($tmp, $options->{'env'}))
755 1017 486 $self->version_num eq $version ? :
763 1017 486 if _try_compile_file($tmp, $options->{'env'})
769 1017 54 $version ? :
781 0 425 unless defined $doc
788 0 425 unless defined $doc
791 339 86 if $version