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';
11 traits => [qw(Getopt)],
15 documentation => 'Specify a listening port/socket',
19 traits => [qw(Getopt)],
20 cmd_aliases => [qw/pid p/],
23 documentation => 'Specify a pidfile',
27 traits => [qw(Getopt)],
30 cmd_aliases => [qw/d detach/], # Eww, detach is here as we fucked it up.. Deliberately not documented
31 documentation => 'Daemonize (go into the background)',
35 traits => [qw(Getopt)],
39 documentation => 'Use a different FastCGI process manager class',
43 traits => [qw(Getopt)],
47 documentation => 'Log STDERR',
51 traits => [qw(Getopt)],
55 documentation => 'Specify a number of child processes',
59 traits => [qw(Getopt)],
63 documentation => 'Set the process title',
66 sub _application_args {
71 nproc => $self->nproc,
72 pidfile => $self->pidfile,
73 manager => $self->manager,
74 detach => $self->daemon,
75 keep_stderr => $self->keeperr,
76 title => $self->title,
81 __PACKAGE__->meta->make_immutable;
85 Catalyst::Script::FastCGI - The FastCGI Catalyst Script
89 myapp_fastcgi.pl [options]
92 -? --help display this help and exits
93 -l --listen Socket path to listen on
94 (defaults to standard input)
95 can be HOST:PORT, :PORT or a
97 -n --nproc specify number of processes to keep
98 to serve requests (defaults to 1,
100 -p --pidfile specify filename for pid file
102 -d --daemon daemonize (requires -listen)
103 -M --manager specify alternate process manager
104 (FCGI::ProcManager sub-class)
105 or empty string to disable
106 -e --keeperr send error messages to STDOUT, not
108 -t --title set the process title
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.