Catalyst Introducing Catalyst #46

Editing: process form submission

sub create_POST {
    my ($self, $c) = @_;
    $c->stash->{page}->new_revision(
        $c->user->id,
        $c->req->params->{new_content},
    );
    my $name = $c->stash->{page_name};
    $c->response->redirect(
        $c->uri_for("/wiki/$name/latest")
    );
}
""