Server::Control::Starman -- Control Starman
version 0.20
use Server::Control::Starman; my $starman = Server::Control::Starman->new( binary_path => '/usr/local/bin/starman' options => { port => 123, error_log => '/path/to/error.log', pid => '/path/to/starman.pid' }, ); if ( !$starman->is_running() ) { $starman->start(); }
Server::Control::Starman is a subclass of Server::Control for Starman processes.
In addition to the constructor options described in Server::Control:
Path to app.psgi; required.
Options to pass to the starman binary; required. Possible keys include: listen, host, port, workers, backlog, max_requests, user, group, pid, and error_log. Underscores are converted to dashes before passing to starman.
listen
host
port
workers
backlog
max_requests
user
group
pid
error_log
--daemonize and --preload-app are automatically passed to starman; the only current way to change this is by subclassing and overriding _build_options_string.
--daemonize
--preload-app
_build_options_string
In addition, the error_log, pid, and port options, if given, will be used to populate the corresponding Server::Control parameters (error_log, pid_file, and port).
e.g. this
options => { port => 123, error_log => '/path/to/error.log', max_requests => 100, pid => '/path/to/starman.pid' }
will result in command line options
--port 123 --error-log /path/to/error.log --max-requests 100 --pid /path/to/starman.pid --daemonize --preload-app
Server::Control, Starman
This software is copyright (c) 2011 by Jonathan Swartz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Server::Control, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Server::Control
CPAN shell
perl -MCPAN -e shell install Server::Control
For more information on module installation, please visit the detailed CPAN module installation guide.