Branch Coverage

blib/lib/IO/Socket/SSL/PublicSuffix.pm
Criterion Covered Total %
branch 58 92 63.0


line true false branch
123 81 2 if (eval { do { require URI::_idna; defined &URI::_idna::decode if defined &URI::_idna::encode } }) { }
0 2 elsif (eval { do { require Net::IDN::Encode } }) { }
0 2 elsif (eval { do { require Net::LibIDN; require Encode } }) { }
125 81 0 if defined &URI::_idna::encode
155 56 3 unless defined $min_suffix
156 0 59 if %args
172 3 10 unless defined $min_suffix
173 0 13 if %args
176 13 0 if (ref $file) { }
0 0 elsif (not open($fh, '<', $file)) { }
186 32680 73676 if $line eq ""
188 0 73676 unless $line =~ /\A[\x00-\x7f]*\Z/
194 80 73596 $not ? :
206 59 227 if (ref $name) { }
210 3 224 unless defined $name
211 2 222 if (not $name =~ /\A[\x00-\x7f]*\Z/) { }
221 6 277 unless @$name
228 322 278 if (my $px = $$p{$$name[$#$name - $i]})
231 248 74 if (my $end = $px->{'\\0'})
232 234 14 $end > 0 ? :
235 80 520 if (my $px = $p->{'*'})
238 80 0 if (my $end = $px->{'\\0'})
239 80 0 $end > 0 ? :
245 389 239 if (@$choices)
247 41 348 if @$choices
252 211 28 unless @stack
261 14 263 if %xcept
266 53 224 unless defined $len
267 95 182 if $add
269 202 75 if ($len < @$name) { }
75 0 elsif ($len > 0) { }
278 221 56 if ($want ne "a")
281 2 219 if ($want eq "u")
287 39 238 wantarray ? :
294 10 0 unless (defined $data)
296 0 10 unless $data =~ s[^// ===END ICANN DOMAINS.*][]ms
306 0 0 unless -w $dst
307 0 0 unless open my $fh, "<", $dst
312 0 0 if /<<\'END_BUILTIN_DATA\'/
316 0 0 unless /\AEND_BUILTIN_DATA\r?\n/
324 0 0 unless my $resp = "LWP::UserAgent"->new->get($url)
326 0 0 unless $resp->is_success
331 0 0 if ($line =~ /\S/ and not $line =~ m[\A\s*//]) { }
334 0 0 if $line eq ""
335 0 0 unless ($line =~ /\A[\x00-\x7f]+\Z/)
344 0 0 unless open $fh, ">:utf8", $dst