Condition Coverage

blib/lib/CGI/Lingua.pm
Criterion Covered Total %
condition 23 115 20.0


and 3 conditions

line !l l&&!r l&&r condition
139 31 0 0 $cache and $ENV{'REMOTE_ADDR'}
142 0 0 0 $info and $l = $info->lang
165 0 0 0 $rc->{'_what_language'} || $rc->{'_rlanguage'} and $info
0 0 0 $rc->{'_what_language'} || $rc->{'_rlanguage'} and $info and $info->lang
197 0 0 31 defined $^V and $^V ge "v5.14.0"
447 17 1 3 not $l and $http_accept_language =~ /(.+)-.+/
458 1 1 0 $http_accept_language =~ /;/ and defined $self->{'_logger'}
553 0 0 13 $variety =~ /[a-z]{2,3}/ and not defined $self->{'_sublanguage'}
601 13 0 0 $self->{'_cache'} and not defined $from_cache
619 0 2 0 $self->{'_slanguage'} and $self->{'_slanguage'} ne "Unknown"
635 0 2 0 !$self->{'_rlanguage'} || $self->{'_rlanguage'} eq 'Unknown' and length $http_accept_language == 2 || $http_accept_language =~ /^..-..$/
655 0 1 2 not defined $country and my $c = $self->_what_language
687 0 0 0 $self->{'_logger'} and $language_name
698 0 0 0 exists $self->{'_slanguage'} and $self->{'_slanguage'} ne "Unknown"
703 0 0 0 $language_name and $language_code2
0 0 0 $language_name and $language_code2 and not defined $http_accept_language
715 0 0 0 $http_accept_language and $http_accept_language ne $self->{'_rlanguage'}
742 0 0 0 do {
751 0 0 0 not defined $from_cache and $self->{'_cache'}
0 0 0 not defined $from_cache and $self->{'_cache'} and defined $self->{'_slanguage_code_alpha2'}
866 10 0 2 $ENV{'HTTP_CF_IPCOUNTRY'} and $ENV{'HTTP_CF_IPCOUNTRY'} ne "XX"
965 0 0 0 $self->{'_country'} and $self->{'_country'} eq "eu"
968 0 0 0 not $self->{'_country'} and eval {
1004 0 0 0 $self->{'_country'} eq "US" and $whois->{'StateProv'} eq "PR"
1133 0 0 1 defined $agent and $agent =~ /\((.+)\)/
1154 0 0 1 $browser and $browser->country
1251 0 0 0 $self->{'_logger'} and not defined $self->{'_timezone'}

or 2 conditions

line l !l condition
191 0 31 $params{'dont_use_ip'} || 0
0 31 $params{'debug'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
165 0 0 0 $rc->{'_what_language'} || $rc->{'_rlanguage'}
591 0 0 13 $@ or not defined $language_name
635 0 2 0 !$self->{'_rlanguage'} || $self->{'_rlanguage'} eq 'Unknown'
1 0 1 length $http_accept_language == 2 || $http_accept_language =~ /^..-..$/
695 0 0 0 not defined $self->{'_rlanguage'} or $self->{'_rlanguage'} eq "Unknown"
725 0 0 0 not defined $http_accept_language or $1 ne $self->{'_rlanguage'}
997 0 0 0 $@ or not defined $whois
0 0 0 $@ or not defined $whois or ref $whois ne "HASH"
1084 0 0 0 $^O eq "MSWin32" or -r "/usr/local/share/GeoIP/GeoIP.dat"
0 0 0 $^O eq "MSWin32" or -r "/usr/local/share/GeoIP/GeoIP.dat" or -r "/usr/share/GeoIP/GeoIP.dat"