blob: b61650f79ea3217d252f8d2f31af2444bfb293c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
package FixMyStreet::App::Controller::Root;
use Moose;
use namespace::autoclean;
BEGIN { extends 'Catalyst::Controller' }
__PACKAGE__->config( namespace => '' );
=head1 NAME
FixMyStreet::App::Controller::Root - Root Controller for FixMyStreet::App
=head1 DESCRIPTION
[enter your description here]
=head1 METHODS
=head2 auto
Set up general things for this instance
=cut
sub auto {
my ( $self, $c ) = @_;
return;
}
=head2 index
The root page (/)
=cut
sub index : Path : Args(0) {
my ( $self, $c ) = @_;
# Hello World
$c->response->body( $c->welcome_message );
}
=head2 default
Forward to the standard 404 error page
=cut
sub default : Path {
my ( $self, $c ) = @_;
$c->detach('/page_not_found');
}
=head2 page_not_found
$c->detach('/page_not_found');
Display a 404 page.
=cut
sub page_not_found : Private {
my ( $self, $c ) = @_;
$c->stash->{template} = 'errors/page_not_found.html';
$c->response->status(404);
}
=head2 end
Attempt to render a view, if needed.
=cut
sub end : ActionClass('RenderView') {
}
__PACKAGE__->meta->make_immutable;
1;
|