X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FHelper.pm;h=0c3880077ddcd56ee9af9adb796b6a34fbd572a3;hb=1f9cb7c179c8e4077d99badf31f3a356efdc809c;hp=ceb0bef2370942e0bb9f84bf0cf97f54055f38ba;hpb=068bc70e4a7a72e32d6b3730d091d15e8a70077c;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Helper.pm b/lib/Catalyst/Helper.pm index ceb0bef..0c38800 100644 --- a/lib/Catalyst/Helper.pm +++ b/lib/Catalyst/Helper.pm @@ -752,6 +752,7 @@ use Pod::Usage; use FindBin; use lib "$FindBin::Bin/../lib"; +my $debug = 0; my $fork = 0; my $help = 0; my $host = undef; @@ -763,6 +764,7 @@ my $restart_regex = '\.yml$|\.yaml$|\.pm$'; my @argv = @ARGV; GetOptions( + 'debug|d' => \$debug, 'fork' => \$fork, 'help|?' => \$help, 'host=s' => \$host, @@ -777,6 +779,9 @@ pod2usage(1) if $help; if ( $restart ) { $ENV{CATALYST_ENGINE} = 'HTTP::Restarter'; } +if ( $debug ) { + $ENV{CATALYST_DEBUG} = 1; +} require [% name %]; @@ -799,6 +804,7 @@ require [% name %]; [% appprefix %]_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