Branch Coverage

blib/lib/WWW/Suffit/AuthDB/Role/AAA.pm
Criterion Covered Total %
branch 32 120 26.6


line true false branch
172 3 0 @_ > 1 ? :
3 0 @_ ? :
181 0 3 unless length $username
182 0 3 unless length $username <= 256
186 0 3 unless length $password
187 0 3 unless length $password <= 256
192 0 3 if $self->error
195 1 2 unless $user->is_valid
199 1 1 if $model->error
202 0 1 if ($dismiss >= 5 and $updated + 300 >= time)
208 0 1 unless $digest
211 1 0 if (secure_compare($user->password, $digest))
212 0 1 unless ($model->stat_set("address", $address, "username", $username))
219 0 0 unless ($model->stat_set("address", $address, "username", $username, "dismiss", $dismiss + 1))
228 2 0 @_ > 1 ? :
2 0 @_ ? :
235 0 2 unless length $username
236 0 2 unless length $username <= 256
241 0 2 if $self->error
244 1 1 unless $user->is_valid
247 0 1 unless $user->is_enabled
250 0 1 if ($scope) { }
251 0 0 unless $user->allow_ext
253 0 1 unless $user->allow_int
262 1 0 @_ > 1 ? :
1 0 @_ ? :
268 0 1 unless ref $controller
269 1 0 $args->{'url'} ? :
282 0 1 if $self->error
286 0 1 if (exists $routes->{$routename}) { }
292 0 0 unless $m and $m eq $method || $m eq 'ANY' || $m eq '*'
294 0 0 unless $p
297 0 0 if ($p eq $url_path)
303 0 0 if ($p =~ s/\*+$//u)
304 0 0 if (index($url_path, $p) != -1) { }
314 0 0 unless $p =~ s/[~]+/":$_";/eu
316 0 0 if (defined "Mojolicious::Routes::Pattern"->new($p)->match($url_path))
322 1 0 unless $route{'realmname'}
327 0 0 if $self->error
328 0 0 unless $realm->id
333 0 0 if $self->error
345 0 0 if (my $s = $realm->_check_by_usergroup($username, $user->groups)) { }
346 0 0 if ($s == 1)
355 0 0 if (my $s = $realm->_check_by_host($remote_ip)) { }
356 0 0 if ($s == 1)
365 0 0 if (my $s = $realm->_check_by_env) { }
366 0 0 if ($s == 1)
375 0 0 if (my $s = $realm->_check_by_header(sub { my $_k = $_[0]; return $headers->{$_k} if defined $headers and is_hash_ref($headers); return $controller->req->headers->header($_k); } )) { }
377 0 0 if defined $headers and is_hash_ref($headers)
380 0 0 if ($s == 1)
395 0 0 lc($realm->satisfy || 'any') eq 'all' ? :
396 0 0 if ($satisfy_all) { }
397 0 0 if $sum > 0 and scalar @checks == $sum
399 0 0 if $sum > 0
403 0 0 if ($status) { }
404 0 0 $satisfy_all ? :
407 0 0 $default ? :
0 0 $satisfy_all ? :
412 0 0 $status ? :
415 0 0 unless $summary