Condition Coverage

lib/Changes/Version.pm
Criterion Covered Total %
condition 140 474 29.5


and 2 conditions

line l !l condition
433 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
436 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
467 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
470 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
649 2430 249 not exists $self->{'_reset'} && defined $self->{'_reset'} && length $self->{'_reset'} and scalar @_
664 73 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
667 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1194 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL
1197 0 0 not defined $Nice::Try::WANTARRAY and scalar @Nice::Try::LAST_VAL

and 3 conditions

line !l l&&!r l&&r condition
144 139 0 0 @_ == 1 and ref $_[0] ne "HASH"
0 0 139 @_ > 1 and ref $_[0] ne "HASH"
0 139 0 @_ > 1 and ref $_[0] ne "HASH" and @_ % 2 || ref $_[1] eq 'HASH'
148 0 0 42 defined $vstr and length "$vstr"
151 0 40 2 exists $opts->{'debug'} and defined $opts->{'debug'}
40 0 2 exists $opts->{'debug'} and defined $opts->{'debug'} and length "$opts->{'debug'}"
169 192 0 117 exists $self->{'_reset'} and defined $self->{'_reset'}
0 0 117 exists $self->{'_reset'} and defined $self->{'_reset'} and length $self->{'_reset'}
173 124 0 68 exists $self->{'_cache_value'} and defined $self->{'_cache_value'}
124 0 68 exists $self->{'_cache_value'} and defined $self->{'_cache_value'} and length $self->{'_cache_value'}
0 0 124 defined $self->{'original'} and length "$self->{'original'}"
186 54 58 5 defined $type and $type eq "dotted"
58 0 54 not defined $type and $Changes::Version::DEFAULT_TYPE eq "dotted"
196 58 0 0 defined $fmt and length $fmt
202 0 0 58 defined $minor and index($minor, '_') != -1 || length $minor == 3 && substr($minor, 0, 1) eq '0' || length(($patch // '') || $self->padded)
211 56 0 2 not $self->padded and index($str, "_") == -1
216 52 1 3 $self->pretty and index($str, "_") == -1
53 0 3 $self->pretty and index($str, "_") == -1 and not length([split(/\./, $str, 0)]->[1]) % 3
273 0 0 0 defined $minor and length $minor
0 0 0 defined $patch and length $patch
275 0 0 0 defined $patch and length $patch
351 0 0 0 ref $fmt and overload::Method($fmt, "\"\"")
414 60 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
433 60 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
436 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 60 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
60 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
445 59 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
456 35 0 23 defined $alpha and length "$alpha"
467 59 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
470 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 59 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
59 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
481 0 0 96 defined $str and length "$str"
482 0 96 0 $] >= "5.008001" and ref \$str eq "VSTRING"
501 83 0 13 defined $re->{'dotted'} and length $re->{'dotted'}
0 0 83 defined $re->{'decimal'} and length $re->{'decimal'}
514 90 0 6 defined $re->{'has_v'} and length $re->{'has_v'}
516 16 0 80 defined $re->{'minor'} and length $re->{'minor'}
517 94 0 2 defined $re->{'alpha'} and length $re->{'alpha'}
539 0 0 1 defined $re2->{'dotted'} and length $re2->{'dotted'}
559 11 0 1 defined $def->{'alpha'} and length $def->{'alpha'}
581 4 0 79 defined $def->{'minor'} and length $def->{'minor'}
583 83 0 0 defined $def->{'alpha'} and length $def->{'alpha'} < 3
83 0 0 defined $def->{'alpha'} and length $def->{'alpha'} < 3 and not $self->compat
649 0 0 2430 exists $self->{'_reset'} && defined $self->{'_reset'} && length $self->{'_reset'}
659 73 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
664 73 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
667 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 73 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 73 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
677 7 0 0 'Changes::Version'->_is_object($this) && $this->isa('Changes::Version')
706 0 0 2 "version"->parse($1) <= $vers and $vers <= "version"->parse($3)
753 0 0 0 defined $frag && length $frag
788 0 0 0 $frag_is_int and $frag == 0
792 0 0 0 $type eq "decimal" and $level > 2
860 0 0 84 defined $frag && length $frag
871 63 0 0 $frag_is_int and $frag == 1
42 0 0 $frag_is_int and $frag == 2
21 0 0 $frag_is_int and $frag == 3
0 0 0 $type eq "dotted" and $frag_is_int
900 0 0 0 defined $extra->[$i] && length $extra->[$i]
0 0 0 $i < $offset and not defined $extra->[$i] && length $extra->[$i]
974 96 0 0 $frag_is_int and exists $map->{$frag}
1059 0 0 4 defined $frag && length "$frag"
1067 4 0 0 defined $unit and not $unit =~ /^\d+$/
1080 4 0 0 $frag_is_int and exists $map->{$frag}
1087 4 0 0 $frag_is_int and $frag - 4 > $extra->size
4 0 0 defined $unit and $unit == 1
1133 0 0 190 defined $def->{'major'} and length $def->{'major'}
1136 0 0 94 defined $def->{'minor'} and length "$def->{'minor'}"
1137 0 0 94 defined $def->{'patch'} and length "$def->{'patch'}"
1143 0 0 96 defined $def->{'minor'} && length "$def->{'minor'}"
96 0 0 not defined $def->{'minor'} && length "$def->{'minor'}" and defined $def->{'alpha'}
96 0 0 not defined $def->{'minor'} && length "$def->{'minor'}" and defined $def->{'alpha'} and length "$def->{'alpha'}"
1159 96 0 94 defined $def->{'alpha'} and length $def->{'alpha'}
1166 0 0 80 defined $self and "Module::Generic"->_is_a($self, "Changes::Version")
0 0 80 defined $self and "Module::Generic"->_is_a($self, "Changes::Version") and eval {
0 0 80 defined $self and "Module::Generic"->_is_a($self, "Changes::Version") and eval {
1182 0 0 87 exists $self->{'_version'} && defined $self->{'_version'}
1190 0 0 0 $INC{'threads.pm'} and not exists $INC{'forks.pm'}
1194 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
1197 0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return' and !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 defined $Nice::Try::WANT and length $Nice::Try::WANT
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__NEXT__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__LAST__"
0 0 0 defined $Nice::Try::RETVAL[0] and $Nice::Try::RETVAL[0] eq "__REDO__"
0 0 0 defined $Nice::Try::BREAK and $Nice::Try::BREAK eq "return"
0 0 0 scalar @Nice::Try::VOID and !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')

or 2 conditions

line l !l condition
266 0 0 shift @_ || (return $self->error('No pattern was provided to format this version.'))
270 0 0 shift @_ || ''
300 0 0 $self->$_ // 0
308 0 0 $self->alpha // ""
312 0 0 $self->alpha // ""
328 0 0 $self->minor // ""
338 0 0 $self->patch // ""
340 0 0 $self->major // ""
412 59 1 $opts->{'raw'} //= 0
443 58 1 $opts->{'raw'} //= 0
812 0 0 $self->can($num2frag->{$j}) || die('Cannot find reference for method ', $num2frag->{$j})
820 0 0 $up_val // 0
953 96 0 $self->default_frag // "minor"
977 96 0 $self->can($map->{$frag} // $frag) || die('Cannot find code reference for method ', $frag_is_int ? $map->{$frag} : $frag)
1055 4 0 shift @_ || (return $self->error('No op was provided.'))
1083 4 0 $self->can($map->{$frag} // $frag) || die('Cannot find code reference for method ', $frag_is_int ? $map->{$frag} : $frag)
1134 96 0 $type // ""
96 0 $type // ""

or 3 conditions

line l !l&&r !l&&!r condition
144 42 0 97 @_ % 2 || ref $_[1] eq 'HASH'
0 0 139 @_ == 1 and ref $_[0] ne "HASH" or @_ > 1 and ref $_[0] ne "HASH" and @_ % 2 || ref $_[1] eq 'HASH'
186 5 54 58 defined $type and $type eq "dotted" or not defined $type and $Changes::Version::DEFAULT_TYPE eq "dotted"
202 0 58 0 index($minor, '_') != -1 || length $minor == 3 && substr($minor, 0, 1) eq '0' || length(($patch // '') || $self->padded)
351 0 0 0 not ref $fmt or ref $fmt and overload::Method($fmt, "\"\"")
436 60 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
59 1 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 60 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
470 59 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
58 1 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 59 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
667 73 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 73 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 73 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')
871 21 0 63 $frag eq "major" or $frag_is_int and $frag == 1
21 0 42 $frag eq "minor" or $frag_is_int and $frag == 2
21 0 21 $frag eq "patch" or $frag_is_int and $frag == 3
900 0 0 0 $i < $offset and not defined $extra->[$i] && length $extra->[$i] or $i > $offset
955 0 0 96 not defined $opts or ref $opts ne "HASH"
0 0 96 not defined $opts or ref $opts ne "HASH" or not exists $opts->{'op'}
0 0 96 not defined $opts or ref $opts ne "HASH" or not exists $opts->{'op'} or not defined $opts->{'op'}
0 0 96 not defined $opts or ref $opts ne "HASH" or not exists $opts->{'op'} or not defined $opts->{'op'} or not length $opts->{'op'}
974 0 96 0 $frag_is_int and exists $map->{$frag} or not $frag_is_int
995 8 8 80 $op eq "++" or $op eq "--"
1021 8 8 64 $op eq "++" or $op eq "--"
1080 0 4 0 $frag_is_int and exists $map->{$frag} or not $frag_is_int
1134 94 0 96 $self->qv or ($type // "") eq "dotted"
1153 567 0 3 length $def->{$_} or $ok
1197 0 0 0 defined $Nice::Try::WANTARRAY || defined $Nice::Try::BREAK && $Nice::Try::BREAK eq 'return'
0 0 0 !&Scalar::Util::blessed($Nice::Try::RETVAL[0]) || &Scalar::Util::blessed($Nice::Try::RETVAL[0]) && !$Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL')
0 0 0 not defined $Nice::Try::BREAK or $Nice::Try::BREAK eq "return"
0 0 0 !&Scalar::Util::blessed($Nice::Try::VOID[0]) || &Scalar::Util::blessed($Nice::Try::VOID[0]) && !$Nice::Try::VOID[0]->isa('Nice::Try::SENTINEL')