| Vote documentation | Contained in the Vote distribution. |
Vote::Controller::Vote - Catalyst Controller
Catalyst Controller.
Thauvin Olivier
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself or CeCILL.
| Vote documentation | Contained in the Vote distribution. |
package Vote::Controller::Vote; use strict; use warnings; use base 'Catalyst::Controller';
sub begin : Private { my ( $self, $c ) = @_; $c->model('Vote')->db->rollback; } sub index : Private { my ( $self, $c ) = @_; $c->redirect($c->uri_for('/')); } sub default : LocalPath { my ( $self, $c, undef, $id ) = @_; $c->stash->{voteid} = $id; $c->stash->{page}{title} = 'Vote: ' . $c->model('Vote')->vote_info($id)->{label}; }
1;