Condition Coverage

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

line%coveragecondition
372100
Adec
00
11
$params //= {}
499100
ABdec
0X0
100
111
$ref and $ref ne "HASH"
517100
Adec
00
11
$self->{'allowed_ips'} //= {}
52475
ABCdec
0XX0
1000
1011
11X1
defined $base and $base =~ /\A$CGI::ACL::RE{'net'}{'IPv4'}\z/ou || $base =~ /\A$CGI::ACL::RE{'net'}{'IPv6'}\z/ou
62975
ABCdec
0XX0
10X0
1100
1111
$ref and $ref ne "HASH" and $ref ne "ARRAY"
642100
ABdec
0X0
100
111
ref $c eq "ARRAY" and not @{$c;}
645100
Adec
00
11
$self->{'deny_countries'} //= {}
73175
ABCdec
0XX0
10X0
1100
1111
$ref and $ref ne "HASH" and $ref ne "ARRAY"
744100
ABdec
0X0
100
111
ref $c eq "ARRAY" and not @{$c;}
747100
Adec
00
11
$self->{'allow_countries'} //= {}
896100
Adec
00
11
$self->{'deny_countries'} //= {}
1076100
ABCdec
0000
0011
01X1
1XX1
defined $self->{'allowed_ips'} or defined $self->{'deny_countries'} or $self->{'deny_cloud'}
108667
ABdec
000
011
1X1
$ENV{'REMOTE_ADDR'} // $DEFAULT_ADDR
1091100
ABdec
000
011
1X1
$raw =~ /\A$CGI::ACL::RE{'net'}{'IPv4'}\z/ou or $raw =~ /\A$CGI::ACL::RE{'net'}{'IPv6'}\z/ou
1104100
ABdec
0X0
100
111
$self->{'_cloud_cache'} && $self->{'_cloud_cache'}{$addr}
1106100
ABdec
0X0
100
111
$cached and $cached->{'expires'} > time
1123100
ABdec
0X0
100
111
not $dns_error and $is_cloud
1134100
ABdec
000
011
1X1
$self->{'allowed_ips'} or $self->{'deny_countries'}
1193100
ABdec
0X0
100
111
$self->{'allow_countries'} && $self->{'allow_countries'}{$country}
13220
Adec
00
11
alarm $DNS_TIMEOUT // 0
13360
ABdec
000
011
1X1
$@ or not $hostname