« blib/lib/Clustericious/RouteBuilder/CRUD.pm
↑ Summary
blib/lib/Clustericious/Plugin/CommonRoutes.pm »
| 1 | package Clustericious::RouteBuilder; | ||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||
| 3 | 32 | ▶ | use strict; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 4 | 32 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 5 | 32 | ▶ | use 5.010; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 6 | 32 | ▶ | use Clustericious::App; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 7 | 32 | ▶ | use Log::Log4perl qw( :easy ); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 8 | 32 | ▶ | use Mojo::Util qw( monkey_patch ); | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||
| 10 | # ABSTRACT: Route builder for Clustericious applications | ||||||||||||||||||||||||||||||||||
| 11 | 32 | our $VERSION = '1.29'; # VERSION | |||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||
| 14 | 32 | my %routes; | |||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||
| 16 | # Much of the code below taken directly from Mojolicious::Lite. | ||||||||||||||||||||||||||||||||||
| 17 | 32 | ▶ | sub import { | ||||||||||||||||||||||||||||||||
|
Subroutine
import: called CC=6 SCAR=19.2
| |||||||||||||||||||||||||||||||||||
| 18 | 32 | my($class, $app_class) = @_; | |||||||||||||||||||||||||||||||||
| 19 | 32 | my $caller = caller; | |||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||
| 21 | 32 | ▶ | unless($app_class) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 22 | { | ||||||||||||||||||||||||||||||||||
| 23 | 15 | ▶ | if ($caller->isa("Clustericious::App")) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 24 | { | ||||||||||||||||||||||||||||||||||
| 25 | 6 | $app_class = $caller; | |||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||
| 27 | else | ||||||||||||||||||||||||||||||||||
| 28 | { | ||||||||||||||||||||||||||||||||||
| 29 | 9 | $app_class = $caller; | |||||||||||||||||||||||||||||||||
| 30 | 9 | ▶ | $app_class =~ s/::Routes$// or die "could not guess app class : "; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||
| 34 | 32 | my @routes; | |||||||||||||||||||||||||||||||||
| 35 | 32 | $routes{$app_class} = \@routes; | |||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||
| 37 | # Route generator | ||||||||||||||||||||||||||||||||||
| 38 | my $route_sub = sub | ||||||||||||||||||||||||||||||||||
| 39 | 72 | ▶ | { | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=15 SCAR=31.3
| |||||||||||||||||||||||||||||||||||
| 40 | 72 | my ($methods, @args) = @_; | |||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||
| 42 | 72 | my ($cb, $constraints, $defaults, $name, $pattern); | |||||||||||||||||||||||||||||||||
| 43 | 72 | my $conditions = []; | |||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||
| 45 | # Route information | ||||||||||||||||||||||||||||||||||
| 46 | 72 | my $condition; | |||||||||||||||||||||||||||||||||
| 47 | 72 | ▶ | while (my $arg = shift @args) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 48 | { | ||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||
| 50 | # Condition can be everything | ||||||||||||||||||||||||||||||||||
| 51 | 161 | ▶ | if ($condition) | ||||||||||||||||||||||||||||||||
|
Branch: 7 branches
| |||||||||||||||||||||||||||||||||||
| 52 | { | ||||||||||||||||||||||||||||||||||
| 53 | 0 | push @$conditions, $condition => $arg; | |||||||||||||||||||||||||||||||||
| 54 | 0 | $condition = undef; | |||||||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||
| 57 | # First scalar is the pattern | ||||||||||||||||||||||||||||||||||
| 58 | ▶ | elsif (!ref $arg && !$pattern) | |||||||||||||||||||||||||||||||||
|
Condition100%3/3
ref $arg || $pattern
MC/DC100%2/2
ref $arg || $pattern
ref $arg
$pattern
Truth table100%3/3
A || B
A= ref $argB= $pattern
| |||||||||||||||||||||||||||||||||||
| 59 | { | ||||||||||||||||||||||||||||||||||
| 60 | 64 | $pattern = $arg; | |||||||||||||||||||||||||||||||||
| 61 | } | ||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||
| 63 | # Scalar | ||||||||||||||||||||||||||||||||||
| 64 | ▶ | elsif (!ref $arg && @args) | |||||||||||||||||||||||||||||||||
|
Condition66%2/3
not ref $arg and @args
MC/DC0%0/2
not ref $arg and @args
not ref $arg
@args
Truth table66%2/3
not(A) and B
A= not ref $argB= @args
| |||||||||||||||||||||||||||||||||||
| 65 | { | ||||||||||||||||||||||||||||||||||
| 66 | 0 | $condition = $arg; | |||||||||||||||||||||||||||||||||
| 67 | } | ||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||
| 69 | # Last scalar is the route name | ||||||||||||||||||||||||||||||||||
| 70 | elsif (!ref $arg) | ||||||||||||||||||||||||||||||||||
| 71 | { | ||||||||||||||||||||||||||||||||||
| 72 | 35 | $name = $arg; | |||||||||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||
| 75 | # Callback | ||||||||||||||||||||||||||||||||||
| 76 | elsif (ref $arg eq 'CODE') | ||||||||||||||||||||||||||||||||||
| 77 | { | ||||||||||||||||||||||||||||||||||
| 78 | 62 | $cb = $arg; | |||||||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||
| 81 | # Constraints | ||||||||||||||||||||||||||||||||||
| 82 | elsif (ref $arg eq 'ARRAY') | ||||||||||||||||||||||||||||||||||
| 83 | { | ||||||||||||||||||||||||||||||||||
| 84 | 0 | $constraints = $arg; | |||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||
| 87 | # Defaults | ||||||||||||||||||||||||||||||||||
| 88 | elsif (ref $arg eq 'HASH') | ||||||||||||||||||||||||||||||||||
| 89 | { | ||||||||||||||||||||||||||||||||||
| 90 | 0 | $defaults = $arg; | |||||||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||
| 94 | # Defaults | ||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | $cb ||= sub {1}; | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=0.6
Condition66%2/3
$cb ||= sub {
1;
}
MC/DC0%0/2
$cb ||= sub {
1;
}
$cb
sub {
1;
}
Truth table66%2/3
A ||= B
A= $cbB= sub {
1;
}
| |||||||||||||||||||||||||||||||||||
| 96 | 72 | ▶ | $constraints ||= []; | ||||||||||||||||||||||||||||||||
|
Condition50%1/2
$constraints ||= []
MC/DC0%0/1
$constraints ||= []
$constraints
Truth table50%1/2
A
A= $constraints
| |||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||
| 98 | # Merge | ||||||||||||||||||||||||||||||||||
| 99 | 72 | ▶ | $defaults ||= {}; | ||||||||||||||||||||||||||||||||
|
Condition50%1/2
$defaults ||= {}
MC/DC0%0/1
$defaults ||= {}
$defaults
Truth table50%1/2
A
A= $defaults
| |||||||||||||||||||||||||||||||||||
| 100 | 72 | $defaults = {%$defaults, cb => $cb}; | |||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||
| 102 | # Name | ||||||||||||||||||||||||||||||||||
| 103 | 72 | ▶ | $name ||= ''; | ||||||||||||||||||||||||||||||||
|
Condition100%2/2
$name ||= ""
MC/DC100%1/1
$name ||= ""
$name
Truth table100%2/2
A
A= $name
| |||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||
| 105 | 72 | push @routes, { | |||||||||||||||||||||||||||||||||
| 106 | name => $name, | ||||||||||||||||||||||||||||||||||
| 107 | pattern => $pattern, | ||||||||||||||||||||||||||||||||||
| 108 | constraints => $constraints, | ||||||||||||||||||||||||||||||||||
| 109 | conditions => $conditions, | ||||||||||||||||||||||||||||||||||
| 110 | defaults => $defaults, | ||||||||||||||||||||||||||||||||||
| 111 | methods => $methods | ||||||||||||||||||||||||||||||||||
| 112 | }; | ||||||||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||||||||
| 114 | 32 | }; | |||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||
| 116 | # Export | ||||||||||||||||||||||||||||||||||
| 117 | 32 | monkey_patch $app_class, startup_route_builder => \&_startup_route_builder; | |||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||
| 119 | 0 | ▶ | monkey_patch $caller, any => sub { $route_sub->(ref $_[0] ? shift : [], @_) }; | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=12.4
Subroutine
any: called CC=2 SCAR=12.4
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | monkey_patch $caller, $_ => sub { unshift @_, 'delete'; goto $route_sub } for qw( Delete del ); | ||||||||||||||||||||||||||||||||
|
Subroutine
del: not called CC=1 SCAR=0.6
Subroutine
Delete: called CC=1 SCAR=0.6
| |||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||
| 122 | 32 | foreach my $method (qw( get head ladder post put websocket authenticate authorize )) | |||||||||||||||||||||||||||||||||
| 123 | { | ||||||||||||||||||||||||||||||||||
| 124 | 256 | ▶ | monkey_patch $caller, $method => sub { unshift @_, $method; goto $route_sub }; | ||||||||||||||||||||||||||||||||
|
Subroutine
websocket: called CC=1 SCAR=0.0
Subroutine
ladder: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||
| 128 | 32 | ▶ | sub _startup_route_builder { | ||||||||||||||||||||||||||||||||
|
Subroutine
startup_route_builder: called CC=19 SCAR=42.5
| |||||||||||||||||||||||||||||||||||
| 129 | 32 | my($app, $auth_plugin) = @_; | |||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | my $stashed = $routes{ ref $app } // do { WARN "no routes stashed for $app"; [] }; | ||||||||||||||||||||||||||||||||
|
Condition33%1/3
$routes{ref $app} // do {
WARN("no routes stashed for $app");
[]
}
MC/DC0%0/2
$routes{ref $app} // do {
WARN("no routes stashed for $app");
[]
}
$routes{ref $app}
do {
WARN("no routes stashed for $app");
[]
}
Truth table33%1/3
A // B
A= $routes{ref $app}B= do {
WARN("no routes stashed for $app");
[]
}
| |||||||||||||||||||||||||||||||||||
| 132 | 32 | my @stashed = @$stashed; | |||||||||||||||||||||||||||||||||
| 133 | 32 | my $routes = $app->routes; | |||||||||||||||||||||||||||||||||
| 134 | 32 | my $head_route = $app->routes; | |||||||||||||||||||||||||||||||||
| 135 | 32 | my $head_authenticated = $head_route; | |||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||
| 137 | 32 | for my $spec (@stashed) | |||||||||||||||||||||||||||||||||
| 138 | { | ||||||||||||||||||||||||||||||||||
| 139 | my ($name,$pattern,$constraints,$conditions,$defaults,$methods) = | ||||||||||||||||||||||||||||||||||
| 140 | 32 | @$spec{qw/name pattern constraints conditions defaults methods/}; | |||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||
| 142 | # authenticate, always connects to app->routes | ||||||||||||||||||||||||||||||||||
| 143 | 32 | ▶ | if (!ref $methods && $methods eq 'authenticate') | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not ref $methods and $methods eq "authenticate"
MC/DC50%1/2
not ref $methods and $methods eq "authenticate"
not ref $methods
$methods eq "authenticate"
Truth table66%2/3
not(A) and B
A= not ref $methodsB= $methods eq "authenticate"
| |||||||||||||||||||||||||||||||||||
| 144 | { | ||||||||||||||||||||||||||||||||||
| 145 | 1 | ▶ | my $realm = $pattern || ref $app; | ||||||||||||||||||||||||||||||||
|
Condition33%1/3
$pattern || ref $app
MC/DC0%0/2
$pattern || ref $app
$pattern
ref $app
Truth table33%1/3
A || B
A= $patternB= ref $app
| |||||||||||||||||||||||||||||||||||
| 146 | 0 | ▶ | my $cb = defined $auth_plugin ? sub { $auth_plugin->authenticate(shift, $realm) } : sub { 1 }; | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=2.0
Subroutine
__ANON__: not called CC=1 SCAR=2.0
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 147 | 1 | $head_route = $head_authenticated = $routes = | |||||||||||||||||||||||||||||||||
| 148 | $app->routes->under->to( { cb => $cb } )->name("authenticated"); | ||||||||||||||||||||||||||||||||||
| 149 | 1 | next; | |||||||||||||||||||||||||||||||||
| 150 | } | ||||||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||||||
| 152 | # authorize replaces previous authorize's | ||||||||||||||||||||||||||||||||||
| 153 | 31 | ▶ | if (!ref $methods && $methods eq 'authorize') | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not ref $methods and $methods eq "authorize"
MC/DC50%1/2
not ref $methods and $methods eq "authorize"
not ref $methods
$methods eq "authorize"
Truth table66%2/3
not(A) and B
A= not ref $methodsB= $methods eq "authorize"
| |||||||||||||||||||||||||||||||||||
| 154 | { | ||||||||||||||||||||||||||||||||||
| 155 | 1 | ▶ | die "put authenticate before authorize" unless $head_authenticated; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 156 | 1 | my $action = $pattern; | |||||||||||||||||||||||||||||||||
| 157 | 1 | my $resource = $name; | |||||||||||||||||||||||||||||||||
| 158 | 1 | ▶ | if($auth_plugin) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 159 | { | ||||||||||||||||||||||||||||||||||
| 160 | $head_route = $routes = $head_authenticated->under->to( { | ||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | cb => sub { | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||
| 162 | 0 | my($c) = @_; | |||||||||||||||||||||||||||||||||
| 163 | # Dynamically compute resource/action | ||||||||||||||||||||||||||||||||||
| 164 | 0 | my ($d_resource,$d_action) = ($resource, $action); | |||||||||||||||||||||||||||||||||
| 165 | 0 | ▶ | $d_resource =~ s/<path>/$c->req->url->path/e if $d_resource; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 166 | 0 | ▶ | $d_resource ||= $c->req->url->path; | ||||||||||||||||||||||||||||||||
|
Condition0%0/3
$d_resource ||= $c->req->url->path
MC/DC0%0/2
$d_resource ||= $c->req->url->path
$d_resource
$c->req->url->path
Truth table0%0/3
A ||= B
A= $d_resourceB= $c->req->url->path
| |||||||||||||||||||||||||||||||||||
| 167 | 0 | ▶ | $d_action =~ s/<method>/$c->req->method/e if $d_action; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | $d_action ||= $c->req->method; | ||||||||||||||||||||||||||||||||
|
Condition0%0/3
$d_action ||= $c->req->method
MC/DC0%0/2
$d_action ||= $c->req->method
$d_action
$c->req->method
Truth table0%0/3
A ||= B
A= $d_actionB= $c->req->method
| |||||||||||||||||||||||||||||||||||
| 169 | 0 | $auth_plugin->authorize( $c, $d_action, $d_resource ); | |||||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||||||
| 171 | 0 | }); | |||||||||||||||||||||||||||||||||
| 172 | } | ||||||||||||||||||||||||||||||||||
| 173 | else | ||||||||||||||||||||||||||||||||||
| 174 | { | ||||||||||||||||||||||||||||||||||
| 175 | 0 | ▶ | $head_route = $routes = $head_authenticated->under->to({ cb => sub { 1 } }); | ||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||
| 177 | 1 | next; | |||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||
| 179 | |||||||||||||||||||||||||||||||||||
| 180 | # ladders don't replace previous ladders | ||||||||||||||||||||||||||||||||||
| 181 | 30 | ▶ | if (!ref $methods && $methods eq 'ladder') | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
not ref $methods and $methods eq "ladder"
MC/DC0%0/2
not ref $methods and $methods eq "ladder"
not ref $methods
$methods eq "ladder"
Truth table33%1/3
not(A) and B
A= not ref $methodsB= $methods eq "ladder"
| |||||||||||||||||||||||||||||||||||
| 182 | { | ||||||||||||||||||||||||||||||||||
| 183 | 0 | ▶ | die "constraints not handled in ladders" if $constraints && @$constraints; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$constraints and @$constraints
MC/DC0%0/2
$constraints and @$constraints
$constraints
@$constraints
Truth table0%0/3
A and B
A= $constraintsB= @$constraints
| |||||||||||||||||||||||||||||||||||
| 184 | 0 | $routes = $routes | |||||||||||||||||||||||||||||||||
| 185 | ->under( $pattern ) | ||||||||||||||||||||||||||||||||||
| 186 | ->over($conditions) | ||||||||||||||||||||||||||||||||||
| 187 | ->to($defaults) | ||||||||||||||||||||||||||||||||||
| 188 | ->name($name); | ||||||||||||||||||||||||||||||||||
| 189 | 0 | next; | |||||||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||
| 192 | # WebSocket? | ||||||||||||||||||||||||||||||||||
| 193 | 30 | ▶ | my $websocket = 1 if !ref $methods && $methods eq 'websocket'; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not ref $methods and $methods eq "websocket"
MC/DC50%1/2
not ref $methods and $methods eq "websocket"
not ref $methods
$methods eq "websocket"
Truth table66%2/3
not(A) and B
A= not ref $methodsB= $methods eq "websocket"
| |||||||||||||||||||||||||||||||||||
| 194 | 30 | ▶ | $methods = [] if $websocket; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 195 | |||||||||||||||||||||||||||||||||||
| 196 | # Create route | ||||||||||||||||||||||||||||||||||
| 197 | 30 | my $route = $routes | |||||||||||||||||||||||||||||||||
| 198 | ->route( $pattern, @$constraints ) | ||||||||||||||||||||||||||||||||||
| 199 | ->over($conditions) | ||||||||||||||||||||||||||||||||||
| 200 | ->via($methods) | ||||||||||||||||||||||||||||||||||
| 201 | ->to($defaults) | ||||||||||||||||||||||||||||||||||
| 202 | ->name($name); | ||||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||||
| 204 | # WebSocket | ||||||||||||||||||||||||||||||||||
| 205 | 0 | ▶ | $route->websocket if $websocket; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 206 | } | ||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||
| 209 | 32 | 1; | |||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||
| 211 | __END__ | ||||||||||||||||||||||||||||||||||