Branch Coverage

blib/lib/Hash/Type.pm
Criterion Covered Total %
branch 41 54 75.9


line true false branch
129 21 4 if (ref $class) { }
146 2 6 unless my $ix = $_[0][0]{$_[1]}
156 251 0 $ix ? :
1 251 $_[1] eq 'Hash::Type' ? :
194 2 1 if $_ > $max
197 22 2 unless exists $$self{$_}
275 0 11 unless @_
277 10 1 if (@_ == 1)
280 0 18 unless /^\s*(\S.*?)\s*(?::([^:]+))?$/
296 0 21 unless my $ix = $$self{$_[$i]}
298 1 20 if (ref $_[$i + 1] eq 'CODE') { }
306 15 5 if (defined $_[$i + 1])
311 7 13 if (/^(alpha|cmp)\s*$/)
312 9 4 if (/^(num|<=>)\s*$/)
313 2 2 if (/^d(\W+)m(\W+)y\s*$/)
316 1 1 if (/^m(\W+)d(\W+)y\s*$/)
319 1 0 if (/^y(\W+)m(\W+)d\s*$/)
330 0 11 unless my $sub = eval 'sub {' . join(' || ', @cmp) . '}'
339 0 0 unless $date1 or $date2
340 0 55 unless $date1
341 0 55 unless $date2
348 0 55 unless my(@d1) = $date1 =~ /$regex/
349 0 55 unless my(@d2) = $date2 =~ /$regex/
351 40 0 $d1[$y] < 33 ? :
40 15 if $d1[$y] < 100
352 36 7 $d2[$y] < 33 ? :
43 12 if $d2[$y] < 100