Index: /trunk/Changes
===================================================================
--- /trunk/Changes	(revision 5)
+++ /trunk/Changes	(revision 5)
@@ -0,0 +1,4 @@
+This file documents the revision history for Perl extension Vote.
+
+0.01  2009-03-05 11:13:11
+        - initial revision, generated by Catalyst
Index: /trunk/Makefile.PL
===================================================================
--- /trunk/Makefile.PL	(revision 5)
+++ /trunk/Makefile.PL	(revision 5)
@@ -0,0 +1,16 @@
+use inc::Module::Install;
+
+name 'Vote';
+all_from 'lib/Vote.pm';
+
+requires 'Catalyst' => '5.7015';
+requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Static::Simple';
+requires 'Catalyst::Action::RenderView';
+requires 'YAML'; # This should reflect the config file format you've chosen
+                 # See Catalyst::Plugin::ConfigLoader for supported formats
+catalyst;
+
+install_script glob('script/*.pl');
+auto_install;
+WriteAll;
Index: /trunk/README
===================================================================
--- /trunk/README	(revision 5)
+++ /trunk/README	(revision 5)
@@ -0,0 +1,1 @@
+Run script/vote_server.pl to test the application.
Index: unk/Vote/Changes
===================================================================
--- /trunk/Vote/Changes	(revision 4)
+++ 	(revision )
@@ -1,4 +1,0 @@
-This file documents the revision history for Perl extension Vote.
-
-0.01  2009-03-05 11:13:11
-        - initial revision, generated by Catalyst
Index: unk/Vote/Makefile.PL
===================================================================
--- /trunk/Vote/Makefile.PL	(revision 4)
+++ 	(revision )
@@ -1,16 +1,0 @@
-use inc::Module::Install;
-
-name 'Vote';
-all_from 'lib/Vote.pm';
-
-requires 'Catalyst' => '5.7015';
-requires 'Catalyst::Plugin::ConfigLoader';
-requires 'Catalyst::Plugin::Static::Simple';
-requires 'Catalyst::Action::RenderView';
-requires 'YAML'; # This should reflect the config file format you've chosen
-                 # See Catalyst::Plugin::ConfigLoader for supported formats
-catalyst;
-
-install_script glob('script/*.pl');
-auto_install;
-WriteAll;
Index: unk/Vote/README
===================================================================
--- /trunk/Vote/README	(revision 4)
+++ 	(revision )
@@ -1,1 +1,0 @@
-Run script/vote_server.pl to test the application.
Index: unk/Vote/vote.yml.example
===================================================================
--- /trunk/Vote/vote.yml.example	(revision 4)
+++ 	(revision )
@@ -1,3 +1,0 @@
----
-name: Vote
-db: dbname=vote
Index: /trunk/lib/Vote.pm
===================================================================
--- /trunk/lib/Vote.pm	(revision 5)
+++ /trunk/lib/Vote.pm	(revision 5)
@@ -0,0 +1,62 @@
+package Vote;
+
+use strict;
+use warnings;
+
+use Catalyst::Runtime '5.70';
+
+# Set flags and add plugins for the application
+#
+#         -Debug: activates the debug mode for very useful log messages
+#   ConfigLoader: will load the configuration from a YAML file in the
+#                 application's home directory
+# Static::Simple: will serve static files from the application's root 
+#                 directory
+
+use Catalyst qw/-Debug ConfigLoader Static::Simple/;
+
+our $VERSION = '0.01';
+
+# Configure the application. 
+#
+# Note that settings in Vote.yml (or other external
+# configuration file that you set up manually) take precedence
+# over this when using ConfigLoader. Thus configuration
+# details given here can function as a default configuration,
+# with a external configuration file acting as an override for
+# local deployment.
+
+__PACKAGE__->config( name => 'Vote' );
+
+# Start the application
+__PACKAGE__->setup;
+
+
+=head1 NAME
+
+Vote - Catalyst based application
+
+=head1 SYNOPSIS
+
+    script/vote_server.pl
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 SEE ALSO
+
+L<Vote::Controller::Root>, L<Catalyst>
+
+=head1 AUTHOR
+
+Thauvin Olivier
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: /trunk/lib/Vote/Controller/Ballot.pm
===================================================================
--- /trunk/lib/Vote/Controller/Ballot.pm	(revision 5)
+++ /trunk/lib/Vote/Controller/Ballot.pm	(revision 5)
@@ -0,0 +1,42 @@
+package Vote::Controller::Ballot;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+Vote::Controller::Ballot - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub default : Private {
+    my ( $self, $c, undef, $id ) = @_;
+
+    $c->stash->{voteid} = $id;
+}
+
+
+=head1 AUTHOR
+
+Thauvin Olivier
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: /trunk/lib/Vote/Controller/Root.pm
===================================================================
--- /trunk/lib/Vote/Controller/Root.pm	(revision 5)
+++ /trunk/lib/Vote/Controller/Root.pm	(revision 5)
@@ -0,0 +1,53 @@
+package Vote::Controller::Root;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+#
+# Sets the actions in this controller to be registered with no prefix
+# so they function identically to actions created in MyApp.pm
+#
+__PACKAGE__->config->{namespace} = '';
+
+=head1 NAME
+
+Vote::Controller::Root - Root Controller for Vote
+
+=head1 DESCRIPTION
+
+[enter your description here]
+
+=head1 METHODS
+
+=cut
+
+=head2 default
+
+=cut
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+
+}
+
+=head2 end
+
+Attempt to render a view, if needed.
+
+=cut 
+
+sub end : ActionClass('RenderView') {}
+
+=head1 AUTHOR
+
+Thauvin Olivier
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: /trunk/lib/Vote/Controller/Vote.pm
===================================================================
--- /trunk/lib/Vote/Controller/Vote.pm	(revision 5)
+++ /trunk/lib/Vote/Controller/Vote.pm	(revision 5)
@@ -0,0 +1,47 @@
+package Vote::Controller::Vote;
+
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+=head1 NAME
+
+Vote::Controller::Vote - Catalyst Controller
+
+=head1 DESCRIPTION
+
+Catalyst Controller.
+
+=head1 METHODS
+
+=cut
+
+
+=head2 index 
+
+=cut
+
+sub index : Private {
+    my ( $self, $c ) = @_;
+
+    $c->response->body('Matched Vote::Controller::Vote in Vote.');
+}
+
+sub default : LocalPath {
+    my ( $self, $c, undef, $id ) = @_;
+
+    $c->stash->{voteid} = $id;
+}
+
+=head1 AUTHOR
+
+Thauvin Olivier
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: /trunk/lib/Vote/Model/Vote.pm
===================================================================
--- /trunk/lib/Vote/Model/Vote.pm	(revision 5)
+++ /trunk/lib/Vote/Model/Vote.pm	(revision 5)
@@ -0,0 +1,140 @@
+package Vote::Model::Vote;
+
+use strict;
+use warnings;
+use base 'Catalyst::Model';
+use DBI;
+
+=head1 NAME
+
+Vote::Model::Vote - Catalyst Model
+
+=head1 DESCRIPTION
+
+Catalyst Model.
+
+=cut
+
+sub new {
+    my ($class) = @_;
+    my $db = DBI->connect(
+        'dbi:Pg:' . Vote->config->{db},
+        undef, undef,
+        {
+            RaiseError => 0,
+            AutoCommit => 0,
+            PrintWarn => 0,
+            PrintError => 1,
+        }
+    ) or return;
+    
+    bless {
+        db => $db,
+    }, $class;
+}
+
+sub db { $_[0]->{db} }
+
+sub list_running_vote {
+    my ($self) = @_;
+
+    my $sth = $self->db->prepare_cached(
+        q{
+        select id from poll where start < now() and "end" > now()
+        }
+    );
+
+    $sth->execute;
+    my @id;
+    while(my $res = $sth->fetchrow_hashref) {
+        push(@id, $res->{id});
+    }
+
+    @id
+}
+
+sub vote_status {
+    my ($self, $id) = @_;
+    
+    my $sth = $self->db->prepare_cached(
+        q{
+        select start < now() as before
+               "end"   > now() as after
+        where id = ?
+        }
+    );
+    $sth->execute($id);
+    my $res = $sth->fetchrow_hashref;
+    $sth->finish;
+    $res or return;
+    if ($res->{before}) {
+        return 'BEFORE';
+    } elsif ($res->{after}) {
+        return 'AFTER';
+    } else {
+        return 'RUNNING';
+    }
+}
+
+sub vote_info {
+    my ($self, $id) = @_;
+
+    my $sth = $self->db->prepare_cached(
+        q{
+        select * from poll where id = ?
+        }
+    );
+
+    $sth->execute($id);
+    my $res = $sth->fetchrow_hashref;
+    $sth->finish;
+    $res
+}
+
+sub vote_signing {
+    my ($self, $id) = @_;
+
+    my $sth = $self->db->prepare_cached(
+        q{
+        select * from voting left join signing
+        on signing.key = voting.key
+        where poll = ? order by voting.id
+        }
+    );
+    $sth->execute($id);
+    my @people;
+    while (my $res = $sth->fetchrow_hashref) {
+        push(@people, $res);
+    }
+    @people
+}
+
+sub vote_choices {
+    my ($self, $id) = @_;
+
+    my $sth = $self->db->prepare_cached(
+        q{
+        select * from choice where poll = ?
+        order by label
+        }
+    );
+    $sth->execute($id);
+    my @ch;
+    while (my $res = $sth->fetchrow_hashref) {
+        push(@ch, $res);
+    }
+    @ch
+}
+
+=head1 AUTHOR
+
+Thauvin Olivier
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: /trunk/lib/Vote/View/TT.pm
===================================================================
--- /trunk/lib/Vote/View/TT.pm	(revision 5)
+++ /trunk/lib/Vote/View/TT.pm	(revision 5)
@@ -0,0 +1,36 @@
+package Vote::View::TT;
+
+use strict;
+use base 'Catalyst::View::TT';
+
+__PACKAGE__->config(
+    TEMPLATE_EXTENSION => '.tt',
+    INCLUDE_PATH => Vote->path_to( 'root', 'templates' ),
+    PRE_PROCESS => 'includes/header.tt',
+    POST_PROCESS => 'includes/footer.tt',
+);
+
+=head1 NAME
+
+Vote::View::TT - TT View for Vote
+
+=head1 DESCRIPTION
+
+TT View for Vote. 
+
+=head1 SEE ALSO
+
+L<Vote>
+
+=head1 AUTHOR
+
+Thauvin Olivier
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+
+1;
Index: /trunk/root/templates/default.tt
===================================================================
--- /trunk/root/templates/default.tt	(revision 5)
+++ /trunk/root/templates/default.tt	(revision 5)
@@ -0,0 +1,6 @@
+
+[% vote = c.model('Vote') %]
+
+[% FOREACH id = vote.list_running_vote %]
+<p><a href="[% c.uri_for( 'vote', id ) %]">[% vote.vote_info(id).label | html %]</a></p>
+[% END %]
Index: /trunk/root/templates/includes/footer.tt
===================================================================
--- /trunk/root/templates/includes/footer.tt	(revision 5)
+++ /trunk/root/templates/includes/footer.tt	(revision 5)
@@ -0,0 +1,3 @@
+
+</body>
+</html>
Index: /trunk/root/templates/includes/header.tt
===================================================================
--- /trunk/root/templates/includes/header.tt	(revision 5)
+++ /trunk/root/templates/includes/header.tt	(revision 5)
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>[% page.title %]</title>
+<link rel="stylesheet" href="[% c.uri_for('/static', 'sophie.css') %]" type="text/css">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="icon" href="[%- c.uri_for('/static', 'images', 'favicon.ico') -%]" type="image/x-icon">
+
+</head>
+<body>
+
Index: /trunk/script/vote_cgi.pl
===================================================================
--- /trunk/script/vote_cgi.pl	(revision 5)
+++ /trunk/script/vote_cgi.pl	(revision 5)
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Vote;
+
+Vote->run;
+
+1;
+
+=head1 NAME
+
+vote_cgi.pl - Catalyst CGI
+
+=head1 SYNOPSIS
+
+See L<Catalyst::Manual>
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as a cgi script.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+
+=head1 COPYRIGHT
+
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: /trunk/script/vote_create.pl
===================================================================
--- /trunk/script/vote_create.pl	(revision 5)
+++ /trunk/script/vote_create.pl	(revision 5)
@@ -0,0 +1,74 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use Catalyst::Helper;
+
+my $force = 0;
+my $mech  = 0;
+my $help  = 0;
+
+GetOptions(
+    'nonew|force'    => \$force,
+    'mech|mechanize' => \$mech,
+    'help|?'         => \$help
+ );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
+
+pod2usage(1) unless $helper->mk_component( 'Vote', @ARGV );
+
+1;
+
+=head1 NAME
+
+vote_create.pl - Create a new Catalyst Component
+
+=head1 SYNOPSIS
+
+vote_create.pl [options] model|view|controller name [helper] [options]
+
+ Options:
+   -force        don't create a .new file where a file to be created exists
+   -mechanize    use Test::WWW::Mechanize::Catalyst for tests if available
+   -help         display this help and exits
+
+ Examples:
+   vote_create.pl controller My::Controller
+   vote_create.pl -mechanize controller My::Controller
+   vote_create.pl view My::View
+   vote_create.pl view MyView TT
+   vote_create.pl view TT TT
+   vote_create.pl model My::Model
+   vote_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
+   dbi:SQLite:/tmp/my.db
+   vote_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
+   dbi:Pg:dbname=foo root 4321
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Create a new Catalyst Component.
+
+Existing component files are not overwritten.  If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: /trunk/script/vote_fastcgi.pl
===================================================================
--- /trunk/script/vote_fastcgi.pl	(revision 5)
+++ /trunk/script/vote_fastcgi.pl	(revision 5)
@@ -0,0 +1,80 @@
+#!/usr/bin/perl -w
+
+BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Vote;
+
+my $help = 0;
+my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
+ 
+GetOptions(
+    'help|?'      => \$help,
+    'listen|l=s'  => \$listen,
+    'nproc|n=i'   => \$nproc,
+    'pidfile|p=s' => \$pidfile,
+    'manager|M=s' => \$manager,
+    'daemon|d'    => \$detach,
+    'keeperr|e'   => \$keep_stderr,
+);
+
+pod2usage(1) if $help;
+
+Vote->run( 
+    $listen, 
+    {   nproc   => $nproc,
+        pidfile => $pidfile, 
+        manager => $manager,
+        detach  => $detach,
+	keep_stderr => $keep_stderr,
+    }
+);
+
+1;
+
+=head1 NAME
+
+vote_fastcgi.pl - Catalyst FastCGI
+
+=head1 SYNOPSIS
+
+vote_fastcgi.pl [options]
+ 
+ Options:
+   -? -help      display this help and exits
+   -l -listen    Socket path to listen on
+                 (defaults to standard input)
+                 can be HOST:PORT, :PORT or a
+                 filesystem path
+   -n -nproc     specify number of processes to keep
+                 to serve requests (defaults to 1,
+                 requires -listen)
+   -p -pidfile   specify filename for pid file
+                 (requires -listen)
+   -d -daemon    daemonize (requires -listen)
+   -M -manager   specify alternate process manager
+                 (FCGI::ProcManager sub-class)
+                 or empty string to disable
+   -e -keeperr   send error messages to STDOUT, not
+                 to the webserver
+
+=head1 DESCRIPTION
+
+Run a Catalyst application as fastcgi.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: /trunk/script/vote_server.pl
===================================================================
--- /trunk/script/vote_server.pl	(revision 5)
+++ /trunk/script/vote_server.pl	(revision 5)
@@ -0,0 +1,111 @@
+#!/usr/bin/perl -w
+
+BEGIN { 
+    $ENV{CATALYST_ENGINE} ||= 'HTTP';
+    $ENV{CATALYST_SCRIPT_GEN} = 30;
+    require Catalyst::Engine::HTTP;
+}  
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+
+my $debug             = 0;
+my $fork              = 0;
+my $help              = 0;
+my $host              = undef;
+my $port              = 3000;
+my $keepalive         = 0;
+my $restart           = 0;
+my $restart_delay     = 1;
+my $restart_regex     = '\.yml$|\.yaml$|\.pm$';
+my $restart_directory = undef;
+
+my @argv = @ARGV;
+
+GetOptions(
+    'debug|d'             => \$debug,
+    'fork'                => \$fork,
+    'help|?'              => \$help,
+    'host=s'              => \$host,
+    'port=s'              => \$port,
+    'keepalive|k'         => \$keepalive,
+    'restart|r'           => \$restart,
+    'restartdelay|rd=s'   => \$restart_delay,
+    'restartregex|rr=s'   => \$restart_regex,
+    'restartdirectory=s'  => \$restart_directory,
+);
+
+pod2usage(1) if $help;
+
+if ( $restart ) {
+    $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
+}
+if ( $debug ) {
+    $ENV{CATALYST_DEBUG} = 1;
+}
+
+# This is require instead of use so that the above environment
+# variables can be set at runtime.
+require Vote;
+
+Vote->run( $port, $host, {
+    argv              => \@argv,
+    'fork'            => $fork,
+    keepalive         => $keepalive,
+    restart           => $restart,
+    restart_delay     => $restart_delay,
+    restart_regex     => qr/$restart_regex/,
+    restart_directory => $restart_directory,
+} );
+
+1;
+
+=head1 NAME
+
+vote_server.pl - Catalyst Testserver
+
+=head1 SYNOPSIS
+
+vote_server.pl [options]
+
+ Options:
+   -d -debug          force debug mode
+   -f -fork           handle each request in a new process
+                      (defaults to false)
+   -? -help           display this help and exits
+      -host           host (defaults to all)
+   -p -port           port (defaults to 3000)
+   -k -keepalive      enable keep-alive connections
+   -r -restart        restart when files get modified
+                      (defaults to false)
+   -rd -restartdelay  delay between file checks
+   -rr -restartregex  regex match files that trigger
+                      a restart when modified
+                      (defaults to '\.yml$|\.yaml$|\.pm$')
+   -restartdirectory  the directory to search for
+                      modified files
+                      (defaults to '../')
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst Testserver for this application.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: /trunk/script/vote_test.pl
===================================================================
--- /trunk/script/vote_test.pl	(revision 5)
+++ /trunk/script/vote_test.pl	(revision 5)
@@ -0,0 +1,54 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Pod::Usage;
+use FindBin;
+use lib "$FindBin::Bin/../lib";
+use Catalyst::Test 'Vote';
+
+my $help = 0;
+
+GetOptions( 'help|?' => \$help );
+
+pod2usage(1) if ( $help || !$ARGV[0] );
+
+print request($ARGV[0])->content . "\n";
+
+1;
+
+=head1 NAME
+
+vote_test.pl - Catalyst Test
+
+=head1 SYNOPSIS
+
+vote_test.pl [options] uri
+
+ Options:
+   -help    display this help and exits
+
+ Examples:
+   vote_test.pl http://localhost/some_action
+   vote_test.pl /some_action
+
+ See also:
+   perldoc Catalyst::Manual
+   perldoc Catalyst::Manual::Intro
+
+=head1 DESCRIPTION
+
+Run a Catalyst action from the command line.
+
+=head1 AUTHOR
+
+Sebastian Riedel, C<sri@oook.de>
+Maintained by the Catalyst Core Team.
+
+=head1 COPYRIGHT
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
Index: /trunk/t/01app.t
===================================================================
--- /trunk/t/01app.t	(revision 5)
+++ /trunk/t/01app.t	(revision 5)
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+BEGIN { use_ok 'Catalyst::Test', 'Vote' }
+
+ok( request('/')->is_success, 'Request should succeed' );
Index: /trunk/t/02pod.t
===================================================================
--- /trunk/t/02pod.t	(revision 5)
+++ /trunk/t/02pod.t	(revision 5)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod 1.14";
+plan skip_all => 'Test::Pod 1.14 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_files_ok();
Index: /trunk/t/03podcoverage.t
===================================================================
--- /trunk/t/03podcoverage.t	(revision 5)
+++ /trunk/t/03podcoverage.t	(revision 5)
@@ -0,0 +1,9 @@
+use strict;
+use warnings;
+use Test::More;
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
+plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
+
+all_pod_coverage_ok();
Index: /trunk/t/controller_Ballot.t
===================================================================
--- /trunk/t/controller_Ballot.t	(revision 5)
+++ /trunk/t/controller_Ballot.t	(revision 5)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'Vote' }
+BEGIN { use_ok 'Vote::Controller::Ballot' }
+
+ok( request('/ballot')->is_success, 'Request should succeed' );
+
+
Index: /trunk/t/controller_Vote.t
===================================================================
--- /trunk/t/controller_Vote.t	(revision 5)
+++ /trunk/t/controller_Vote.t	(revision 5)
@@ -0,0 +1,10 @@
+use strict;
+use warnings;
+use Test::More tests => 3;
+
+BEGIN { use_ok 'Catalyst::Test', 'Vote' }
+BEGIN { use_ok 'Vote::Controller::Vote' }
+
+ok( request('/vote')->is_success, 'Request should succeed' );
+
+
Index: /trunk/t/model_Vote.t
===================================================================
--- /trunk/t/model_Vote.t	(revision 5)
+++ /trunk/t/model_Vote.t	(revision 5)
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'Vote::Model::Vote' }
+
Index: /trunk/t/view_TT.t
===================================================================
--- /trunk/t/view_TT.t	(revision 5)
+++ /trunk/t/view_TT.t	(revision 5)
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'Vote::View::TT' }
+
Index: /trunk/vote.yml.example
===================================================================
--- /trunk/vote.yml.example	(revision 5)
+++ /trunk/vote.yml.example	(revision 5)
@@ -0,0 +1,3 @@
+---
+name: Vote
+db: dbname=vote
