Branch Coverage

blib/lib/Validator/Custom/Constraint.pm
Criterion Covered Total %
branch 126 136 92.6


line true false branch
14 2 4 defined $_[0] && $_[0] =~ /^[\x21-\x7E]+$/ ? :
21 2 13 unless defined $start and $start =~ /$NUM_RE/ and defined $end and $end =~ /$NUM_RE/
24 3 10 unless defined $value and $value =~ /$NUM_RE/
25 8 2 $value >= $start && $value <= $end ? :
28 17 1 if defined $_[0]
36 14 6 if (ref $value eq 'ARRAY') { }
41 2 11 unless defined $year and defined $mon and defined $mday
44 2 5 unless ($year =~ /^[0-9]{1,4}$/ and $mon =~ /^[0-9]{1,2}$/ and $mday =~ /^[0-9]{1,2}$/)
58 1 4 $@ ? :
61 1 5 unless defined $value
64 2 4 unless $value =~ /^[0-9]{8}$/
71 1 3 $@ ? :
81 20 6 if (ref $value eq 'ARRAY') { }
89 2 14 unless defined $year and defined $mon and defined $mday and defined $hour and defined $min and defined $sec
93 2 5 unless ($year =~ /^[0-9]{1,4}$/ and $mon =~ /^[0-9]{1,2}$/ and $mday =~ /^[0-9]{1,2}$/ and $hour =~ /^[0-9]{1,2}$/ and $min =~ /^[0-9]{1,2}$/ and $sec =~ /^[0-9]{1,2}$/)
108 1 4 $@ ? :
111 1 5 unless defined $value
114 2 4 unless $value =~ /^[0-9]{14}$/
121 1 3 $@ ? :
130 13 3 if (defined $digits_tmp) { }
131 9 4 if (ref $digits_tmp eq 'ARRAY') { }
144 4 12 if (defined $digits->[0] and defined $digits->[1]) { }
7 5 elsif (defined $digits->[0]) { }
2 3 elsif (defined $digits->[1]) { }
158 6 10 if (defined $value and $value =~ /$re/) { }
169 4 6 unless defined $values->[0] and defined $values->[1]
170 5 1 $values->[0] eq $values->[1] ? :
176 2 7 unless defined $target and $target =~ /$NUM_RE/
179 3 4 unless defined $value and $value =~ /$NUM_RE/
180 3 1 $value == $target ? :
186 2 11 unless defined $target and $target =~ /$NUM_RE/
189 3 8 unless defined $value and $value =~ /$NUM_RE/
190 4 4 $value > $target ? :
194 2 3 defined $_[0] && $_[0] =~ m[^s?https?://[-_.!~*'()a-zA-Z0-9;/?:\@&=+\$,%#]+$] ? :
197 21 34 defined $_[0] && $_[0] =~ /^\-?[0-9]+$/ ? :
201 2 4 unless defined $value
203 2 4 $match > 0 ? :
209 1 20 unless defined $value
213 6 14 if (ref $args eq 'ARRAY') { }
12 2 elsif (ref $args eq 'HASH') { }
220 1 19 unless defined $min or defined $max
225 11 8 if (defined $min and defined $max) { }
4 4 elsif (defined $min) { }
4 0 elsif (defined $max) { }
241 2 9 unless defined $target and $target =~ /$NUM_RE/
244 3 6 unless defined $value and $value =~ /$NUM_RE/
245 4 2 $value < $target ? :
251 1 2 unless ref $values eq 'ARRAY'
256 5 1 if defined $_[0]
257 29 1 if defined $_[0]
259 3 5 defined $_[0] && !($_[0] =~ /^[ \t\n\r\f]*$/) ? :
261 4 6 defined $_[0] && $_[0] =~ /^[0-9]+$/ ? :
265 3 4 defined $value && $value =~ /$regex/ ? :
271 9 1 ref $values ? :
273 8 2 scalar @$selected >= $num ? :
279 1 1 unless ref $values eq 'ARRAY'
284 5 3 defined $_[0] && $_[0] =~ /^[ \t\n\r\f]*$/ ? :
289 4 4 unless ref $value eq 'ARRAY'
297 2 2 unless ref $values eq 'ARRAY'
298 8 0 if defined $_
305 3 0 if defined $value
311 2 0 if (defined $value)
320 2 0 if defined $value
326 2 0 if defined $value
332 1 0 if defined $value
338 1 0 if (defined $value)
347 1 0 if defined $value
353 1 0 if defined $value