エントリを使う処理の書き方

sub capture_entry :Chained('/') :PathPart('') :CaptureArgs(1) {
    my ( $self, $c, $entry_id ) = @_;
    if (my $entry = $c->model('DB::Hoge')->find($entry_id)) {
        $c->stash->{entry} = $entry;
    } else {
        $c->stash->{template} = 'not_found.tt';
    }
}


sub jump_entry :Chained('capture_entry') :PathPart('jump') :Args(0) {
    my ( $self, $c ) = @_;
    my $entry = $c->stash->{entry};
# counterを1増やして更新
    $entry->counter($entry->counter + 1);
    $entry->update;
    $c->res->redirect($entry->url);