Skip to content

Instantly share code, notes, and snippets.

@diegok
Created June 25, 2012 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diegok/2989425 to your computer and use it in GitHub Desktop.
Save diegok/2989425 to your computer and use it in GitHub Desktop.
Example usage of render_not_found().
get '/post/:slug' => sub {
my $self = shift;
my $post = $self->db->posts->find_by_slug( $self->stash('slug') );
return $self->render_not_found unless $post;
# ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment