use strict;
use warnings;
-# -Debug activates the debug mode for very useful log messages
-# Static::Simple will serve static files from the root directory
+#
+# Set flags and add plugins for the application
+#
+# -Debug: activates the debug mode for very useful log messages
+# Static::Simple: will serve static files from the applications root directory
+#
use Catalyst qw/-Debug Static::Simple/;
our $VERSION = '0.01';
+#
# Configure the application
+#
__PACKAGE__->config( name => '[% name %]' );
+#
# Start the application
+#
__PACKAGE__->setup;
=head1 NAME
=cut
+#
# Output a friendly welcome message
+#
sub default : Private {
my ( $self, $c ) = @_;
$c->response->body( $c->welcome_message );
}
-# Uncomment and modify this end action after adding a View class
+#
+# Uncomment and modify this end action after adding a View component
+#
#=item end
#
#=cut
use FindBin;
use lib "$FindBin::Bin/../lib";
+my $debug = 0;
my $fork = 0;
my $help = 0;
my $host = undef;
my @argv = @ARGV;
GetOptions(
+ 'debug|d' => \$debug,
'fork' => \$fork,
'help|?' => \$help,
'host=s' => \$host,
if ( $restart ) {
$ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
}
+if ( $debug ) {
+ $ENV{CATALYST_DEBUG} = 1;
+}
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
=over 4
-# Uncomment, modify and add new actions to fit your needs
+#
+# Uncomment and modify this or add new actions to fit your needs
+#
#=item default
#
#=cut