source: trunk/lib/Vote/Controller/Root.pm @ 53

Last change on this file since 53 was 53, checked in by nanardon, 15 years ago
  • rollback database before doing anything
File size: 894 bytes
Line 
1package Vote::Controller::Root;
2
3use strict;
4use warnings;
5use base 'Catalyst::Controller';
6
7#
8# Sets the actions in this controller to be registered with no prefix
9# so they function identically to actions created in MyApp.pm
10#
11__PACKAGE__->config->{namespace} = '';
12
13=head1 NAME
14
15Vote::Controller::Root - Root Controller for Vote
16
17=head1 DESCRIPTION
18
19[enter your description here]
20
21=head1 METHODS
22
23=cut
24
25=head2 default
26
27=cut
28
29sub begin : Private {
30    my ( $self, $c ) = @_;
31    $c->model('Vote')->db->rollback;
32}
33
34sub default : Private {
35    my ( $self, $c ) = @_;
36
37    $c->stash->{page}{title} = 'Epoll ' . $Vote::VERSION;
38}
39
40=head2 end
41
42Attempt to render a view, if needed.
43
44=cut 
45
46sub end : ActionClass('RenderView') {}
47
48=head1 AUTHOR
49
50Thauvin Olivier
51
52=head1 LICENSE
53
54This library is free software, you can redistribute it and/or modify
55it under the same terms as Perl itself.
56
57=cut
58
591;
Note: See TracBrowser for help on using the repository browser.