NAME

Server::Control::Starman -- Control Starman

VERSION

version 0.20

SYNOPSIS

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();
}

DESCRIPTION

Server::Control::Starman is a subclass of Server::Control for Starman processes.

CONSTRUCTOR

In addition to the constructor options described in Server::Control:

app_psgi

Path to app.psgi; required.

options

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.

--daemonize and --preload-app are automatically passed to starman; the only current way to change this is by subclassing and overriding _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

SEE ALSO

Server::Control, Starman

COPYRIGHT AND LICENSE

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.