| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package Plack::Handler::Starman; | 
| 2 | 83 |  |  | 83 |  | 21804781 | use strict; | 
|  | 83 |  |  |  |  | 1158 |  | 
|  | 83 |  |  |  |  | 8170 |  | 
| 3 | 83 |  |  | 83 |  | 52688 | use Starman::Server; | 
|  | 83 |  |  |  |  | 481 |  | 
|  | 83 |  |  |  |  | 24031 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | sub new { | 
| 6 | 83 |  |  | 83 | 0 | 5175 | my $class = shift; | 
| 7 | 83 |  |  |  |  | 1147 | bless { @_ }, $class; | 
| 8 |  |  |  |  |  |  | } | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | sub run { | 
| 11 | 83 |  |  | 83 | 0 | 5002 | my($self, $app) = @_; | 
| 12 |  |  |  |  |  |  |  | 
| 13 | 83 | 50 |  |  |  | 891 | 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 | 83 |  |  |  |  | 251 | my %nsa; | 
| 19 | 83 |  |  |  |  | 1186 | while (my($key, $value) = each %$self) { | 
| 20 | 166 | 50 |  |  |  | 1111 | $key =~ s/^net_server_// or next; | 
| 21 | 0 |  |  |  |  | 0 | $nsa{$key} = $value; | 
| 22 |  |  |  |  |  |  | } | 
| 23 | 83 | 50 |  |  |  | 445 | $self->{net_server_args} = \%nsa if %nsa; | 
| 24 |  |  |  |  |  |  |  | 
| 25 | 83 |  |  |  |  | 1820 | Starman::Server->new->run($app, {%$self}); | 
| 26 |  |  |  |  |  |  | } | 
| 27 |  |  |  |  |  |  |  | 
| 28 |  |  |  |  |  |  | 1; | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | __END__ |