Branch Coverage

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

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'})
720100TFif not $@ and $is_cloud
725100TFunless $self->{'allowed_ips'} or $self->{'deny_countries'} or $self->{'allow_countries'}
729100TFif ($self->{'allowed_ips'})
731100TFif $self->{'allowed_ips'}{$addr}
735100TFunless ($self->{'_cidrlist'})
746100TFif $in_cidr
750100TFif ($self->{'deny_countries'} or $self->{'allow_countries'})
753100TFif (ref $_[0] eq 'HASH') { }
100TFelsif (@_ % 2 == 0) { }
761100TFif (my $lingua = $params{'lingua'}) { }
763100TFunless (&blessed($lingua))
770100TFif $@
771100TFif (my $country = $country_val)
775100TFif ($self->{'deny_countries'} and $self->{'deny_countries'}{$WILDCARD})
776100TF$self->{'allow_countries'} && $self->{'allow_countries'}{$country} ? :
782100TF$self->{'deny_countries'} && $self->{'deny_countries'}{$country} ? :
817100TFif (ref $value eq 'ARRAY') { }
845100TFunless my $hostname = _verified_rdns($ip)
849100TFif $hostname =~ /$pattern/
881100TFif ($ip =~ /:/o) { }
884100TFunless $packed = Socket::inet_pton(10, $ip)
888100TFunless $packed = inet_aton($ip)
893100TF$family == 2 ? :
89950TFif ($^O ne 'MSWin32') { }
906100TFif ($hostname)
915100TFif $@ or not $hostname
9180TFunless $hostname = gethostbyaddr($packed, $family)
925100TFgrep({$_ eq $canonical;} @forward_ips) ? :
947100TFif ($family == 2)
959100TFif $err
967100TFunless $e