| 1 | # | ||
| 2 | # This file is part of CatalystX-ExtJS | ||
| 3 | # | ||
| 4 | # This software is Copyright (c) 2011 by Moritz Onken. | ||
| 5 | # | ||
| 6 | # This is free software, licensed under: | ||
| 7 | # | ||
| 8 | # The (three-clause) BSD License | ||
| 9 | # | ||
| 10 | package MyApp::Controller::Root; | ||
| 11 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | ▶ | BEGIN { extends 'Catalyst::Controller' } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | # | ||
| 17 | # Sets the actions in this controller to be registered with no prefix | ||
| 18 | # so they function identically to actions created in MyApp.pm | ||
| 19 | # | ||
| 20 | 1 | __PACKAGE__->config(namespace => ''); | |
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | MyApp::Controller::Root - Root Controller for MyApp | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | [enter your description here] | ||
| 29 | |||
| 30 | =head1 METHODS | ||
| 31 | |||
| 32 | =head2 index | ||
| 33 | |||
| 34 | The root page (/) | ||
| 35 | |||
| 36 | =cut | ||
| 37 | |||
| 38 | 1 | ▶ | sub index :Path :Args(0) { } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
index: called CC=1 SCAR=0.0
Pod
documented
| |||
| 39 | |||
| 40 | =head2 default | ||
| 41 | |||
| 42 | Standard 404 error page | ||
| 43 | |||
| 44 | =cut | ||
| 45 | |||
| 46 | 0 | ▶ | sub default :Path { |
|
Subroutine
default: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 47 | 0 | my ( $self, $c ) = @_; | |
| 48 | 0 | $c->response->body( 'Page not found' ); | |
| 49 | 0 | $c->response->status(404); | |
| 50 | 1 | ▶ | } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 51 | |||
| 52 | =head2 end | ||
| 53 | |||
| 54 | Attempt to render a view, if needed. | ||
| 55 | |||
| 56 | =cut | ||
| 57 | |||
| 58 | 1 | ▶ | sub end : ActionClass('RenderView') {} |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
end: called CC=1 SCAR=0.0
Pod
documented
| |||
| 59 | |||
| 60 | =head1 AUTHOR | ||
| 61 | |||
| 62 | Catalyst developer | ||
| 63 | |||
| 64 | =head1 LICENSE | ||
| 65 | |||
| 66 | This library is free software. You can redistribute it and/or modify | ||
| 67 | it under the same terms as Perl itself. | ||
| 68 | |||
| 69 | =cut | ||
| 70 | |||
| 71 | 1 | __PACKAGE__->meta->make_immutable; | |
| 72 | |||
| 73 | 1 | 1; | |