1 #!/Users/fj/perl-bin/bin/perl -w
4 $ENV{CATALYST_ENGINE} ||= 'HTTP';
5 $ENV{CATALYST_SCRIPT_GEN} = 31;
6 require Catalyst::Engine::HTTP;
14 use lib "$FindBin::Bin/../lib";
20 my $port = $ENV{LOLCATALYST_LITE_PORT} || $ENV{CATALYST_PORT} || 3000;
22 my $restart = $ENV{LOLCATALYST_LITE_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
23 my $restart_delay = 1;
24 my $restart_regex = '(?:/|^)(?!\.#).+(?:\.yml$|\.yaml$|\.conf|\.pm)$';
25 my $restart_directory = undef;
26 my $follow_symlinks = 0;
36 'keepalive|k' => \$keepalive,
37 'restart|r' => \$restart,
38 'restartdelay|rd=s' => \$restart_delay,
39 'restartregex|rr=s' => \$restart_regex,
40 'restartdirectory=s@' => \$restart_directory,
41 'followsymlinks' => \$follow_symlinks,
44 pod2usage(1) if $help;
46 if ( $restart && $ENV{CATALYST_ENGINE} eq 'HTTP' ) {
47 $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
50 $ENV{CATALYST_DEBUG} = 1;
53 # This is require instead of use so that the above environment
54 # variables can be set at runtime.
55 require LolCatalyst::Lite;
57 LolCatalyst::Lite->run( $port, $host, {
60 keepalive => $keepalive,
62 restart_delay => $restart_delay,
63 restart_regex => qr/$restart_regex/,
64 restart_directory => $restart_directory,
65 follow_symlinks => $follow_symlinks,
72 lolcatalyst_lite_server.pl - Catalyst Testserver
76 lolcatalyst_lite_server.pl [options]
79 -d -debug force debug mode
80 -f -fork handle each request in a new process
82 -? -help display this help and exits
83 -host host (defaults to all)
84 -p -port port (defaults to 3000)
85 -k -keepalive enable keep-alive connections
86 -r -restart restart when files get modified
88 -rd -restartdelay delay between file checks
89 -rr -restartregex regex match files that trigger
90 a restart when modified
91 (defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
92 -restartdirectory the directory to search for
93 modified files, can be set mulitple times
94 (defaults to '[SCRIPT_DIR]/..')
95 -follow_symlinks follow symlinks in search directories
96 (defaults to false. this is a no-op on Win32)
98 perldoc Catalyst::Manual
99 perldoc Catalyst::Manual::Intro
103 Run a Catalyst Testserver for this application.
107 Catalyst Contributors, see Catalyst.pm
111 This library is free software, you can redistribute it and/or modify
112 it under the same terms as Perl itself.