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
229 3381 593 0 defined $arg_ref->{'default'} and defined $arg_ref->{'upstream_default'}
292 2 0 43 defined $path and not ref $path
422 2082 94 6 defined $lv and not defined $self->{'choice_hash'}{$lv}
436 2 27 0 $vt ne "uniline" and $vt ne "string"
29 0 0 $vt ne "uniline" and $vt ne "string" and $vt ne "enum"
465 13 13 0 $vt ne "uniline" and $vt ne "string"
26 0 0 $vt ne "uniline" and $vt ne "string" and $vt ne "enum"
472 26 0 0 not ref $regexp_info and $what ne "warn"
507 0 1 0 $vt ne "uniline" and $vt ne "string"
551 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'}
592 3949 23 0 defined $self->{'write_as'} and $self->{'value_type'} ne "boolean"
826 4 5 0 $var eq "reference" and defined $self->{'referred_to_path'}
858 2721 2 345 $vt =~ /integer/u and $value =~ /^-?\d+$/u
2721 0 2 $vt =~ /number/u and $value =~ /^-?\d+(\.\d+)?$/u
2719 1 1 $vt =~ /integer/u and $value =~ /^-?\d+(\.\d+)?$/u
870 220 111 16 defined $self->{'max'} and $value > $self->{'max'}
872 265 82 0 defined $self->{'min'} and $value < $self->{'min'}
896 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}
903 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}
936 4453 15 45 defined $self->{'match_regexp'} and defined $value
971 1451 3058 4 defined $value and $self->{'warn'}
973 4505 3 5 defined $self->{'validation_parser'} and defined $value
1004 4127 2 277 $self->{'mandatory'} and $check eq "yes"
4129 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'}
1055 0 37 60 defined $fix and not $apply_fix
1056 0 60 37 defined $fix and $apply_fix
1153 93 1 0 $self->{'nb_of_fixes'} and $old > $new
1223 3 28 2 defined $new_v and $self->has_warped_slaves
1276 8435 2 47 $self->has_warning and not $nowarning
8437 0 47 $self->has_warning and not $nowarning and not $silent
1327 801 2 1 defined $old_value and $old_value ne $value
1330 801 1 2 defined $old_value and $old_value eq $value
1335 1600 246 70 defined $old_value and $value eq $old_value
1380 0 120 1567 $notify_change and $old ne $new
1412 12 0 5 not $silent and $self->has_error
1428 21 17 1805 $ok and defined $value
38 1705 100 $ok and defined $value and $self->has_warped_slaves
1722 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
1475 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'};}
1477 1906 10 1 defined $self->compute_obj and not $self->compute_obj->allow_user_override
1491 1878 0 38 defined $self->{'convert_sub'} and defined $value
1495 1913 0 3 $self->{'replace'} and defined $value
1501 18 17 1881 defined $value && length $value
1881 33 2 not defined $value && length $value and $self->mandatory
1567 435 0 0 $rd and &any(sub {
1619 9460 0 0 not defined $self->{'value_type'} and $check eq "yes"
1634 9456 0 4 ref $e and $e->isa("Config::Model::Exception::User")
1683 0 16108 0 $mode and not defined $accept_mode{$mode}
1698 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
1713 7936 18 23 defined $self->{'_migrate_from'} and not defined $data
1734 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
1745 4 0 5 defined $d and $d ne $self->{'upstream_default'}
1846 7973 0 4 defined $self->{'replace_follow'} and defined $value
1854 2 0 2 defined $rep and $rep ne $value
1864 624 811 6542 $mode =~ /backend|custom|user/u and $check ne "no"
1877 0 0 1 not $silent and $msg
1894 10370 0 71 $self->{'write_as'} and $self->value_type eq "boolean"
1896 25 2 46 defined $v && $v =~ /^\d+$/u

or 2 conditions

line l !l condition
541 3969 6 $self->backup // {}
834 0 4513 $args{'quiet'} || 0
835 1846 2667 $args{'check'} || 'yes'
836 94 4419 $args{'fix'} || 0
837 1714 2799 $args{'mode'} || 'backend'
944 69 0 shift() // ""
954 40 0 shift() // ""
999 1846 2560 $args{'check'} || 'yes'
1000 1714 2692 $args{'mode'} || 'backend'
1141 73 21 $self->{'nb_of_fixes'} // 0
1200 3 1 $old // "<undef>"
2 2 $new // "<undef>"
1209 3 1 $old // "<undef>"
2 2 $new // "<undef>"
1248 0 6544 $args{'silent'} || 0
1249 0 6544 $args{'check'} || 'yes'
1273 7127 1357 $self->{'old_warning_hash'} || {}
1277 46 1 $value // "<undef>"
1302 39 1878 $args{'silent'} || 0
1304 1899 18 $args{'value'} // "<undef>"
1356 1821 18 3 $ok || $check eq 'no'
1365 0 1831 shift() // 1
1397 104 1 $value // "<undef>"
1468 1917 0 $args{'check'} || 'yes'
1576 41 0 $data // "<undef>"
1775 58 11 $res // "<undef>"
1814 9 9 $self->fetch(@args) // "<undef>"
1822 5229 2750 $args{'mode'} || 'backend'
1823 12 7967 $args{'silent'} || 0
1876 1 0 $value // "<undef>"

or 3 conditions

line l !l&&r !l&&!r condition
622 0 3974 1 delete $arg_ref->{'value_type'} || $self->value_type
631 67 898 2381 $value_type eq "reference" or $value_type eq "enum"
737 8 0 7 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
801 7 0 44 $help->{'.'} || $help->{'.*'}
803 0 0 25 $k eq "" or $k eq ".*"
858 345 0 2723 $vt =~ /integer/u and $value =~ /^-?\d+$/u or $vt =~ /number/u and $value =~ /^-?\d+(\.\d+)?$/u
3 2 2715 $vt eq "file" or $vt eq "dir"
1 0 1598 $vt =~ /integer/u or $vt =~ /number/u
892 94 14 0 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1001 4406 0 0 $args{'error'} // carp("Missing error parameter")
1087 75 0 0 $w_info->{$label}{'msg'} || $label
1119 82 27 0 $w_info->{$rxp}{'msg'} || "value should ${may_be}match regexp '${rxp}'"
1205 26 5 3 $new // $self->_fetch_std
1206 32 0 2 $old // $self->_fetch_std
1258 20 10 1686 $err_count or $warn_count
1378 242 59 1386 $self->{'data'} // $self->_fetch_std
1379 1670 4 13 $value // $self->_fetch_std
1405 1822 4 20 $ok or $check eq "no"
1428 31 69 0 !defined($old_value) || $value ne $old_value
0 0 100 $self->instance->layered || $self->instance->preset
1459 25 1 212 $$v_ref =~ /^(n|no|false|off)$/iu or length $$v_ref == 0
1486 40 4 1872 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1535 24 38 1784 $self->has_error or $self->has_warning
1563 435 0 0 delete $args{'data'} // delete $args{'value'}
1607 51 4 3370 defined $self->{'refer_to'} or defined $self->{'computed_refer_to'}
1785 353 52 614 $data // $alt
1790 329 0 1482 $alt // $data
1871 7958 0 19 $ok or $check eq "no"
1923 0 18 14 defined $self->{'layered'} || defined $self->{'data'}
1934 0 42 73 defined $self->{'preset'} || defined $self->{'data'}

xor 4 conditions

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