1 package Catalyst::Script::FastCGI;
3 BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
5 use MooseX::Types::Moose qw/Str Bool Int/;
6 use namespace::autoclean;
8 with 'Catalyst::ScriptRole';
10 has '+help' => (cmd_aliases => 'h');
13 traits => [qw(Getopt)],
17 documentation => 'Specify a listening port/socket',
21 traits => [qw(Getopt)],
25 documentation => 'Specify a pidfile',
29 traits => [qw(Getopt)],
33 documentation => 'Daemonize (go into the background)',
37 traits => [qw(Getopt)],
41 documentation => 'Use a different FastCGI process manager class',
45 traits => [qw(Getopt)],
49 documentation => 'Log STDERR',
53 traits => [qw(Getopt)],
57 documentation => 'Specify a number of child processes',
61 traits => [qw(Getopt)],
65 documentation => 'Detach this FastCGI process',
68 sub _application_args {
73 nproc => $self->nproc,
74 pidfile => $self->pidfile,
75 manager => $self->manager,
76 detach => $self->detach,
77 keep_stderr => $self->keeperr,
82 __PACKAGE__->meta->make_immutable;
86 Catalyst::Script::FastCGI - The FastCGI Catalyst Script
90 myapp_fastcgi.pl [options]
93 -? -help display this help and exits
94 -l -listen Socket path to listen on
95 (defaults to standard input)
96 can be HOST:PORT, :PORT or a
98 -n -nproc specify number of processes to keep
99 to serve requests (defaults to 1,
101 -p -pidfile specify filename for pid file
103 -d -daemon daemonize (requires -listen)
104 -M -manager specify alternate process manager
105 (FCGI::ProcManager sub-class)
106 or empty string to disable
107 -e -keeperr send error messages to STDOUT, not
112 Run a Catalyst application as fastcgi.
116 Catalyst Contributors, see Catalyst.pm
120 This library is free software. You can redistribute it and/or modify it under
121 the same terms as Perl itself.