Branch Coverage

blib/lib/SignalWire/Agents/Server/AgentServer.pm
Criterion Covered Total %
branch 18 48 37.5


line true false branch
28 1 14 unless $route =~ m[^/]
29 15 0 unless $route eq "/"
31 1 14 if (exists $self->agents->{$route})
42 0 1 unless $route =~ m[^/]
43 1 0 unless $route eq "/"
61 0 0 unless defined $directory
62 0 0 unless defined $route
63 0 0 unless -d $directory
65 0 0 unless $route =~ m[^/]
66 0 0 unless $route eq "/"
110 7 0 unless $path eq "/"
113 2 5 if ($path eq "/health")
119 1 4 if ($path eq "/ready")
126 0 0 $static_route eq '/' ? :
127 0 0 if ($path eq $static_route or index($path, "$prefix/") == 0 or $static_route eq "/" and $path =~ m[^/])
128 0 0 if $static_route eq "/" and $path eq "/"
133 0 0 if ($rel_path =~ m[(?:^|/)\.\.(?:/|$)])
147 0 0 unless (index($abs_path, $base_dir) == 0)
156 0 0 if (-f $abs_path and -r $abs_path)
162 0 0 unless open my $fh, "<:raw", $abs_path
184 0 4 if ($route eq "/")
188 3 1 if ($path eq $route or index($path, "$route/") == 0)
194 3 1 if (defined $matched_route)
208 7 0 if (ref $res eq "ARRAY")