Condition Coverage

blib/lib/Config/Model/Value.pm
Criterion Covered Total %
condition 278 365 76.1


and 3 conditions

line !l l&&!r l&&r condition
225 3381 593 0 defined $arg_ref->{'default'} and defined $arg_ref->{'upstream_default'}
288 2 0 43 defined $path and not ref $path
418 2082 94 6 defined $lv and not defined $self->{'choice_hash'}{$lv}
432 2 27 0 $vt ne "uniline" and $vt ne "string"
29 0 0 $vt ne "uniline" and $vt ne "string" and $vt ne "enum"
461 13 13 0 $vt ne "uniline" and $vt ne "string"
26 0 0 $vt ne "uniline" and $vt ne "string" and $vt ne "enum"
468 26 0 0 not ref $regexp_info and $what ne "warn"
503 0 1 0 $vt ne "uniline" and $vt ne "string"
547 3975 0 0 defined $args{'value_type'} and $args{'value_type'} eq "reference"
3975 0 0 defined $args{'value_type'} and $args{'value_type'} eq "reference" and not defined $self->{'refer_to'}
0 0 0 defined $args{'value_type'} and $args{'value_type'} eq "reference" and not defined $self->{'refer_to'} and not defined $self->{'computed_refer_to'}
588 3949 23 0 defined $self->{'write_as'} and $self->{'value_type'} ne "boolean"
822 4 5 0 $var eq "reference" and defined $self->{'referred_to_path'}
854 2722 2 345 $vt =~ /integer/u and $value =~ /^-?\d+$/u
2722 0 2 $vt =~ /number/u and $value =~ /^-?\d+(\.\d+)?$/u
2720 1 1 $vt =~ /integer/u and $value =~ /^-?\d+(\.\d+)?$/u
866 220 111 16 defined $self->{'max'} and $value > $self->{'max'}
868 265 82 0 defined $self->{'min'} and $value < $self->{'min'}
892 0 20 88 length $value and defined $self->{'choice_hash'}
20 83 5 length $value and defined $self->{'choice_hash'} and not defined $self->{'choice_hash'}{$value}
899 8 0 750 length $value and defined $self->{'choice_hash'}
8 746 4 length $value and defined $self->{'choice_hash'} and not defined $self->{'choice_hash'}{$value}
932 4454 15 45 defined $self->{'match_regexp'} and defined $value
967 1451 3059 4 defined $value and $self->{'warn'}
969 4506 3 5 defined $self->{'validation_parser'} and defined $value
1000 4128 2 277 $self->{'mandatory'} and $check eq "yes"
4130 0 277 $self->{'mandatory'} and $check eq "yes" and $mode =~ /backend|user/u
15 0 262 defined $value && length $value
2 262 15 $self->{'mandatory'} and $check eq "yes" and $mode =~ /backend|user/u and not defined $value && length $value
14 0 1 defined $self->{'layered'} && length $self->{'layered'}
262 1 14 $self->{'mandatory'} and $check eq "yes" and $mode =~ /backend|user/u and not defined $value && length $value and not defined $self->{'layered'} && length $self->{'layered'}
1051 0 37 60 defined $fix and not $apply_fix
1052 0 60 37 defined $fix and $apply_fix
1149 93 1 0 $self->{'nb_of_fixes'} and $old > $new
1219 3 28 2 defined $new_v and $self->has_warped_slaves
1272 8436 2 47 $self->has_warning and not $nowarning
8438 0 47 $self->has_warning and not $nowarning and not $silent
1323 801 2 1 defined $old_value and $old_value ne $value
1326 801 1 2 defined $old_value and $old_value eq $value
1331 1600 247 69 defined $old_value and $value eq $old_value
1376 0 120 1568 $notify_change and $old ne $new
1408 12 0 5 not $silent and $self->has_error
1424 21 17 1806 $ok and defined $value
38 1706 100 $ok and defined $value and $self->has_warped_slaves
1723 0 100 $ok and defined $value and $self->has_warped_slaves and !defined($old_value) || $value ne $old_value
0 0 100 $ok and defined $value and $self->has_warped_slaves and !defined($old_value) || $value ne $old_value and not $self->instance->layered || $self->instance->preset
1471 1662 255 0 $self->{'warp'} and defined $self->{'warp_info'}
1917 0 0 $self->{'warp'} and defined $self->{'warp_info'} and @{$self->{'warp_info'}{'computed_master'};}
1473 1906 10 1 defined $self->compute_obj and not $self->compute_obj->allow_user_override
1487 1878 0 38 defined $self->{'convert_sub'} and defined $value
1491 1913 0 3 $self->{'replace'} and defined $value
1497 18 17 1881 defined $value && length $value
1881 33 2 not defined $value && length $value and $self->mandatory
1563 435 0 0 $rd and &any(sub {
1615 9460 0 0 not defined $self->{'value_type'} and $check eq "yes"
1630 9456 0 4 ref $e and $e->isa("Config::Model::Exception::User")
1679 0 16108 0 $mode and not defined $accept_mode{$mode}
1694 7112 295 570 defined $pref and not $self->{'notified_change_for_default'}
7407 400 170 defined $pref and not $self->{'notified_change_for_default'} and not defined $data
1709 7936 18 23 defined $self->{'_migrate_from'} and not defined $data
1730 1902 91 1089 $data ne $pref and $data ne $self->{'upstream_default'}
1993 4 1085 $data ne $pref and $data ne $self->{'upstream_default'} and $data ne $layer_data
1741 4 0 5 defined $d and $d ne $self->{'upstream_default'}
1842 7973 0 4 defined $self->{'replace_follow'} and defined $value
1850 2 0 2 defined $rep and $rep ne $value
1860 624 811 6542 $mode =~ /backend|custom|user/u and $check ne "no"
1873 0 0 1 not $silent and $msg
1890 10372 0 71 $self->{'write_as'} and $self->value_type eq "boolean"
1892 25 2 46 defined $v && $v =~ /^\d+$/u

or 2 conditions

line l !l condition
537 3969 6 $self->backup // {}
830 0 4514 $args{'quiet'} || 0
831 1847 2667 $args{'check'} || 'yes'
832 94 4420 $args{'fix'} || 0
833 1714 2800 $args{'mode'} || 'backend'
940 69 0 shift() // ""
950 40 0 shift() // ""
995 1847 2560 $args{'check'} || 'yes'
996 1714 2693 $args{'mode'} || 'backend'
1137 73 21 $self->{'nb_of_fixes'} // 0
1196 3 1 $old // "<undef>"
2 2 $new // "<undef>"
1205 3 1 $old // "<undef>"
2 2 $new // "<undef>"
1244 0 6544 $args{'silent'} || 0
1245 0 6544 $args{'check'} || 'yes'
1269 7128 1357 $self->{'old_warning_hash'} || {}
1273 46 1 $value // "<undef>"
1298 39 1878 $args{'silent'} || 0
1300 1899 18 $args{'value'} // "<undef>"
1352 1822 18 3 $ok || $check eq 'no'
1361 0 1832 shift() // 1
1393 104 1 $value // "<undef>"
1464 1917 0 $args{'check'} || 'yes'
1572 41 0 $data // "<undef>"
1771 58 11 $res // "<undef>"
1810 9 9 $self->fetch(@args) // "<undef>"
1818 5229 2750 $args{'mode'} || 'backend'
1819 12 7967 $args{'silent'} || 0
1872 1 0 $value // "<undef>"

or 3 conditions

line l !l&&r !l&&!r condition
618 0 3974 1 delete $arg_ref->{'value_type'} || $self->value_type
627 67 898 2381 $value_type eq "reference" or $value_type eq "enum"
733 8 0 7 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
797 7 0 44 $help->{'.'} || $help->{'.*'}
799 0 0 25 $k eq "" or $k eq ".*"
854 345 0 2724 $vt =~ /integer/u and $value =~ /^-?\d+$/u or $vt =~ /number/u and $value =~ /^-?\d+(\.\d+)?$/u
3 2 2716 $vt eq "file" or $vt eq "dir"
1 0 1598 $vt =~ /integer/u or $vt =~ /number/u
888 94 14 0 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
997 4407 0 0 $args{'error'} // carp("Missing error parameter")
1083 75 0 0 $w_info->{$label}{'msg'} || $label
1115 82 27 0 $w_info->{$rxp}{'msg'} || "value should ${may_be}match regexp '${rxp}'"
1201 26 5 3 $new // $self->_fetch_std
1202 32 0 2 $old // $self->_fetch_std
1254 20 10 1686 $err_count or $warn_count
1374 243 59 1386 $self->{'data'} // $self->_fetch_std
1375 1671 4 13 $value // $self->_fetch_std
1401 1823 4 20 $ok or $check eq "no"
1424 31 69 0 !defined($old_value) || $value ne $old_value
0 0 100 $self->instance->layered || $self->instance->preset
1455 25 1 212 $$v_ref =~ /^(n|no|false|off)$/iu or length $$v_ref == 0
1482 40 4 1872 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1531 24 38 1785 $self->has_error or $self->has_warning
1559 435 0 0 delete $args{'data'} // delete $args{'value'}
1603 51 4 3370 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1781 353 52 614 $data // $alt
1786 329 0 1482 $alt // $data
1867 7958 0 19 $ok or $check eq "no"
1919 0 18 14 defined $self->{'layered'} || defined $self->{'data'}
1930 0 42 73 defined $self->{'preset'} || defined $self->{'data'}

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
1098 13 19 20 23 $invert xor $ret