X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FScript%2FServer.pm;h=4e871917e2de668f0011144f2589cb5c6b8641c3;hb=4c21ba3bd6fd11b9ba6e6af65bf25a497c3709b1;hp=328773cc97883a26fea684260dbc06e79226b10b;hpb=fa38321d7ff95ec0a6ac3b4a74156794f8459722;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Script/Server.pm b/lib/Catalyst/Script/Server.pm index 328773c..4e87191 100644 --- a/lib/Catalyst/Script/Server.pm +++ b/lib/Catalyst/Script/Server.pm @@ -48,8 +48,8 @@ has port => ( use Moose::Util::TypeConstraints; class_type 'MooseX::Daemonize::Pid::File'; subtype 'Catalyst::Script::Server::Types::Pidfile', - as 'MooseX::Daemonize::Pid::File', - where { 1 }; + as 'MooseX::Daemonize::Pid::File'; + coerce 'Catalyst::Script::Server::Types::Pidfile', from Str, via { try { Class::MOP::load_class("MooseX::Daemonize::Pid::File") } catch { @@ -163,7 +163,7 @@ has follow_symlinks => ( sub _plack_engine_name { my $self = shift; - return $self->fork ? 'Starman' : $self->keepalive ? 'Starman' : 'Standalone'; + return $self->fork || $self->keepalive ? 'Starman' : 'Standalone'; } sub _restarter_args { @@ -260,13 +260,13 @@ sub _plack_loader_args { ); } -sub _application_args { - my ($self) = shift; +around _application_args => sub { + my ($orig, $self) = @_; return ( $self->port, $self->host, { - argv => $self->ARGV, + %{ $self->$orig }, map { $_ => $self->$_ } qw/ fork keepalive @@ -274,13 +274,14 @@ sub _application_args { pidfile keepalive follow_symlinks + port + host /, }, ); -} +}; __PACKAGE__->meta->make_immutable; - 1; =head1 NAME @@ -322,6 +323,10 @@ Catalyst::Script::Server - Catalyst test server Run a Catalyst test server for this application. +=head1 SEE ALSO + +L + =head1 AUTHORS Catalyst Contributors, see Catalyst.pm