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

index 4ee16f6..9d6c5f2 100644 (file)
@@ -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' );
 }