projects
/
catagits/catbook-code.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
c97448d
)
create error_404 action and switch default to use it
Matt S Trout [Sat, 7 Mar 2009 21:07:28 +0000 (16:07 -0500)]
lib/LolCatalyst/Lite/Controller/Root.pm
patch
|
blob
|
blame
|
history
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' );
}