Condition Coverage

blib/lib/PAGI/App/Router.pm
Criterion Covered Total %
condition 57 85 67.0


and 3 conditions

line !l l&&!r l&&r condition
108 16 0 3 builtin::blessed($app_or_router) and $app_or_router->isa("PAGI::App::Router")
152 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"
172 4 0 6 builtin::blessed($target) and $target->isa("PAGI::App::Router")
197 0 0 1 builtin::blessed($router_obj) and $router_obj->isa("PAGI::App::Router")
366 0 1 39 defined $name and length $name
401 0 0 9 defined $namespace and length $namespace
404 6 0 3 $self->{'_last_group_names'} and @{$self->{'_last_group_names'};}
502 10 0 1 $route->{'_user_constraints'} and @{$route->{'_user_constraints'};}
518 0 0 0 $route->{'_user_constraints'} and @{$route->{'_user_constraints'};}
534 0 0 0 $route->{'_user_constraints'} and @{$route->{'_user_constraints'};}
544 167 0 37 @args == 2 and ref $args[0] eq "ARRAY"
563 2 1 2 builtin::blessed($mw) and $mw->can("call")
581 0 109 22 $middlewares and @$middlewares

or 2 conditions

line l !l condition
156 4 6 $opts{'method'} // "*"
197 0 0 ref $router_obj || 'scalar'
209 1 0 ref $target || 'scalar'
348 128 0 $route->{'constraints'} // []
12 116 $route->{'_user_constraints'} // []
351 28 0 $params->{$name} // (return 0)
386 0 8 $route->{'_user_constraints'} //= []
434 6 0 $info->{'prefix'} // ""
449 19 13 $path_params //= {}
450 4 28 $query_params //= {}
456 31 0 $info->{'prefix'} // ""
572 2 1 ref $mw || 'scalar'
632 14 0 $1 // "/"
636 3 11 $scope->{'root_path'} // ""
647 61 84 $scope->{'type'} // "http"
648 126 19 $scope->{'method'} // ""
649 144 1 $scope->{'path'} // "/"

or 3 conditions

line l !l&&r !l&&!r condition
464 11 3 1 $path =~ s/:$param_name\b/$value/ or $path =~ s/\{$param_name(?::[^}]*)?\}/$value/
631 1 13 2 $path eq $prefix or $path =~ m[^\Q$prefix\E(/.*)$]
753 82 0 10 $route_method eq '*' || $route_method eq $match_method || $route_method eq $method