1 use CatalystX::Declare;
5 # we consume a role that does what the RenderView action class
7 controller ::Controller::Root
8 with ::ControllerRole::RenderView {
10 # $CLASS is provided by CLASS.pm
11 $CLASS->config(namespace => '');
14 # this is the common root action for all other actions
15 action base under '/' as '';
17 # we group all our root actions under the common base
20 # this action catches /
21 final action root as '' {
23 $ctx->response->body( $ctx->welcome_message );
26 # this action takes all other /* parts. the (@) signature
27 # says we don't care about the arguments
28 final action not_found (@) as '' {
30 $ctx->response->body( 'Page Not Found' );
31 $ctx->response->status( 404 );