Branch Coverage

blib/lib/Apache/Voodoo/Validate/varchar.pm
Criterion Covered Total %
branch 27 30 90.0


line true false branch
16 10 1 if (defined $$c{'length'}) { }
17 10 0 if ($$c{'length'} =~ /^\d+$/) { }
28 5 6 if (defined $$c{'valid'})
29 4 1 if ($$c{'valid'} =~ /^(url|email)$/) { }
0 1 elsif (ref $$c{'valid'} ne 'CODE') { }
37 2 9 if (defined $$c{'regexp'})
48 9 30 if ($$self{'length'} > 0 and length $v > $$self{'length'}) { }
6 24 elsif (defined $$self{'valid'} and $$self{'valid'} eq 'email') { }
5 19 elsif (defined $$self{'valid'} and $$self{'valid'} eq 'url') { }
5 14 elsif (defined $$self{'regexp'}) { }
62 0 6 if ($@) { }
2 4 elsif (not defined $addr) { }
71 2 3 if (length $v and _valid_url($v) == 0)
77 2 3 unless ($v =~ /$re/)
140 3 2 $test =~ /^$httpurl$/o ? :