Commit | Line | Data |
239b5fc0 |
1 | package [% rootname %]; |
8662edf6 |
2 | use Moose; |
3 | use namespace::autoclean; |
239b5fc0 |
4 | |
8662edf6 |
5 | BEGIN { extends 'Catalyst::Controller' } |
239b5fc0 |
6 | |
7 | # |
8 | # Sets the actions in this controller to be registered with no prefix |
9 | # so they function identically to actions created in MyApp.pm |
10 | # |
3e5f7783 |
11 | __PACKAGE__->config(namespace => ''); |
239b5fc0 |
12 | |
13 | =head1 NAME |
14 | |
15 | [% rootname %] - Root Controller for [% name %] |
16 | |
17 | =head1 DESCRIPTION |
18 | |
19 | [enter your description here] |
20 | |
21 | =head1 METHODS |
22 | |
23 | =cut |
24 | |
25 | =head2 index |
26 | |
27 | =cut |
28 | |
29 | sub index :Path :Args(0) { |
30 | my ( $self, $c ) = @_; |
31 | |
32 | # Hello World |
33 | $c->response->body( $c->welcome_message ); |
34 | } |
35 | |
36 | sub default :Path { |
37 | my ( $self, $c ) = @_; |
38 | $c->response->body( 'Page not found' ); |
39 | $c->response->status(404); |
40 | } |
41 | |
42 | =head2 end |
43 | |
44 | Attempt to render a view, if needed. |
45 | |
46 | =cut |
47 | |
48 | sub end : ActionClass('RenderView') {} |
49 | |
50 | =head1 AUTHOR |
51 | |
52 | [% author %] |
53 | |
54 | =head1 LICENSE |
55 | |
56 | This library is free software. You can redistribute it and/or modify |
57 | it under the same terms as Perl itself. |
58 | |
59 | =cut |
60 | |
8662edf6 |
61 | __PACKAGE__->meta->make_immutable; |