Branch Coverage

blib/lib/Version/Requirements.pm
Criterion Covered Total %
branch 78 82 95.1


line true false branch
60 86 19 !&Scalar::Util::blessed($version) ? :
2 105 !defined($version) ? :
122 5 15 $type eq 'exact_version' ? :
187 0 6 unless my $range = $self->__entry_for($module)
204 1 2 unless $self->__entry_for($module)
206 1 1 if $self->is_finalized
247 1 100 if $fin and not $old
253 1 91 if $fin and $old->as_string ne $new->as_string
270 1 3 if $self->__entry_for($module)->as_string =~ /\s/
370 4 4 if (not defined $ver) { }
373 1 3 unless my $methods = $methods_for_op{$op}
404 2 1 if $self->_accepts($version)
411 2 1 if $$self{'version'} >= $minimum
417 2 1 if $$self{'version'} <= $maximum
423 2 1 unless $exclusion == $$self{'version'}
434 0 0 ref $_[0] ? :
437 52 36 unless ref $_[0]
445 34 2 exists $$s{'minimum'} ? :
8 28 exists $$s{'maximum'} ? :
12 24 exists $$s{'exclusions'} ? :
455 11 1 if exists $$self{'minimum'}
456 3 9 if exists $$self{'maximum'}
457 11 1 unless $$self{'exclusions'}
464 0 49 unless keys %$self
466 34 15 if keys %$self == 1 and exists $$self{'minimum'}
468 6 9 unless $$self{'exclusions'}
477 24 6 if (exists $$self{$k})
479 23 1 if (@new_exclusions == @exclusions) { }
497 1 7 unless $self->_accepts($version)
506 19 61 if (defined $$self{'minimum'} and defined $$self{'maximum'})
507 2 17 if ($$self{'minimum'} == $$self{'maximum'})
509 1 1 unless $$self{'exclusions'}
1 1 if grep {$_ == $$self{'minimum'};} @{[] unless $$self{'exclusions'};}
514 2 15 if $$self{'minimum'} > $$self{'maximum'}
519 21 55 if ($$self{'exclusions'})
521 19 1 if !defined($$self{'minimum'}) || $_ >= $$self{'minimum'} and !defined($$self{'maximum'}) || $_ <= $$self{'maximum'}
537 10 39 if (defined(my $old_min = $$self{'minimum'})) { }
550 1 16 if (defined(my $old_max = $$self{'maximum'})) { }
571 2 12 if defined $$self{'minimum'} and $version < $$self{'minimum'}
572 1 11 if defined $$self{'maximum'} and $version > $$self{'maximum'}
574 1 10 if defined $$self{'exclusions'} and grep {$version == $_;} @{$$self{'exclusions'};}