Branch Coverage

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


line true false branch
20 23 6 if (ref $obj_or_class) { }
41 2 6 unless my $index = $_[0][0]{$_[1]}
51 1 0 $_[1] eq 'Hash::Type' ? :
303 1 $index ? :
74 2 28 if exists $self->{$name}
101 5 1 $index <= $max ? :
113 0 11 unless @_
115 10 1 if (@_ == 1)
119 0 18 unless /^\s*(\S.*?)\s*(?::([^:]+))?$/
137 0 21 unless my $ix = $$self{$_[$i]}
139 1 20 if (ref $_[$i + 1] eq 'CODE') { }
147 15 5 if (defined $_[$i + 1])
152 7 13 if (/^(alpha|cmp)\s*$/)
153 9 4 if (/^(num|<=>)\s*$/)
154 2 2 if (/^d(\W+)m(\W+)y\s*$/)
157 1 1 if (/^m(\W+)d(\W+)y\s*$/)
160 1 0 if (/^y(\W+)m(\W+)d\s*$/)
171 0 11 unless my $sub = eval 'sub {' . join(' || ', @cmp) . '}'
180 0 0 unless $date1 or $date2
181 0 55 unless $date1
182 0 55 unless $date2
189 0 55 unless my(@d1) = $date1 =~ /$regex/
190 0 55 unless my(@d2) = $date2 =~ /$regex/
192 40 0 $d1[$y] < 33 ? :
40 15 if $d1[$y] < 100
193 36 7 $d2[$y] < 33 ? :
43 12 if $d2[$y] < 100