1 |
#!/usr/bin/perl -w |
2 |
|
3 |
BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } |
4 |
|
5 |
use strict; |
6 |
use Getopt::Long; |
7 |
use Pod::Usage; |
8 |
use FindBin; |
9 |
use lib "$FindBin::Bin/../lib"; |
10 |
use Webpacus; |
11 |
|
12 |
my $help = 0; |
13 |
my ( $listen, $nproc, $pidfile ); |
14 |
|
15 |
GetOptions( |
16 |
'help|?' => \$help, |
17 |
'listen|l=s' => \$listen, |
18 |
'nproc|n=i' => \$nproc, |
19 |
'pidfile|p=s' => \$pidfile, |
20 |
); |
21 |
|
22 |
pod2usage(1) if $help; |
23 |
|
24 |
Webpacus->run( |
25 |
$listen, |
26 |
{ nproc => $nproc, |
27 |
pidfile => $pidfile, |
28 |
} |
29 |
); |
30 |
|
31 |
1; |
32 |
|
33 |
=head1 NAME |
34 |
|
35 |
webpacus_fastcgi.pl - Catalyst FastCGI |
36 |
|
37 |
=head1 SYNOPSIS |
38 |
|
39 |
webpacus_fastcgi.pl [options] |
40 |
|
41 |
Options: |
42 |
-? -help display this help and exits |
43 |
-l -listen Socket path to listen on |
44 |
(defaults to standard input) |
45 |
can be HOST:PORT, :PORT or a |
46 |
filesystem path |
47 |
-n -nproc specify number of processes to keep |
48 |
to serve requests (defaults to 1, |
49 |
requires -listen) |
50 |
-p -pidfile specify filename for pid file |
51 |
(requires -listen) |
52 |
|
53 |
=head1 DESCRIPTION |
54 |
|
55 |
Run a Catalyst application as fastcgi. |
56 |
|
57 |
=head1 AUTHOR |
58 |
|
59 |
Sebastian Riedel, C<sri@oook.de> |
60 |
|
61 |
=head1 COPYRIGHT |
62 |
|
63 |
Copyright 2004 Sebastian Riedel. All rights reserved. |
64 |
|
65 |
This library is free software, you can redistribute it and/or modify |
66 |
it under the same terms as Perl itself. |
67 |
|
68 |
=cut |