1 package Catalyst::Script::Server;
8 use Catalyst::Engine::HTTP;
9 use namespace::clean -except => [ qw(meta) ];
11 with 'MooseX::Getopt';
13 has help => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
14 has host => ( isa => 'Str', is => 'ro', required => 0 );
15 has fork => ( isa => 'Bool', is => 'ro', required => 0 );
16 has listen => ( isa => 'Int', is => 'ro', required => 0, default => sub{ 3000 } );
17 has pidfile => ( isa => 'Str', is => 'ro', required => 0 );
18 has keepalive => ( isa => 'Bool', is => 'ro', required => 0, default => sub { 0 } );
19 has background => ( isa => 'Bool', is => 'ro', required => 0 );
20 has app => ( isa => 'Str', is => 'ro', required => 1 );
27 pod2usage() if $self->help;
29 Class::MOP::load_class($app);
31 $self->listen, $self->host,
33 'fork' => $self->fork,
34 keepalive => $self->keepalive,
35 background => $self->background,
36 pidfile => $self->pidfile,