1 package [% appprefix %]::Script::Server;
3 use Catalyst::Engine::HTTP;
9 has argv => ( isa => 'ArrayRef', is => 'ro', required => 1 );
10 has [qw/ fork background keepalive /] => ( isa => 'Bool', is => 'ro', required => 1, default => 0 );
11 has pidfile => ( isa => 'Str', required => 0, is => 'ro' );
19 'fork' => $self->fork,
20 keepalive => $self->keepalive,
21 background => $self->background,
22 pidfile => $self->pidfile,
29 __PACKAGE__->new_with_options->run;
37 [% appprefix %]_server.pl - Catalyst Testserver
41 [% appprefix %]_server.pl [options]
44 -d -debug force debug mode
45 -f -fork handle each request in a new process
47 -? -help display this help and exits
48 -host host (defaults to all)
49 -p -port port (defaults to 3000)
50 -k -keepalive enable keep-alive connections
51 -r -restart restart when files get modified
53 -rd -restartdelay delay between file checks
54 (ignored if you have Linux::Inotify2 installed)
55 -rr -restartregex regex match files that trigger
56 a restart when modified
57 (defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
58 -restartdirectory the directory to search for
59 modified files, can be set mulitple times
60 (defaults to '[SCRIPT_DIR]/..')
61 -follow_symlinks follow symlinks in search directories
62 (defaults to false. this is a no-op on Win32)
63 -background run the process in the background
64 -pidfile specify filename for pid file
67 perldoc Catalyst::Manual
68 perldoc Catalyst::Manual::Intro
72 Run a Catalyst Testserver for this application.
76 Catalyst Contributors, see Catalyst.pm
80 This library is free software. You can redistribute it and/or modify
81 it under the same terms as Perl itself.