| 1 | package Plack::Handler::Starman; | ||||||||||
| 2 | 113 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 113 | ▶ | use Starman::Server; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 113 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 6 | 113 | my $class = shift; | |||||||||
| 7 | 113 | bless { @_ }, $class; | |||||||||
| 8 | } | ||||||||||
| 9 | |||||||||||
| 10 | 113 | ▶ | sub run { | ||||||||
|
Subroutine
run: called CC=5 SCAR=17.8
Pod
undocumented
| |||||||||||
| 11 | 113 | my($self, $app) = @_; | |||||||||
| 12 | |||||||||||
| 13 | 113 | ▶ | if ($ENV{SERVER_STARTER_PORT}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | require Net::Server::SS::PreFork; | |||||||||
| 15 | 0 | @Starman::Server::ISA = qw(Net::Server::SS::PreFork); # Yikes. | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 113 | my %nsa; | |||||||||
| 19 | 113 | ▶ | while (my($key, $value) = each %$self) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 258 | ▶ | $key =~ s/^net_server_// or next; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | $nsa{$key} = $value; | |||||||||
| 22 | } | ||||||||||
| 23 | 113 | ▶ | $self->{net_server_args} = \%nsa if %nsa; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | |||||||||||
| 25 | 113 | Starman::Server->new->run($app, {%$self}); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 113 | 1; | |||||||||
| 29 | |||||||||||
| 30 | __END__ | ||||||||||