Branch Coverage

blib/lib/Data/Validate/DNS/TLSA.pm
Criterion Covered Total %
branch 46 54 85.1


line true false branch
46 2 11 if ($opts{'underscore'} and substr($value, 0, 1) ne '_')
52 2 9 unless ($port =~ /^[1-9][0-9]*$/)
56 1 8 if ($port < 0 or $port > 65535)
72 2 13 if ($opts{'underscore'} and substr($value, 0, 1) ne '_')
78 1 12 unless ($proto =~ /^[a-zA-Z]+$/)
82 4 8 if ($opts{'strict'})
84 1 3 unless (&any(sub { $_ eq lc $proto; } , 'tcp', 'udp', 'sctp'))
99 6 0 unless (defined $opts{'underscore'})
105 1 5 if (scalar @labels < 2)
111 3 2 if (is_tlsa_port($port, %opts) and is_tlsa_protocol($proto, %opts))
123 2 514 unless _is_int8($value)
125 256 258 if ($opts{'strict'}) { }
127 4 252 if ($value >= 0 and $value < 3 or $value == 255)
134 258 0 if ($value >= 0 and $value <= 255)
147 0 511 unless _is_int8($value)
149 256 255 if ($opts{'strict'}) { }
151 3 253 if ($value >= 0 and $value < 2 or $value == 255)
158 255 0 if ($value >= 0 and $value <= 255)
171 0 514 unless _is_int8($value)
173 256 258 if ($opts{'strict'}) { }
175 5 251 if ($value >= 0 and $value < 4 or $value == 255)
182 258 0 if ($value >= 0 and $value <= 255)
196 2 4 unless ($value =~ /[0-9a-fA-F]/)
201 0 4 if ($value =~ /[^0-9a-fA-F\s]/)
213 0 1541 if ($val =~ /[^0-9]/)
217 2 1539 if ($val < 0 or $val > 255) { }
226 16 1565 if ref $_[0]