projects
/
catagits/catbook-code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
create error_404 action and switch default to use it
[catagits/catbook-code.git]
/
lib
/
LolCatalyst
/
Lite
/
Controller
/
Root.pm
diff --git
a/lib/LolCatalyst/Lite/Controller/Root.pm
b/lib/LolCatalyst/Lite/Controller/Root.pm
index
4ee16f6
..
9d6c5f2
100644
(file)
--- a/
lib/LolCatalyst/Lite/Controller/Root.pm
+++ b/
lib/LolCatalyst/Lite/Controller/Root.pm
@@
-12,6
+12,11
@@
sub index :Path :Args(0) {
sub default :Path {
my ( $self, $c ) = @_;
+ $c->detach('/error_404');
+}
+
+sub error_404 :Private {
+ my ( $self, $c ) = @_;
$c->response->status(404);
$c->response->body( 'Page not found' );
}