Plack/Handler/Starman.pm

filter: Statementstmt 84.2% 16 / 19 Branchbran 62.5% 5 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 2 totaltotal 75.7% 25 / 33 CC 5 SCAR 14.1
CC
5
Cov
78%
run
5.9
BEGIN
1.0
BEGIN
1.0
CRAP 4.1
« Starman/Server.pm ↑ Summary HTTP/Server/PSGI/Net/Server/PreFork.pm »
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
BranchTrueFalseTotal
if ($ENV{"SERVER_STARTER_PORT"}) 0 113 113
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
BranchTrueFalseTotal
if (() = each %$self) 258 113 371
20 258 ▶ $key =~ s/^net_server_// or next;
Branch: 1 branch
BranchTrueFalseTotal
$key =~ s/^net_server_// or next 0 258 258
21 0 $nsa{$key} = $value;
22 }
23 113 ▶ $self->{net_server_args} = \%nsa if %nsa;
Branch: 1 branch
BranchTrueFalseTotal
if %nsa 0 113 113
24  
25 113 Starman::Server->new->run($app, {%$self});
26 }
27  
28 113 1;
29  
30 __END__
« Starman/Server.pm ↑ Summary HTTP/Server/PSGI/Net/Server/PreFork.pm »