| 1 | #!/usr/bin/env perl | ||
| 2 | # | ||
| 3 | # This file is part of Pod-Browser | ||
| 4 | # | ||
| 5 | # This software is Copyright (c) 2012 by Moritz Onken. | ||
| 6 | # | ||
| 7 | # This is free software, licensed under: | ||
| 8 | # | ||
| 9 | # The (three-clause) BSD License | ||
| 10 | # | ||
| 11 | # PODNAME: pod_browser_fastcgi.pl | ||
| 12 | BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } | ||
| 13 | |||
| 14 | use strict; | ||
| 15 | use warnings; | ||
| 16 | use Getopt::Long; | ||
| 17 | use Pod::Usage; | ||
| 18 | use FindBin; | ||
| 19 | use lib "$FindBin::Bin/../lib"; | ||
| 20 | use Pod::Browser; | ||
| 21 | |||
| 22 | my $help = 0; | ||
| 23 | my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr ); | ||
| 24 | |||
| 25 | GetOptions( | ||
| 26 | 'help|?' => \$help, | ||
| 27 | 'listen|l=s' => \$listen, | ||
| 28 | 'nproc|n=i' => \$nproc, | ||
| 29 | 'pidfile|p=s' => \$pidfile, | ||
| 30 | 'manager|M=s' => \$manager, | ||
| 31 | 'daemon|d' => \$detach, | ||
| 32 | 'keeperr|e' => \$keep_stderr, | ||
| 33 | ); | ||
| 34 | |||
| 35 | pod2usage(1) if $help; | ||
| 36 | |||
| 37 | Pod::Browser->run( | ||
| 38 | $listen, | ||
| 39 | { nproc => $nproc, | ||
| 40 | pidfile => $pidfile, | ||
| 41 | manager => $manager, | ||
| 42 | detach => $detach, | ||
| 43 | keep_stderr => $keep_stderr, | ||
| 44 | } | ||
| 45 | ); | ||
| 46 | |||
| 47 | 1; | ||
| 48 | |||
| 49 | |||
| 50 | __END__ |