X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=share%2Flib%2FMyApp.pm.tt;h=c581743b63aaf79ba645cbbd5c1261848dc90092;hb=51b186e7616441b554dc5cb5080a6256ddc7021f;hp=cb2a7b71377da287c1d0d8693ac738fc4631af45;hpb=d69c7437c4a02a77b29017fbc4b0fc9c158dd8b7;p=catagits%2FCatalyst-Devel.git diff --git a/share/lib/MyApp.pm.tt b/share/lib/MyApp.pm.tt index cb2a7b7..c581743 100644 --- a/share/lib/MyApp.pm.tt +++ b/share/lib/MyApp.pm.tt @@ -1,11 +1,14 @@ package [% name %]; - -use strict; -use warnings; +use Moose; +use namespace::autoclean; use Catalyst::Runtime 5.80; -# Set flags and add plugins for the application +# Set flags and add plugins for the application. +# +# Note that ORDERING IS IMPORTANT here as plugins are initialized in order, +# therefore you almost certainly want to keep ConfigLoader at the head of the +# list if you're using it. # # -Debug: activates the debug mode for very useful log messages # ConfigLoader: will load the configuration from a Config::General file in the @@ -13,10 +16,14 @@ use Catalyst::Runtime 5.80; # Static::Simple: will serve static files from the application's root # directory -use parent qw/Catalyst/; -use Catalyst qw/-Debug - ConfigLoader - Static::Simple/; +use Catalyst qw/ + -Debug + ConfigLoader + Static::Simple +/; + +extends 'Catalyst'; + our $VERSION = '0.01'; # Configure the application. @@ -28,7 +35,12 @@ our $VERSION = '0.01'; # with an external configuration file acting as an override for # local deployment. -__PACKAGE__->config( name => '[% name %]' ); +__PACKAGE__->config( + name => '[% name %]', + # Disable deprecated behavior needed by old applications + disable_component_resolution_regex_fallback => 1, + enable_catalyst_header => 1, # Send X-Catalyst header +); # Start the application __PACKAGE__->setup();