X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FServer.pm;h=bb4c2a576db9bd2cbf32111a3a9ddc601a2cae9e;hb=2d03a2997e2b76d4ee7df1c1db5597f91ab8ec5c;hp=8226af49b0fc6150ab8dfdadcf9452fa87b844d8;hpb=b89d8b9875b08957089b2758fb3533bf8fc1e0c6;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/Server.pm b/lib/Catalyst/Script/Server.pm index 8226af4..bb4c2a5 100644 --- a/lib/Catalyst/Script/Server.pm +++ b/lib/Catalyst/Script/Server.pm @@ -13,8 +13,6 @@ use namespace::autoclean; with 'Catalyst::ScriptRole'; -__PACKAGE__->meta->get_attribute('help')->cmd_aliases('?'); - has debug => ( traits => [qw(Getopt)], cmd_aliases => 'd', @@ -47,8 +45,7 @@ has port => ( isa => PositiveInt, is => 'ro', default => sub { - my $self = shift; - $ENV{ Catalyst::Utils::class2env($self->application_name . '_PORT')}||3000 + Catalyst::Utils::env_value(shift->application_name, 'port') || 3000 }, documentation => 'Specify a different listening port (to the default port 3000)', ); @@ -84,7 +81,9 @@ has restart => ( cmd_aliases => 'r', isa => Bool, is => 'ro', - default => 0, + default => sub { + Catalyst::Utils::env_value(shift->application_name, 'reload') || 0; + }, documentation => 'use Catalyst::Restarter to detect code changes and restart the application', ); @@ -189,6 +188,7 @@ sub _application_args { $self->port, $self->host, { + argv => $self->ARGV, map { $_ => $self->$_ } qw/ fork keepalive @@ -229,7 +229,7 @@ Catalyst::Script::Server - Catalyst test server a restart when modified (defaults to '\.yml$|\.yaml$|\.conf|\.pm$') --rdir --restart_directory the directory to search for - modified files, can be set mulitple times + modified files, can be set multiple times (defaults to '[SCRIPT_DIR]/..') --sym --follow_symlinks follow symlinks in search directories (defaults to false. this is a no-op on Win32)