Branch Coverage

File:blib/lib/CGI/ACL.pm
Coverage:73.2%

line%coveragebranch
366100TFif (not defined $class) { }
100TFelsif (&blessed($class)) { }
375100TFif ref $copy{$key} eq "HASH"
499100TFif ($ref and $ref ne "HASH")
505100TF@_ ? :
506100TFunless (defined $ip)
524100TFunless (defined $base and $base =~ /\A$CGI::ACL::RE{'net'}{'IPv4'}\z/ou || $base =~ /\A$CGI::ACL::RE{'net'}{'IPv6'}\z/ou)
532100TFlength $ip > 60 ? :
629100TFif ($ref and $ref ne "HASH" and $ref ne "ARRAY")
635100TF@_ ? :
636100TFunless (defined $c)
642100TFif ref $c eq "ARRAY" and not @{$c;}
731100TFif ($ref and $ref ne "HASH" and $ref ne "ARRAY")
737100TF@_ ? :
738100TFunless (defined $c)
744100TFif ref $c eq "ARRAY" and not @{$c;}
1076100TFunless (defined $self->{'allowed_ips'} or defined $self->{'deny_countries'} or $self->{'deny_cloud'})
1091100TFunless $raw =~ /\A$CGI::ACL::RE{'net'}{'IPv4'}\z/ou or $raw =~ /\A$CGI::ACL::RE{'net'}{'IPv6'}\z/ou
109750TFunless defined $addr
1100100TFif ($self->{'deny_cloud'})
1106100TFif ($cached and $cached->{'expires'} > time) { }
1116100TFunless ($dns_error)
1123100TFif not $dns_error and $is_cloud
1134100TFunless $self->{'allowed_ips'} or $self->{'deny_countries'}
1138100TFif ($self->{'allowed_ips'})
1140100TFif $self->{'allowed_ips'}{$addr}
1144100TFunless ($self->{'_cidrlist'})
1155100TFif $in_cidr
1166100TFif ($self->{'deny_countries'})
1169100TF@_ ? :
1171100TFunless ($lingua)
1178100TFunless (&blessed($lingua))
1186100TFif ($@)
1187100TFunless my $country = $country_val
1192100TFif ($self->{'deny_countries'}{$WILDCARD})
1193100TF$self->{'allow_countries'} && $self->{'allow_countries'}{$country} ? :
1200100TF$self->{'deny_countries'}{$country} ? :
12270TFif (ref $value eq 'ARRAY') { }
12570TFif $ip =~ /$PRIVATE_IP_RE/u
12600TFunless my $hostname = _verified_rdns($ip)
12650TFif length $hostname > 253
12690TFif $hostname =~ /$pattern/u
13010TFif ($ip =~ /:/u) { }
13040TFunless $packed = Socket::inet_pton(10, $ip)
13080TFunless $packed = inet_aton($ip)
13130TF$family == 2 ? :
13190TFif ($^O ne 'MSWin32') { }
13260TFif ($hostname)
13360TFif $@ or not $hostname
13390TFunless $hostname = gethostbyaddr($packed, $family)
13460TFgrep({$_ eq $canonical;} @forward_ips) ? :
1375100TFif ($family == 2)
137750TFif @addrs
1379100TF$packed ? :
1387100TFif $err
1395100TFunless $e