| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
411347
|
use v5.36; |
|
|
1
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
|
|
package PXF::Example::HelloWorld { |
|
3
|
1
|
|
|
1
|
|
431
|
use PlackX::Framework; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
5
|
|
|
4
|
1
|
|
|
1
|
|
7
|
use PXF::Example::HelloWorld::Router; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
|
|
route '/' => sub ($request, $response) { |
|
6
|
|
|
|
|
|
|
$response->print('Hello ' . ($request->param('name') || 'World!')); |
|
7
|
|
|
|
|
|
|
return $response; |
|
8
|
|
|
|
|
|
|
}; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
route '/{word:hello|world}' => sub ($request, $response) { |
|
11
|
|
|
|
|
|
|
my $word = $request->route_param('word'); |
|
12
|
|
|
|
|
|
|
$response->print("You said ~$word~"); |
|
13
|
|
|
|
|
|
|
return $response; |
|
14
|
|
|
|
|
|
|
}; |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
PXF::Example::HelloWorld->app; |