Dave Cross: Still Munging Data With Perl: Online event - Mar 17 Learn more

use strict;
sub new {
my $class = shift;
bless {@_}, $class;
}
sub run {
my ($self, $app) = @_;
my $class = $ENV{SERVER_STARTER_PORT} ?
'Twiggy::Prefork::Server::SS' : 'Twiggy::Prefork::Server';
eval "require $class";
die if $@;
$class->new(%{$self})->run($app);
}
1;
__END__