Catalyst-View-PDF-API2
view release on metacpan or search on metacpan
t/lib/script/testapp_server.pl view on Meta::CPAN
use Getopt::Long;
use Pod::Usage;
use FindBin;
use lib "$FindBin::Bin/../";
my $debug = 0;
my $fork = 0;
my $help = 0;
my $host = undef;
my $port = $ENV{TESTAPP_PORT} || $ENV{CATALYST_PORT} || 3000;
my $keepalive = 0;
my $restart = $ENV{TESTAPP_RELOAD} || $ENV{CATALYST_RELOAD} || 0;
my $background = 0;
my $pidfile = undef;
my $check_interval;
my $file_regex;
my $watch_directory;
my $follow_symlinks;
my @argv = @ARGV;
GetOptions(
'debug|d' => \$debug,
'fork|f' => \$fork,
'help|?' => \$help,
'host=s' => \$host,
'port|p=s' => \$port,
'keepalive|k' => \$keepalive,
'restart|r' => \$restart,
'restartdelay|rd=s' => \$check_interval,
'restartregex|rr=s' => \$file_regex,
'restartdirectory=s@' => \$watch_directory,
'followsymlinks' => \$follow_symlinks,
'background' => \$background,
'pidfile=s' => \$pidfile,
);
pod2usage(1) if $help;
t/lib/script/testapp_server.pl view on Meta::CPAN
my $runner = sub {
# This is require instead of use so that the above environment
# variables can be set at runtime.
require TestApp;
TestApp->run(
$port, $host,
{
argv => \@argv,
'fork' => $fork,
keepalive => $keepalive,
background => $background,
pidfile => $pidfile,
}
);
};
if ( $restart ) {
die "Cannot run in the background and also watch for changed files.\n"
if $background;
t/lib/script/testapp_server.pl view on Meta::CPAN
testapp_server.pl [options]
Options:
-d -debug force debug mode
-f -fork handle each request in a new process
(defaults to false)
-? -help display this help and exits
-host host (defaults to all)
-p -port port (defaults to 3000)
-k -keepalive enable keep-alive connections
-r -restart restart when files get modified
(defaults to false)
-rd -restartdelay delay between file checks
(ignored if you have Linux::Inotify2 installed)
-rr -restartregex regex match files that trigger
a restart when modified
(defaults to '\.yml$|\.yaml$|\.conf|\.pm$')
-restartdirectory the directory to search for
modified files, can be set mulitple times
(defaults to '[SCRIPT_DIR]/..')
( run in 1.034 second using v1.01-cache-2.11-cpan-39bf76dae61 )