Branch Coverage

blib/lib/Data/Validate/Domain.pm
Criterion Covered Total %
branch 44 46 95.6


line true false branch
32 14 44 unless $bits
37 39 5 unless ($opt->{'domain_allow_single_label'})
40 9 30 if @{$bits;} < 2
43 1 34 if $opt->{'domain_disable_tld_validation'}
47 13 21 if (exists $opt->{'domain_private_tld'} and ref $opt->{'domain_private_tld'})
50 8 5 if (ref $opt->{'domain_private_tld'} eq 'HASH') { }
51 6 2 if (exists $opt->{'domain_private_tld'}{$lc_tld})
56 3 2 if ($tld =~ /$opt->{'domain_private_tld'}/)
63 7 18 unless tld_exists($tld)
83 2 67 unless defined $value
86 2 65 if $length < 0 or $length > 255
88 6 59 $value =~ s/\.\z// ? :
93 12 99 unless defined $bit
97 3 50 unless @bits
105 1 122 unless defined $value
108 1 121 if $value =~ /\n/
111 0 121 if $value =~ /\./
114 8 113 if ($length == 1) { }
109 4 elsif ($length > 1 and $length <= 63) { }
115 0 8 if ($opt->{'domain_allow_underscore'}) { }
123 9 100 if ($opt->{'domain_allow_underscore'}) { }
139 15 177 if (ref $_[0]) { }
143 118 59 defined $_[1] ? :