Branch Coverage

File:lib/Geo/Coder/Free/Display.pm
Coverage:41.5%

line%coveragebranch
7050TFif (not defined $class) { }
50TFelsif (&Scalar::Util::blessed($class)) { }
8250TFif (defined $ENV{'HTTP_REFERER'})
8450TFunless ("Data::Validate::URI"->can("new"))
8950TFunless ("Data::Validate::URI"->new->is_uri($ENV{'HTTP_REFERER'}))
10050TFif ($params->{'logger'})
10650TFif ($config = "Config::Abstraction"->new("config_dirs", [$config_dir], "config_files", ["default", $info->domain_name], "logger", $params->{'logger'}))
11050TFif ($@ or not defined $config)
11650TFif (defined $params->{'config'})
12050TFunless ($info->is_search_engine or not defined $ENV{'REMOTE_ADDR'})
12150TFif (my $params = $info->params)
13150TFif ($impact > $threshold)
13650TFif ($ENV{'REMOTE_ADDR'})
15150TFif (my $throttler = "Data::Throttler"->new(%options))
1530TFunless ($throttler->try_push("key", $ENV{'REMOTE_ADDR'}))
1560TFif ($params->{'logger'})
16350TFif ($@)
16450TFif ($params->{'logger'})
17150TFif (my $lingua = $params->{'lingua'})
1720TFif ($blacklist{uc $lingua->country})
1730TFif ($params->{'logger'})
19650TFif (my $lingua = $params->{'lingua'})
20050TFif (my $key = $info->param("key"))
20450TFif (my $page = $info->param("page"))
21050TFif (my $twitter = $config->{'twitter'}) { }
50TFelsif (not defined $sm) { }
23050TFif ($ENV{'CONFIG_DIR'})
23750TFif (defined $config_dir and -d $config_dir)
2400TFif (-d $config_dir)
25250TFunless (-d $config_dir)
26050TFunless (-d $config_dir)
2610TFif ($ENV{'DOCUMENT_ROOT'}) { }
27850TFunless (-d $config_dir)
2790TFif ($args->{'config_directory'})
2820TFif ($args->{'logger'})
29950TFunless ($args and $args->{'cart'})
30050TFif (my $purchases = $self->{'_info'}->get_cookie("cookie_name", "cart"))
30750TFunless ($args and $args->{'itemsincart'})
30850TFif ($args->{'cart'})
3110TFif (defined $args->{'cart'}{$key} and $args->{'cart'}{$key} ne '') { }
32350TFunless ($args->{'itemsincart'})
32650TFif (my $rc = $cache->get($key))
33950TFif ($rc =~ /^Location:\s/msu)
34350TFif ($cache)
354100TFref $_[0] eq 'HASH' ? :
35650TFif ($self->{'_logger'})
360100TFif ($self->{'_filename'})
36150TFif ($self->{'_logger'})
36850TFif ($self->{'_logger'})
37950TFif (my $lingua = $self->{'_lingua'})
3820TFif (my $language = $lingua->language_code_alpha2)
3830TFif (my $dialect = $lingua->sublanguage_code_alpha2)
3870TFif -d "$dir/$language/$browser_type"
3880TFif -d "$dir/$browser_type/$language"
39150TFif -d "$dir/$browser_type/default"
39250TFif -d "$dir/default/$browser_type"
39350TFif -d "$dir/$browser_type"
40550TFif ($prefix =~ m[\.\./]u)
41350TFunless (defined $filename and defined $fh)
42150TFif ($self->{'log'})
44150TFref $_[0] eq 'HASH' ? :
44650TFunless $key =~ /^[a-zA-Z0-9_-]+$/u
44950TFunless defined $value
47250TFif (my $cookies = $self->{'_cookies'})
47450TFexists $cookies->{$cookie} ? :
47750TF$self->{'info'}->protocol eq 'https' ? :
48350TFif ($self->{'config'}{'security'}{'csrf'}{'enable'} // 1)
49350TFif ($params->{'Content-Type'}) { }
49950TFif ($filename =~ /\.txt$/u) { }
50750TFif ($params->{'Retry-After'})
534100TFref $_[0] eq 'HASH' ? :
54050TFif ($filename =~ /.+\.t(mpl|t)$/u) { }
0TFelsif ($filename =~ /\.(html?|txt)$/u) { }
54950TFif (defined $self->{'_config'}) { }
0TFelsif (scalar keys %params) { }
55050TFif ($info->params) { }
55550TFif (scalar keys %params)
58150TFunless ($template->process($filename, $vals, \$rc))
5820TFif (my $err = $template->error)
5890TFunless &Geo::Coder::Free::Display::open(my $fin, "<", $filename)
6010TFif (not $filename =~ /.txt$/u and $rc =~ /\smailto:(.+?)>/u and not $1 =~ /^&/u and $self->{'_logger'})
61250TFif (my $logger = $self->{'_logger'})
61350TFref $_[0] eq 'HASH' ? :
61450TFif (defined $ENV{'REMOTE_ADDR'}) { }
63350TFif ($info->is_search_engine) { }
50TFelsif ($info->is_mobile) { }
50TFelsif ($info->is_robot) { }
64250TFif (my $logger = $self->{'_logger'})