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
228 3440 593 0 defined $arg_ref->{'default'} and defined $arg_ref->{'upstream_default'}
291 2 0 43 defined $path and not ref $path
421 2082 94 6 defined $lv and not defined $self->{'choice_hash'}{$lv}
435 2 27 0 $vt ne "uniline" and $vt ne "string"
29 0 0 $vt ne "uniline" and $vt ne "string" and $vt ne "enum"
464 13 13 0 $vt ne "uniline" and $vt ne "string"
26 0 0 $vt ne "uniline" and $vt ne "string" and $vt ne "enum"
471 26 0 0 not ref $regexp_info and $what ne "warn"
506 0 1 0 $vt ne "uniline" and $vt ne "string"
550 4034 0 0 defined $args{'value_type'} and $args{'value_type'} eq "reference"
4034 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'}
591 4008 23 0 defined $self->{'write_as'} and $self->{'value_type'} ne "boolean"
825 4 5 0 $var eq "reference" and defined $self->{'referred_to_path'}
857 2775 2 345 $vt =~ /integer/u and $value =~ /^-?\d+$/u
2775 0 2 $vt =~ /number/u and $value =~ /^-?\d+(\.\d+)?$/u
2773 1 1 $vt =~ /integer/u and $value =~ /^-?\d+(\.\d+)?$/u
869 220 111 16 defined $self->{'max'} and $value > $self->{'max'}
871 265 82 0 defined $self->{'min'} and $value < $self->{'min'}
895 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}
902 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}
935 4511 15 45 defined $self->{'match_regexp'} and defined $value
970 1455 3112 4 defined $value and $self->{'warn'}
972 4563 3 5 defined $self->{'validation_parser'} and defined $value
1003 4185 2 277 $self->{'mandatory'} and $check eq "yes"
4187 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'}
1054 0 37 60 defined $fix and not $apply_fix
1055 0 60 37 defined $fix and $apply_fix
1152 93 1 0 $self->{'nb_of_fixes'} and $old > $new
1222 3 28 2 defined $new_v and $self->has_warped_slaves
1275 8523 2 47 $self->has_warning and not $nowarning
8525 0 47 $self->has_warning and not $nowarning and not $silent
1326 801 2 1 defined $old_value and $old_value ne $value
1329 801 1 2 defined $old_value and $old_value eq $value
1334 1658 243 75 defined $old_value and $value eq $old_value
1379 0 121 1620 $notify_change and $old ne $new
1411 12 0 6 not $silent and $self->has_error
1427 22 18 1858 $ok and defined $value
40 1758 100 $ok and defined $value and $self->has_warped_slaves
1776 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
1474 1722 255 0 $self->{'warp'} and defined $self->{'warp_info'}
1977 0 0 $self->{'warp'} and defined $self->{'warp_info'} and @{$self->{'warp_info'}{'computed_master'};}
1476 1966 10 1 defined $self->compute_obj and not $self->compute_obj->allow_user_override
1490 1938 0 38 defined $self->{'convert_sub'} and defined $value
1494 1973 0 3 $self->{'replace'} and defined $value
1500 19 17 1940 defined $value && length $value
1940 34 2 not defined $value && length $value and $self->mandatory
1566 435 0 0 $rd and &any(sub {
1618 9552 0 0 not defined $self->{'value_type'} and $check eq "yes"
1633 9548 0 4 ref $e and $e->isa("Config::Model::Exception::User")
1682 0 16176 0 $mode and not defined $accept_mode{$mode}
1697 7146 295 570 defined $pref and not $self->{'notified_change_for_default'}
7441 400 170 defined $pref and not $self->{'notified_change_for_default'} and not defined $data
1712 7970 18 23 defined $self->{'_migrate_from'} and not defined $data
1733 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
1744 4 0 5 defined $d and $d ne $self->{'upstream_default'}
1843 8007 0 4 defined $self->{'replace_follow'} and defined $value
1851 2 0 2 defined $rep and $rep ne $value
1861 624 812 6575 $mode =~ /backend|custom|user/u and $check ne "no"
1874 0 0 1 not $silent and $msg
1891 10511 0 71 $self->{'write_as'} and $self->value_type eq "boolean"
1893 25 2 46 defined $v && $v =~ /^\d+$/u

or 2 conditions

line l !l condition
540 4028 6 $self->backup // {}
833 0 4571 $args{'quiet'} || 0
834 1901 2670 $args{'check'} || 'yes'
835 94 4477 $args{'fix'} || 0
836 1717 2854 $args{'mode'} || 'backend'
943 69 0 shift() // ""
953 40 0 shift() // ""
998 1901 2563 $args{'check'} || 'yes'
999 1717 2747 $args{'mode'} || 'backend'
1140 73 21 $self->{'nb_of_fixes'} // 0
1199 3 1 $old // "<undef>"
2 2 $new // "<undef>"
1208 3 1 $old // "<undef>"
2 2 $new // "<undef>"
1247 0 6577 $args{'silent'} || 0
1248 0 6577 $args{'check'} || 'yes'
1272 7212 1360 $self->{'old_warning_hash'} || {}
1276 46 1 $value // "<undef>"
1301 39 1938 $args{'silent'} || 0
1303 1958 19 $args{'value'} // "<undef>"
1355 1875 19 3 $ok || $check eq 'no'
1364 0 1885 shift() // 1
1396 104 1 $value // "<undef>"
1467 1977 0 $args{'check'} || 'yes'
1575 41 0 $data // "<undef>"
1772 58 11 $res // "<undef>"
1811 12 9 $self->fetch(@args) // "<undef>"
1819 5229 2784 $args{'mode'} || 'backend'
1820 12 8001 $args{'silent'} || 0
1873 1 0 $value // "<undef>"

or 3 conditions

line l !l&&r !l&&!r condition
621 0 4033 1 delete $arg_ref->{'value_type'} || $self->value_type
630 67 898 2440 $value_type eq "reference" or $value_type eq "enum"
736 8 0 7 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
800 7 0 44 $help->{'.'} || $help->{'.*'}
802 0 0 25 $k eq "" or $k eq ".*"
857 345 0 2777 $vt =~ /integer/u and $value =~ /^-?\d+$/u or $vt =~ /number/u and $value =~ /^-?\d+(\.\d+)?$/u
3 2 2769 $vt eq "file" or $vt eq "dir"
1 0 1656 $vt =~ /integer/u or $vt =~ /number/u
891 94 14 0 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1000 4464 0 0 $args{'error'} // carp("Missing error parameter")
1086 75 0 0 $w_info->{$label}{'msg'} || $label
1118 82 27 0 $w_info->{$rxp}{'msg'} || "value should ${may_be}match regexp '${rxp}'"
1204 26 5 3 $new // $self->_fetch_std
1205 32 0 2 $old // $self->_fetch_std
1257 20 10 1689 $err_count or $warn_count
1377 239 59 1443 $self->{'data'} // $self->_fetch_std
1378 1723 4 14 $value // $self->_fetch_std
1404 1876 4 21 $ok or $check eq "no"
1427 31 69 0 !defined($old_value) || $value ne $old_value
0 0 100 $self->instance->layered || $self->instance->preset
1458 25 1 213 $$v_ref =~ /^(n|no|false|off)$/iu or length $$v_ref == 0
1485 40 4 1932 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1534 25 38 1838 $self->has_error or $self->has_warning
1562 435 0 0 delete $args{'data'} // delete $args{'value'}
1606 51 4 3429 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1783 353 52 616 $data // $alt
1788 329 0 1485 $alt // $data
1868 7992 0 19 $ok or $check eq "no"
1920 0 18 14 defined $self->{'layered'} || defined $self->{'data'}
1931 0 42 73 defined $self->{'preset'} || defined $self->{'data'}

xor 4 conditions

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