| blib/lib/PAGI/App/Router.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 60 | 87 | 68.9 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 108 | 15 | 2 | 3 | builtin::blessed($app_or_router) and $app_or_router->isa("PAGI::App::Router") |
| 139 | 5 | 1 | 4 | @rest >= 2 and not ref $rest[-2] |
| 6 | 0 | 4 | @rest >= 2 and not ref $rest[-2] and $rest[-2] eq "method" | |
| 159 | 4 | 0 | 6 | builtin::blessed($target) and $target->isa("PAGI::App::Router") |
| 184 | 0 | 0 | 1 | builtin::blessed($router_obj) and $router_obj->isa("PAGI::App::Router") |
| 356 | 0 | 1 | 39 | defined $name and length $name |
| 391 | 0 | 0 | 9 | defined $namespace and length $namespace |
| 394 | 6 | 0 | 3 | $self->{'_last_group_names'} and @{$self->{'_last_group_names'};} |
| 493 | 10 | 0 | 1 | $route->{'_user_constraints'} and @{$route->{'_user_constraints'};} |
| 509 | 0 | 0 | 0 | $route->{'_user_constraints'} and @{$route->{'_user_constraints'};} |
| 525 | 0 | 0 | 0 | $route->{'_user_constraints'} and @{$route->{'_user_constraints'};} |
| 535 | 201 | 0 | 37 | @args == 2 and ref $args[0] eq "ARRAY" |
| 554 | 2 | 1 | 2 | builtin::blessed($mw) and $mw->can("wrap") |
| 570 | 0 | 143 | 22 | $middlewares and @$middlewares |
| line | l | !l | condition |
|---|---|---|---|
| 143 | 4 | 6 | $opts{'method'} // "*" |
| 184 | 0 | 0 | ref $router_obj || 'scalar' |
| 196 | 1 | 0 | ref $target || 'scalar' |
| 338 | 148 | 0 | $route->{'constraints'} // [] |
| 12 | 136 | $route->{'_user_constraints'} // [] | |
| 341 | 28 | 0 | $params->{$name} // (return 0) |
| 376 | 0 | 8 | $route->{'_user_constraints'} //= [] |
| 424 | 6 | 0 | $info->{'prefix'} // "" |
| 439 | 19 | 13 | $path_params //= {} |
| 440 | 4 | 28 | $query_params //= {} |
| 446 | 31 | 0 | $info->{'prefix'} // "" |
| 561 | 2 | 1 | ref $mw || 'scalar' |
| 602 | 15 | 0 | $1 // "/" |
| 606 | 3 | 12 | $scope->{'root_path'} // "" |
| 627 | 7 | 15 | $scope->{'type'} // "http" |
| 639 | 86 | 86 | $scope->{'type'} // "http" |
| 640 | 147 | 25 | $scope->{'method'} // "" |
| 641 | 171 | 1 | $scope->{'path'} // "/" |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 454 | 11 | 3 | 1 | $path =~ s/:$param_name\b/$value/ or $path =~ s/\{$param_name(?::[^}]*)?\}/$value/ |
| 601 | 1 | 14 | 2 | $path eq $prefix or $path =~ m[^\Q$prefix\E(/.*)$] |
| 727 | 100 | 0 | 10 | $route_method eq '*' || $route_method eq $match_method || $route_method eq $method |