Branch Coverage

blib/lib/Apache/Voodoo/Validate/date.pm
Criterion Covered Total %
branch 24 36 66.6


line true false branch
14 4 1 if (defined $$c{'valid'})
15 4 0 if ($$c{'valid'} =~ /^(past|future)$/) { }
0 0 elsif (ref $$c{'valid'} ne 'CODE') { }
23 2 3 if (defined $$c{'now'}) { }
24 2 0 if (ref $$c{'now'} eq 'CODE') { }
35 0 5 if (defined $$c{'parser'}) { }
36 0 0 if (ref $$c{'parser'} eq 'CODE') { }
56 10 2 if (defined $y and defined $m and defined $d and $y =~ /^\d+$/ and $m =~ /^\d+$/ and $d =~ /^\d+$/) { }
65 8 2 if (defined $$self{'valid'})
66 1 7 if ($$self{'valid'} eq 'past' and $v gt $$self{'now'}()) { }
1 9 elsif ($$self{'valid'} eq 'future' and $v le $$self{'now'}()) { }
106 9 3 if ($date =~ m[^\d?\d/\d?\d/\d{4}$]) { }
2 1 elsif ($date =~ /^\d{4}-\d?\d-\d?\d$/) { }
122 1 10 if (not $m =~ /^\d+$/ or $m < 1 or $m > 12)
127 0 10 if ($m == 2 and $d == 29)
128 0 0 unless ($y % 4 == 0 and $y % 100 != 0 or $y % 400 == 0)
134 0 10 if (not $d =~ /^\d+$/ or $d < 1 or $d > $md{$m})
139 0 10 if (not $y =~ /^\d+$/ or $y < 1000 or $y > 9999)