1 package [% rootname %];
3 use namespace::autoclean;
5 BEGIN { extends 'Catalyst::Controller' }
8 # Sets the actions in this controller to be registered with no prefix
9 # so they function identically to actions created in MyApp.pm
11 __PACKAGE__->config(namespace => '');
15 [% rootname %] - Root Controller for [% name %]
19 [enter your description here]
25 The root of the chain, offers flexibility to the below actions depending on
26 whether / has an argument (sub default) or not (sub index).
30 sub base :Chained('/') PathPart('') CaptureArgs(0) {
31 # Intentionally blank but you might want to do something here.
36 The root page (/) of the site.
40 sub index :Chained('/base') PathPart('') Args(0) {
41 my ( $self, $c ) = @_;
44 $c->response->body( $c->welcome_message );
49 Standard 404 error page
53 sub default : Chained('/base') PathPart('') Args {
54 my ( $self, $c ) = @_;
55 $c->response->body( 'Page not found' );
56 $c->response->status(404);
61 Attempt to render a view, if needed.
65 sub end : ActionClass('RenderView') {}
73 This library is free software. You can redistribute it and/or modify
74 it under the same terms as Perl itself.
78 __PACKAGE__->meta->make_immutable;