[Catalyst] How to manage error 404

Chisel Wright chisel at herlpacker.co.uk
Tue Jun 28 12:02:18 CEST 2005


On Tue, Jun 28, 2005 at 11:52:23AM +0200, Albert Vila wrote:
> I've I do this, how can I serve the default http://localhost:3000 ?
> 
> >sub default : Private {
> >   my ( $self, $c ) = @_;
> >	# use the default 404 page for the server
> >   $c->res->status(404);
> >	# make sure we have no action
> >   $c->req->action(undef);
> >}

 sub default : Private {
  my ( $self, $c ) = @_;

  if ($c->req->action eq 'default') {
   $c->forward($whatever);
  }

  $c->res->status(404);
  $c->req->action(undef);
 }

perhaps?

Chisel
-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/



More information about the Catalyst mailing list