Branch Coverage

blib/lib/Mail/MtPolicyd.pm
Criterion Covered Total %
branch 0 96 0.0


line true false branch
46 0 0 unless (defined $config->{$key})
59 0 0 unless (defined $config->{$key})
78 0 0 if @_
80 0 0 unless (defined $server->{'config_file'})
98 0 0 if ($cmdline->{'help'})
102 0 0 if (defined $cmdline->{'config'} and $cmdline->{'config'} ne '')
105 0 0 unless (-f $server->{'config_file'})
111 0 0 unless (defined $server->{'log_level'})
114 0 0 unless (defined $server->{'log_file'} or $cmdline->{'foreground'})
122 0 0 unless (defined $server->{'port'})
193 0 0 if (defined $self->{'db_dsn'} and not $self->{'db_dsn'} =~ /^\s*$/)
201 0 0 if (defined $self->{'ldap_host'} and not $self->{'ldap_host'} =~ /^\s*$/)
214 0 0 unless (defined $config->{'VirtualHost'})
226 0 0 if ($cmdline->{'dump_config'})
233 0 0 if ($cmdline->{'foreground'})
237 0 0 if ($cmdline->{'loglevel'})
242 0 0 if ($cmdline->{'cron'} and not $cmdline->{'cron'} =~ /^\s*$/)
276 0 0 if ('Mail::MtPolicyd::SqlConnection'->is_initialized)
278 0 0 if ($@)
282 0 0 if ('Mail::MtPolicyd::LdapConnection'->is_initialized)
284 0 0 if ($@)
302 0 0 if ('Mail::MtPolicyd::SqlConnection'->is_initialized)
305 0 0 if ('Mail::MtPolicyd::LdapConnection'->is_initialized)
314 0 0 unless (defined $self->{'memcached'})
328 0 0 if ($self->{'memcached'}->add($lock, 1, $lock_ttl))
350 0 0 unless (defined $instance)
356 0 0 if (my $session = $self->{'memcached'}->get($instance))
366 0 0 defined $self->{'memcached_expire'} ? :
368 0 0 unless (defined $session and defined $instance)
387 0 0 if ($is_socket) { }
388 0 0 'Net::Server'->VERSION >= 2 ? :
401 0 0 if ($self->{'vhost_by_policy_context'} and defined $policy_context and $policy_context ne '')
406 0 0 if ($policy_context eq $vhost->name)
413 0 0 unless (defined $vhost)
421 0 0 unless ('Mail::MtPolicyd::SqlConnection'->is_initialized)
429 0 0 if ($self->{'server'}{'log_level'} and $self->{'server'}{'log_level'} >= $level)
470 0 0 if ($self->_is_loglevel(4))
475 0 0 if ($self->_is_loglevel(4))
487 0 0 defined $result->last_match ? :
490 0 0 if ($@)
492 0 0 if (defined $s)
496 0 0 if (defined $error)
521 0 0 if ($@ =~ /Keepalive connection timeout/) { }
0 0 elsif ($@ =~ /connection closed by peer/) { }
0 0 elsif ($@) { }
538 0 0 if ($@ =~ /Request timeout!/) { }
0 0 elsif ($@) { }
546 0 0 if ($self->_is_loglevel(4))