Branch Coverage

blib/lib/Data/Sah/Compiler.pm
Criterion Covered Total %
branch 133 194 68.5


line true false branch
40 0 0 $opts->{'zeropad'} && !($opts->{'skip_empty'} && !defined($2)) ? :
0 0 ++$i && $opts->{'skip_empty'} && !defined($2) ? :
89 0 0 defined $crec->{'expr'} ? :
90 0 0 if (defined $expr) { }
93 0 0 unless /^\w+$/
96 0 0 unless $ctbl->{$_}
148 1026 108 if $res
155 0 108 if $res
160 108 0 if $res
165 0 0 if $res
181 31 10465 if ($@)
184 16 15 if $_ eq "ignore"
185 1 14 if $_ eq "warn"
205 26 15160 if $th_map->{$name}
207 15160 0 if ($args{'load'} // 1)
209 0 15160 unless $name =~ /$Data::Sah::type_re/
214 0 15160 unless (eval "require $module; 1")
215 0 0 $@ ? :
232 0 0 if $fsh_table->{$name}
234 0 0 if ($args{'load'} // 1)
236 0 0 unless $name =~ /$Data::Sah::funcset_re/
240 0 0 unless (eval "require $module; 1")
241 0 0 $@ ? :
262 655 9475 if (my $ocd = $args{'outer_cd'}) { }
291 5054 4746 if $args->{'_args_checked'}++
294 0 4746 unless $args->{'data_name'} =~ /\A[A-Za-z_]\w*\z/
327 2 10639 if (grep {$_ eq $clause;} @{$$cd{"args"}{"skip_clause"};})
335 35 10604 unless ($th->can($meth))
337 25 10 if $_ eq "ignore"
338 1 9 if ($_ eq "warn")
347 10604 26 if ($th->can($mmeth)) { }
354 0 10630 if $$clset{"$clause.is_expr"} and not $meta->{'allow_expr'}
359 0 458 if $$clset{"$clause.$a.is_expr"} and not $av->{'allow_expr'}
373 8 10622 if $ie
374 26 10596 unless my $coerce_type = $meta->{'schema'}[0]
376 2719 7877 if ($coerce_type eq '_same') { }
122 7755 elsif ($coerce_type eq '_same_elem') { }
1386 6369 elsif ($clause eq 'between' or $clause eq 'xbetween') { }
386 52 10544 unless ($coercer)
396 2966 7630 if ($op and $op eq 'or' || $op eq 'and') { }
398 1152 3618 if ($value_is_array) { }
402 0 2304 if ($cerr)
408 0 3618 if ($cerr)
414 660 6970 if ($value_is_array) { }
419 0 1248 if ($cerr)
425 0 6970 if ($cerr)
435 8 10622 $ie ? :
441 10630 0 if ($self->can("before_clause"))
444 3051 7579 if ($th->can("before_clause"))
448 1025 9605 if ($th->can($tmpnam))
453 4349 6281 if (defined $op and not $ie)
454 3686 663 if ($op =~ /\A(and|or|none)\z/) { }
663 0 elsif ($op eq 'not') { }
463 0 10630 if $is_multi and ref $cv ne "ARRAY"
466 26 10604 if (not $th->can($meth)) { }
8305 2299 elsif ($cd->{'CLAUSE_DO_MULTI'} or not $is_multi) { }
469 1387 6918 if $is_multi
477 1843 1843 if $i
484 56 10541 if ($th->can($tmpnam))
487 0 10597 if ($th->can("after_clause"))
490 10597 0 if ($self->can("after_clause"))
517 0 0 if (not $cd->{'args'}{'allow_expr'} and /\.is_expr\z/ and $clset->{$_})
521 2 9614 if $clset->{'x.perl.coerce_to'}
525 15069 114 if not /\A_|\._|\Ax\./
529 4968 4594 $cd->{'outer_cd'} ? :
540 1092 9390 if $cl->[1] =~ /\A(req|forbidden)\z/
541 436 8954 if $cl->[2]{'subschema'}
543 8803 587 if ($cl->[2]{'tags'} and grep {$_ eq "constraint";} @{$$cl[2]{"tags"};})
548 371 10129 if ($which) { }
551 0 371 if ($self->can("before_clause_sets"))
554 0 371 if ($th->can("before_clause_sets"))
558 10129 0 if ($self->can("before_handle_type"))
564 5056 5070 if ($self->can("before_all_clauses"))
567 521 9605 if ($th->can("before_all_clauses"))
578 26 9540 if (keys %$uclset)
582 19 7 if $_ eq "ignore"
583 1 6 if ($_ eq "warn")
589 366 10092 if ($which) { }
592 0 366 if ($th->can("after_clause_sets"))
595 174 192 if ($self->can("after_clause_sets"))
599 517 9575 if ($th->can("after_all_clauses"))
602 10092 0 if ($self->can("after_all_clauses"))
617 10130 0 if ($self->can("before_compile"))
622 0 10130 unless my $schema0 = $args{'schema'}
624 4889 5241 if ($args{'schema_is_normalized'}) { }
634 5060 5070 if ($self->can("before_resolve"))
636 0 5060 if ($res // 0) == 99
650 0 10130 if ($nschema->[0] ne $tn)
653 0 10130 if ($args{'cache'} and $res->{'base'} and $res->{'base'} ne $res->{'type'}) { }
663 5067 5025 if ($self->can("after_compile"))
667 0 10092 if ($args{'log_result'})
674 0 0 !ref($cd->{'result'}) && ($ENV{'LINENUM'} // 1) ? :
695 0 0 $note ? :
705 468 16894 if ($_->{'name'} eq $name and $_->{'phase'} eq $extra_keys->{'phase'})
710 468 23745 if $found and not $allow_duplicate
720 4858 2795 if ($extra_keys) { }
731 16560 0 if ($extra_keys) { }