line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::Handler::Starman; |
2
|
61
|
|
|
61
|
|
16678964
|
use strict; |
|
61
|
|
|
|
|
503
|
|
|
61
|
|
|
|
|
4369
|
|
3
|
61
|
|
|
61
|
|
32318
|
use Starman::Server; |
|
61
|
|
|
|
|
171
|
|
|
61
|
|
|
|
|
11431
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new { |
6
|
61
|
|
|
61
|
0
|
3385
|
my $class = shift; |
7
|
61
|
|
|
|
|
531
|
bless { @_ }, $class; |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub run { |
11
|
61
|
|
|
61
|
0
|
3184
|
my($self, $app) = @_; |
12
|
|
|
|
|
|
|
|
13
|
61
|
50
|
|
|
|
377
|
if ($ENV{SERVER_STARTER_PORT}) { |
14
|
0
|
|
|
|
|
0
|
require Net::Server::SS::PreFork; |
15
|
0
|
|
|
|
|
0
|
@Starman::Server::ISA = qw(Net::Server::SS::PreFork); # Yikes. |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
61
|
|
|
|
|
166
|
my %nsa; |
19
|
61
|
|
|
|
|
592
|
while (my($key, $value) = each %$self) { |
20
|
122
|
50
|
|
|
|
780
|
$key =~ s/^net_server_// or next; |
21
|
0
|
|
|
|
|
0
|
$nsa{$key} = $value; |
22
|
|
|
|
|
|
|
} |
23
|
61
|
50
|
|
|
|
183
|
$self->{net_server_args} = \%nsa if %nsa; |
24
|
|
|
|
|
|
|
|
25
|
61
|
|
|
|
|
610
|
Starman::Server->new->run($app, {%$self}); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |