sub update_blog_post { my ($self, $req, $ident) = @_; my $post = $self->blog_model->load( $ident ); unless ($post) { return $req->new_response( status => 404, content => 'Cannot find blog post ' . $ident, ); } ... }