| examples/09-psgi-bridge/app.pl | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 12 | 12 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 |
| pod | n/a | ||
| total | 16 | 16 | 100.0 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 209736 | use strict; | |||
| 1 | 2 | ||||||
| 1 | 33 | ||||||
| 2 | 1 | 1 | 4 | use warnings; | |||
| 1 | 1 | ||||||
| 1 | 38 | ||||||
| 3 | 1 | 1 | 4 | use Future::AsyncAwait; | |||
| 1 | 2 | ||||||
| 1 | 9 | ||||||
| 4 | 1 | 1 | 45 | use PAGI::App::WrapPSGI; | |||
| 1 | 1 | ||||||
| 1 | 178 | ||||||
| 5 | |||||||
| 6 | my $psgi_app = sub { | ||||||
| 7 | my ($env) = @_; | ||||||
| 8 | my $body = do { local $/; readline $env->{'psgi.input'} } // ''; | ||||||
| 9 | return [ 200, [ 'Content-Type' => 'text/plain' ], [ "PSGI says hi\n", "Body: $body" ] ]; | ||||||
| 10 | }; | ||||||
| 11 | |||||||
| 12 | my $wrapper = PAGI::App::WrapPSGI->new(psgi_app => $psgi_app); | ||||||
| 13 | return $wrapper->to_app; |