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 {
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 {
);
}
-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
pidfile
keepalive
follow_symlinks
+ port
+ host
/,
},
);
-}
+};
__PACKAGE__->meta->make_immutable;
-
1;
=head1 NAME
Run a Catalyst test server for this application.
+=head1 SEE ALSO
+
+L<Catalyst::ScriptRunner>
+
=head1 AUTHORS
Catalyst Contributors, see Catalyst.pm