4 $ENV{CATALYST_ENGINE} ||= 'HTTP';
5 $ENV{CATALYST_SCRIPT_GEN} = 31;
6 require Catalyst::Engine::HTTP;
14 use lib "$FindBin::Bin/..";
23 my $restart_delay = 1;
24 my $restart_regex = '\.yml$|\.yaml$|\.pm$';
25 my $restart_directory = undef;
27 my $pidfile = "/tmp/testapp.pid";
37 'keepalive|k' => \$keepalive,
38 'restart|r' => \$restart,
39 'restartdelay|rd=s' => \$restart_delay,
40 'restartregex|rr=s' => \$restart_regex,
41 'restartdirectory=s' => \$restart_directory,
42 'daemon' => \$background,
43 'pidfile=s' => \$pidfile,
46 pod2usage(1) if $help;
49 $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
52 $ENV{CATALYST_DEBUG} = 1;
55 # This is require instead of use so that the above environment
56 # variables can be set at runtime.
59 TestApp->run( $port, $host, {
62 keepalive => $keepalive,
64 restart_delay => $restart_delay,
65 restart_regex => qr/$restart_regex/,
66 restart_directory => $restart_directory,
67 background => $background,
75 testapp_server.pl - Catalyst Testserver
79 testapp_server.pl [options]
82 -d -debug force debug mode
83 -f -fork handle each request in a new process
85 -? -help display this help and exits
86 -host host (defaults to all)
87 -p -port port (defaults to 3000)
88 -k -keepalive enable keep-alive connections
89 -r -restart restart when files get modified
91 -rd -restartdelay delay between file checks
92 -rr -restartregex regex match files that trigger
93 a restart when modified
94 (defaults to '\.yml$|\.yaml$|\.pm$')
95 -restartdirectory the directory to search for
99 -daemon background the server
100 -pidfile=filename store the pid if the server in filename, if
104 perldoc Catalyst::Manual
105 perldoc Catalyst::Manual::Intro
109 Run a Catalyst Testserver for this application.
113 Sebastian Riedel, C<sri@oook.de>
114 Maintained by the Catalyst Core Team.
118 This library is free software, you can redistribute it and/or modify
119 it under the same terms as Perl itself.