Branch Coverage

blib/lib/CGI/ACL.pm
Criterion Covered Total %
branch 51 54 94.4


line true false branch
57 0 8 unless defined $class
77 1 6 if (ref $_[0] eq 'HASH') { }
1 5 elsif (ref $_[0]) { }
2 3 elsif (@_ % 2 == 0) { }
87 5 2 if (defined $params{'ip'}) { }
113 1 6 if (ref $_[0] eq 'HASH') { }
1 5 elsif (ref $_[0]) { }
2 3 elsif (@_ % 2 == 0) { }
124 5 1 if (defined(my $c = $params{'country'})) { }
126 2 3 if (ref $c eq 'ARRAY') { }
155 1 3 if (ref $_[0] eq 'HASH') { }
1 2 elsif (ref $_[0]) { }
1 1 elsif (@_ % 2 == 0) { }
165 2 2 if (defined(my $c = $params{'country'})) { }
167 1 1 if (ref $c eq 'ARRAY') { }
208 1 10 unless (defined $self->{'_allowed_ips'} or defined $self->{'_deny_countries'})
212 18 0 $ENV{'REMOTE_ADDR'} ? :
214 8 10 if ($self->{'_allowed_ips'})
215 1 7 if ($self->{'_allowed_ips'}{$addr})
223 2 5 if (Net::CIDR::cidrlookup($addr, @cidrlist))
228 13 2 if ($self->{'_deny_countries'} or $self->{'_allow_countries'})
231 1 12 if (ref $_[0] eq 'HASH') { }
9 3 elsif (@_ % 2 == 0) { }
239 12 1 if (my $lingua = $params{'lingua'}) { }
240 0 12 if ($self->{'_deny_countries'}{'*'} and not defined $self->{'_allow_countries'})
243 11 1 if (my $country = $lingua->country)
244 6 5 if ($self->{'_deny_countries'}{'*'})