Branch Coverage

blib/lib/Data/Sah/Compiler/Prog.pm
Criterion Covered Total %
branch 185 242 76.4


line true false branch
41 4725 335 unless ($hc)
46 330 4730 if (my $ocd = $cd->{'outer_cd'}) { }
53 209 121 if $ocd->{'use_dpath'}
68 5054 4730 if $args->{'_args_checked_Prog'}++
73 0 4730 if ($ct ne "validator")
79 0 4730 if $_ eq "bool"
80 0 4730 if $_ eq "bool+val"
81 0 4730 if $_ eq "str"
82 0 4730 if $_ eq "str+val"
83 0 4730 if $_ eq "full"
86 0 4730 unless ($rt =~ /\A(bool_valid\+val|bool_valid|str_errmsg\+val|str_errmsg|hash_details)\z/)
103 0 17105 unless $cd->{'args'}{'comment'}
109 17105 0 if ($style eq 'shell') { }
0 0 elsif ($style eq 'shell2') { }
0 0 elsif ($style eq 'cpp') { }
0 0 elsif ($style eq 'c') { }
0 0 elsif ($style eq 'ini') { }
127 30047 25450 if ($expr =~ /\A(\s*)(\(.+\)\s*)\z/so) { }
128 23442 6605 unless $force
139 8437 5042 if exists $cd->{'vars'}{$name}
254 0 4724 if ($cache)
260 2943 1748 unless ($rt =~ /\Abool/)
262 1473 1470 $rt =~ /\Astr/ ? :
317 4651 40 if ($needs_expr_block)
321 0 4691 if ($log_result and log_is_trace())
323 0 0 $ENV{'LINENUM'} // 1 ? :
363 133 18518 if (defined $err_expr) { }
364 62 71 if $cd->{'use_dpath'}
365 62 71 if $cd->{'use_dpath'}
367 6037 12481 unless (defined $err_msg)
368 6037 12481 unless (defined $err_msg)
378 282 8236 unless @msgpath
382 5755 2481 if ($ccls)
387 0 5755 if $cd->{'args'}{'debug'}
391 282 5755 if (not $err_msg) { }
397 11591 6927 if ($err_msg)
398 4033 7558 if $cd->{'use_dpath'}
400 4033 7558 if $cd->{'use_dpath'}
407 5844 12807 if ($rt eq 'hash_details') { }
5869 6938 elsif ($rt =~ /\Astr/) { }
408 5844 0 if $cd->{'use_dpath'}
409 18 5826 $el eq 'warn' ? :
410 3710 2134 if $err_expr
412 5851 18 if ($el ne "warn")
413 3703 2148 if $err_expr
438 12623 1199 if ($op eq 'and') { }
607 592 elsif ($op eq 'or') { }
288 304 elsif ($op eq 'none') { }
304 0 elsif ($op eq 'not') { }
452 54 13768 unless @$ccls
468 0 22751 if $ccl->{'assert'}
472 17105 5646 if ($ccl->{'_debug_ccl_note'})
473 0 17105 if ($cd->{'args'}{'debug_log'} // $cd->{'args'}{'debug'}) { }
483 880 21871 $which == 1 ? :
486 1214 21537 if ($which >= 2) { }
488 0 1214 if ($ccl->{'err_level'} eq 'warn') { }
0 1214 elsif ($ccl->{'err_level'} eq 'fatal') { }
497 0 1214 if $dmax_ok
499 0 1214 if $dmax_nok
501 607 607 if ($which == 3)
502 607 0 if $dmin_ok
504 0 607 if $dmin_nok
508 404 203 unless ($rt =~ /\Abool/)
511 202 202 if ($rt eq 'hash_details') { }
521 607 607 if @chk
528 108 14713 $ccl->{'err_level'} eq 'warn' ? :
6716 14821 $ccl->{'err_level'} eq 'fatal' ? :
529 36 21501 if ($rt =~ /\Abool/ and $ret) { }
14896 6605 elsif ($rt =~ /\Abool/ or not $ec) { }
542 86 7788 if $cd->{'use_dpath'} and $ccl->{'subdata'}
548 304 13464 if ($op eq 'not') { }
12569 895 elsif ($op eq 'and') { }
288 607 elsif ($op eq 'none') { }
555 607 607 $_ == @$ccls - 1 ? :
560 0 607 $self->block_uses_sub ? :
581 5060 0 if ($cd->{'args'}{'data_term_is_lvalue'}) { }
588 0 0 unless $cd->{'compiler_name'} eq "perl"
598 4729 330 unless ($cd->{'is_inner'})
635 4556 54 unless exists $clset->{'ok'}
637 0 54 if ($op and $op ne "not")
640 27 27 if ($op eq 'not') { }
672 5055 1 unless @$rules
682 0 1 if ($rule->{'modules'})
685 0 0 unless ref $modspec eq "HASH"
700 90 4520 if (defined $def)
702 0 90 $defie ? :
717 1 5055 if (defined $default_value_expr)
738 471 4139 if ($req and not $reqie) { }
0 4139 elsif ($reqie) { }
770 27 4583 if ($fbd and not $fbdie) { }
0 4583 elsif ($fbdie) { }
794 4558 27 unless ($has_req or $has_fbd)
804 0 5056 unless $cd->{'args'}{'coerce'}
823 3836 1220 unless @$rules
825 60 1160 if grep {$_->{'meta'}{'might_fail'};} @$rules
836 156 1236 if ($rule->{'modules'})
839 156 0 unless ref $modspec eq "HASH"
844 1220 172 if ($i == $#{$rules;}) { }
845 60 1160 if ($coerce_might_fail) { }
855 164 1228 if ($coerce_might_fail and not $rule->{'meta'}{'might_fail'}) { }
869 60 1160 $cd->{'coerce_to'} ? :
880 6 4604 if defined $clset->{'prefilters'}
882 5050 6 unless @filter_names
899 0 7 if ($rule->{'modules'})
902 0 0 unless ref $modspec eq "HASH"
909 3 4 if ($rule->{'meta'}{'might_fail'}) { }
917 0 3 if ($rt_is_hash) { }
0 3 elsif ($rt_is_str) { }
958 0 5056 if (defined $cd->{'base_schema'}) { }
962 0 5056 unless defined $cd->{'_ccl_check_type'}
967 1220 3836 if ($coerce_expr)
969 60 1160 if ($coerce_might_fail) { }
972 0 60 if ($rt_is_hash) { }
1 59 elsif ($rt_is_str) { }
1021 6 5050 if (defined $prefilters_expr)
1034 0 5056 if (defined $cd->{'base_schema'}) { }
1074 0 4 if $cd->{'cl_is_expr'} and $cd->{'cl_op'}
1076 0 5306 if ($cd->{'args'}{'debug'}) { }
1106 0 5276 if ($cd->{'args'}{'debug'})
1111 3957 1319 if (@{$cd->{'ccls'};})
1135 4554 471 if (delete $cd->{'_skip_undef'})