X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FServer.pm;h=e40da5ea021fb8d4e29230b00855b1d5c931cd29;hb=60bfba3ff3546d7e646699b944a75a4b01e50fae;hp=718e8c15d81062ed13e8852935f5188e667ed55f;hpb=d3082facb5273f9970121638c0385ecfc0f7b090;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/Server.pm b/lib/Catalyst/Script/Server.pm index 718e8c1..e40da5e 100644 --- a/lib/Catalyst/Script/Server.pm +++ b/lib/Catalyst/Script/Server.pm @@ -13,6 +13,7 @@ use namespace::autoclean; with 'Catalyst::ScriptRole'; has debug => ( + traits => [qw(Getopt)], cmd_aliases => 'd', isa => Bool, is => 'ro', @@ -20,6 +21,7 @@ has debug => ( ); has host => ( + traits => [qw(Getopt)], isa => Str, is => 'ro', default => 'localhost', @@ -27,6 +29,7 @@ has host => ( ); has fork => ( + traits => [qw(Getopt)], cmd_aliases => 'f', isa => Bool, is => 'ro', @@ -34,6 +37,7 @@ has fork => ( ); has listen => ( + traits => [qw(Getopt)], cmd_aliases => 'l', isa => Int, is => 'ro', @@ -42,6 +46,7 @@ has listen => ( ); has pidfile => ( + traits => [qw(Getopt)], cmd_aliases => 'pid', isa => Str, is => 'ro', @@ -49,6 +54,7 @@ has pidfile => ( ); has keepalive => ( + traits => [qw(Getopt)], cmd_aliases => 'k', isa => Bool, is => 'ro', @@ -57,6 +63,7 @@ has keepalive => ( ); has background => ( + traits => [qw(Getopt)], cmd_aliases => 'bg', isa => Bool, is => 'ro', @@ -64,6 +71,7 @@ has background => ( ); has restart => ( + traits => [qw(Getopt)], cmd_aliases => 'r', isa => Bool, is => 'ro', @@ -71,6 +79,7 @@ has restart => ( ); has restart_directory => ( + traits => [qw(Getopt)], cmd_aliases => 'rdir', isa => ArrayRef[Str], is => 'ro', @@ -79,6 +88,7 @@ has restart_directory => ( ); has restart_delay => ( + traits => [qw(Getopt)], cmd_aliases => 'rdel', isa => Int, is => 'ro', @@ -140,8 +150,8 @@ sub run { my $restarter = $subclass->new( %args, - start_sub => sub { $self->_run }, - argv => \$self->ARGV, + start_sub => sub { $self->_run_application }, + argv => $self->ARGV, ); $restarter->run_and_watch; @@ -177,11 +187,11 @@ __PACKAGE__->meta->make_immutable; =head1 NAME -[% appprefix %]_server.pl - Catalyst Testserver +Catalyst::Script::Server - Catalyst test server =head1 SYNOPSIS -[% appprefix %]_server.pl [options] + myapp_server.pl [options] Options: -d --debug force debug mode @@ -212,7 +222,7 @@ __PACKAGE__->meta->make_immutable; =head1 DESCRIPTION -Run a Catalyst Testserver for this application. +Run a Catalyst test server for this application. =head1 AUTHORS