1 package CatalystX::Script::Server::Starman;
3 use MooseX::Types::Moose qw/ Str Int /;
5 use Pod::Find qw(pod_where);
6 use namespace::autoclean;
10 extends 'Catalyst::Script::Server';
12 has '+fork' => ( default => 1, init_arg => undef );
14 has [qw/ keepalive restart restart_delay restart_regex restart_directory/] => ( init_arg => undef, is => 'ro' );
29 /] => ( isa => Int, is => 'ro' );
34 /] => ( isa => Str, is => 'ro' );
36 around _plack_loader_args => sub {
37 my ($orig, $self, @args) = @_;
38 my %out = $self->$orig(@args);
50 $out{$key} = $self->$key();
55 sub print_usage_text {
57 pod2usage( -input => pod_where({-inc => 1}, __PACKAGE__), -verbose => 2 );
65 CatalystX::Script::Server::Starman - Replace the development server with Starman
69 myapp_server.pl [options]
71 -d --debug force debug mode
72 -? --help display this help and exits
73 -h --host host (defaults to all)
74 -p --port port (defaults to 3000)
75 --follow_symlinks follow symlinks in search directories
76 (defaults to false. this is a no-op on Win32)
77 --background run the process in the background
78 --pidfile specify filename for pid file
79 --workers Initial number of workers to spawn (defaults to 5)
80 --min_servers Minimum number of worker processes runnning
81 --min_spare_servers Minimum number of spare workers (more are forked
82 if there are less spare than this)
83 --max_spare_servers Maximum number of spare workers (workers are killed
84 if there are more spare than this)
85 --max_servers Maximum number of workers in total.
86 --max_requests Maximum number of requests each worker will handle
87 --backlog Number of backlogged connections allowed
89 --group Group to run as
94 perldoc Catalyst::PSGI
98 A Catalyst extension to replace the development server with L<Starman>.
100 This module replaces the functionality of L<Catalyst::Engine::HTTP::Prefork>,
101 which is now deprecated.
103 It provides access to the prefork engine specific options which were previously
104 added by hacking your server script.
106 =head1 Adding this to your application
108 Just add a server script module to your application which inherits from this
111 L<Catalyst::ScriptRunner> will automatically detect and use it when
112 script/myapp_server.pl is started.
116 package MyApp::Script::Server;
118 use namespace::autoclean;
120 extends 'CatalystX::Script::Server::Starman';
126 L<plackup> - can be used to start your application C<.psgi> under Starman
132 Tomas Doran (t0m) C<< <bobtfish@bobtfish.net> >>
134 =head1 COPYRIGHT & LICENSE
136 Copyright 2009 the above author(s).
138 This sofware is free software, and is licensed under the same terms as perl itself.