File Coverage

blib/lib/Plack/Handler/Twiggy.pm
Criterion Covered Total %
statement 11 11 100.0
branch 2 4 50.0
condition n/a
subroutine 3 3 100.0
pod 0 2 0.0
total 16 20 80.0


line stmt bran cond sub pod time code
1             package Plack::Handler::Twiggy;
2 1     1   5513 use strict;
  1         15  
  1         1014  
3              
4             sub new {
5 1     1 0 77 my $class = shift;
6 1         31 bless {@_}, $class;
7             }
8              
9             sub run {
10 1     1 0 16 my ($self, $app) = @_;
11              
12 1 50       23 my $class = $ENV{SERVER_STARTER_PORT} ?
13             'Twiggy::Server::SS' : 'Twiggy::Server';
14 1         141 eval "require $class";
15 1 50       7 die if $@;
16              
17 1         2 $class->new(%{$self})->run($app);
  1         25  
18             }
19            
20              
21             1;
22              
23             __END__