Branch Coverage

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

line%coveragebranch
154100TFif (not defined $class) { }
100TFelsif (&blessed($class)) { }
163100TFif ref $copy{$key} eq "HASH"
257100TFif (ref $_[0] and ref $_[0] ne "HASH")
264100TFif (ref $_[0] eq 'HASH') { }
100TFelsif (@_ % 2 == 0) { }
273100TFif (defined(my $ip = $params{'ip'})) { }
367100TFif (ref $_[0] and ref $_[0] ne "HASH" and ref $_[0] ne "ARRAY")
374100TFif (ref $_[0] eq 'HASH') { }
100TFelsif (@_ % 2 == 0) { }
384100TFif (defined(my $c = $params{'country'})) { }
385100TFif ref $c eq "ARRAY" and not @{$c;}
474100TFif (ref $_[0] and ref $_[0] ne "HASH" and ref $_[0] ne "ARRAY")
481100TFif (ref $_[0] eq 'HASH') { }
100TFelsif (@_ % 2 == 0) { }
491100TFif (defined(my $c = $params{'country'})) { }
492100TFif ref $c eq "ARRAY" and not @{$c;}
698100TFunless (defined $self->{'allowed_ips'} or defined $self->{'deny_countries'} or $self->{'deny_cloud'} or defined $self->{'allow_countries'})
712100TFunless $addr =~ /^$CGI::ACL::RE{'net'}{'IPv4'}$/o or $addr =~ /^$CGI::ACL::RE{'net'}{'IPv6'}$/o
716100TFif ($self->{'deny_cloud'})
72150TFif ($@ =~ /^DNS timeout: /)
724100TFif not $error and $is_cloud
729100TFunless $self->{'allowed_ips'} or $self->{'deny_countries'} or $self->{'allow_countries'}
733100TFif ($self->{'allowed_ips'})
735100TFif $self->{'allowed_ips'}{$addr}
739100TFunless ($self->{'_cidrlist'})
750100TFif $in_cidr
754100TFif ($self->{'deny_countries'} or $self->{'allow_countries'})
757100TFif (ref $_[0] eq 'HASH') { }
100TFelsif (@_ % 2 == 0) { }
765100TFif (my $lingua = $params{'lingua'}) { }
767100TFunless (&blessed($lingua))
774100TFif $@
775100TFif (my $country = $country_val)
779100TFif ($self->{'deny_countries'} and $self->{'deny_countries'}{$WILDCARD})
780100TF$self->{'allow_countries'} && $self->{'allow_countries'}{$country} ? :
786100TF$self->{'deny_countries'} && $self->{'deny_countries'}{$country} ? :
821100TFif (ref $value eq 'ARRAY') { }
849100TFunless my $hostname = _verified_rdns($ip)
853100TFif $hostname =~ /$pattern/
885100TFif ($ip =~ /:/o) { }
888100TFunless $packed = Socket::inet_pton(10, $ip)
892100TFunless $packed = inet_aton($ip)
897100TF$family == 2 ? :
90350TFif ($^O ne 'MSWin32') { }
910100TFif ($hostname)
919100TFif $@ or not $hostname
9220TFunless $hostname = gethostbyaddr($packed, $family)
929100TFgrep({$_ eq $canonical;} @forward_ips) ? :
951100TFif ($family == 2)
963100TFif $err
971100TFunless $e