Branch Coverage

blib/lib/Value/Object/ValidationUtils.pm
Criterion Covered Total %
branch 54 60 90.0


line true false branch
13 3 90 unless defined $poss_domain
14 5 85 if not length $poss_domain or length $poss_domain > 255
17 2 83 unless @labels
20 81 2 length $labels[0] ? :
24 14 380 if defined $why
40 3 432 unless defined $poss_label
41 13 419 if not length $poss_label or length $poss_label > 63
43 13 406 unless $poss_label =~ /\A[a-zA-Z0-9] # No hyphens at front (?:[-a-zA-Z0-9]* # hyphens allowed in the middle [a-zA-Z0-9])? # No hyphens at the end \z/x
63 2 218 unless defined $poss_part
64 4 214 if not length $poss_part or length $poss_part > 64
66 32 182 unless $poss_part =~ /\A"(?:\\.|[!#-[\]-~])+"\z/ or $poss_part =~ m[\A[a-zA-Z0-9!#\$\%&'*+\-/=?^_`{|}~]+ # any 'atext' characters (?:\. # separated by dots [a-zA-Z0-9!#\$\%&'*+\-/=?^_`{|}~]+ # any 'atext' characters )* \z]x
89 2 196 unless defined $poss_part
90 4 192 if not length $poss_part or length $poss_part > 64
92 36 156 unless $poss_part =~ m[\A[a-zA-Z0-9!#\$\%&'*+\-/=?^_`{|}~]+ # any 'atext' characters (?:\. # separated by dots [a-zA-Z0-9!#\$\%&'*+\-/=?^_`{|}~]+ # any 'atext' characters )* \z]x
111 1 48 unless defined $value
112 1 47 unless length $value
113 10 37 unless $value =~ /\A([0-9]{4})-([0-9]{2})-([0-9]{2})\z/
116 3 34 unless 1 <= $month and $month <= 12
118 3 31 unless 1 <= $day and $day <= 31
121 3 28 if $day == 31 and grep {$month == $_;} 2, 4, 6, 9, 11
122 6 22 if $day == 30 or $day == 29 and not _is_leap_year($year)
136 0 21 unless defined $value
137 1 20 unless length $value
138 14 6 unless $value =~ /\A([0-9]{2}):([0-9]{2})(?::([0-9]{2}(?:\.[0-9]+)?))(Z|[-+][0-9]{2}:[0-9]{2})\z/
141 0 0 unless $hour <= 23 or $hour == 24 and $minute == 0
143 0 6 unless $minute <= 59
145 0 6 unless $second <= 60
147 1 5 if $tzi eq 'Z'
149 2 0 unless $tzh <= 23 or $tzh == 24 and $tzm == 0
151 2 1 unless $tzm <= 59