Branch Coverage

blib/lib/YAML/PP/Schema.pm
Criterion Covered Total %
branch 105 122 86.0


line true false branch
17 0 770 unless defined $bool
18 0 770 if (keys %args)
26 0 763 if ($b eq '*') { }
595 168 elsif ($b eq 'JSON::PP') { }
0 168 elsif ($b eq 'boolean') { }
168 0 elsif ($b eq 'perl' or $b eq 'perl_experimental') { }
84 1597 7 @{$_[0]{'bool_class'};} ? :
110 457 932 if ($item eq '+') { }
330 602 elsif ($AVAILABLE_SCHEMAS{$item}) { }
10 592 elsif (builtin::blessed($item)) { }
136 592 787 unless ($class)
138 1 591 if ($item =~ /^\:(.*)/) { }
140 0 1 unless ($class =~ /\A[A-Za-z0-9_:]+\z/)
147 0 591 unless ($class =~ /\A[A-Za-z0-9_:]+\z/)
168 21052 768 unless defined $implicit
170 21820 0 if ($tag)
171 681 21139 if (ref $tag eq 'Regexp') { }
181 21073 747 if ($implicit)
185 34554 8339 if ($type eq 'equals') { }
6066 2273 elsif ($type eq 'regex') { }
2273 0 elsif ($type eq 'all') { }
187 34554 0 unless (exists $res->{'equals'}{$match})
219 1394 149 if ($tag and ref $tag eq 'Regexp') { }
149 0 elsif ($tag) { }
238 1530 19696 if (my $flags = $args{'flags'})
243 766 18930 if (my $regex = $args{'regex'})
248 26 18904 if (my $regex = $args{'class_matches'})
253 165 18739 if (my $bool = $args{'bool'} and $] >= "5.036")
259 595 18144 if (my $class_equals = $args{'class_equals'})
266 2 18142 if (my $class_isa = $args{'class_isa'})
271 0 18142 if (my $tied_equals = $args{'tied_equals'})
278 17281 861 if (defined(my $equals = $args{'equals'}))
285 24 837 if (defined(my $scalarref = $args{'scalarref'}))
291 24 813 if (defined(my $refref = $args{'refref'}))
297 24 789 if (defined(my $coderef = $args{'coderef'}))
303 24 765 if (defined(my $glob = $args{'glob'}))
309 765 0 if (my $undef = $args{'undefined'})
322 697 25891 if ($tag) { }
323 7 690 if ($tag eq "!")
327 56 634 if (not $res and my $matches = $resolvers->{'tags'})
330 56 20 if ($tag =~ /$re/)
342 2658 23233 if ($event->{'style'} ne 1)
347 23303 620 if (my $equals = $res->{'equals'})
348 426 22877 if (exists $equals->{$value})
350 82 344 if (ref $res eq "CODE")
356 22864 633 if (my $regex = $res->{'regex'})
360 9875 51829 if (@matches)
365 13595 27 if (my $catch_all = $res->{'all'})
366 13595 0 if (ref $catch_all eq "CODE")
381 35 1195 if ($tag)
382 6 29 if (my $equals = $resolvers->{'tag'}{$tag})
385 6 0 if $on_create
388 29 0 if (my $matches = $resolvers->{'tags'})
392 29 2 if ($tag =~ /$re/)
394 15 14 if $on_create
412 83 1548 if ($tag)
413 24 59 if (my $equals = $resolvers->{'tag'}{$tag})
416 23 1 if $on_create
419 59 0 if (my $matches = $resolvers->{'tags'})
423 59 87 if ($tag =~ /$re/)
425 31 28 if $on_create