Changeset 242


Ignore:
Timestamp:
06/13/09 15:27:17 (15 years ago)
Author:
nanardon
Message:
  • rename Vote module to Epoll (#16)
Location:
trunk
Files:
6 deleted
18 edited
10 copied
11 moved

Legend:

Unmodified
Added
Removed
  • trunk/MANIFEST

    r219 r242  
    1616inc/Module/Install/Win32.pm 
    1717inc/Module/Install/WriteAll.pm 
    18 lib/Vote.pm 
    19 lib/Vote/Controller/Admin.pm 
    20 lib/Vote/Controller/Ballot.pm 
    21 lib/Vote/Controller/Newpoll.pm 
    22 lib/Vote/Controller/Root.pm 
    23 lib/Vote/Controller/Vote.pm 
    24 lib/Vote/DB.pm 
    25 lib/Vote/DB/common.pm 
    26 lib/Vote/DB/Poll.pm 
    27 lib/Vote/DB/Poll/Results.pm 
    28 lib/Vote/DB/Poll/Bdata.pm 
    29 lib/Vote/DB/Voting.pm 
    30 lib/Vote/DB/Ballot.pm 
    31 lib/Vote/DB/Choice.pm 
    32 lib/Vote/Model/Vote.pm 
    33 lib/Vote/Template/Plugin/Mail.pm 
    34 lib/Vote/View/Mail.pm 
    35 lib/Vote/View/TT.pm 
    36 lib/Vote/View/Latex.pm 
     18lib/Epoll.pm 
     19lib/Epoll/Controller/Admin.pm 
     20lib/Epoll/Controller/Ballot.pm 
     21lib/Epoll/Controller/Newpoll.pm 
     22lib/Epoll/Controller/Root.pm 
     23lib/Epoll/Controller/Vote.pm 
     24lib/Epoll/DB.pm 
     25lib/Epoll/DB/common.pm 
     26lib/Epoll/DB/Poll.pm 
     27lib/Epoll/DB/Poll/Results.pm 
     28lib/Epoll/DB/Poll/Bdata.pm 
     29lib/Epoll/DB/Voting.pm 
     30lib/Epoll/DB/Ballot.pm 
     31lib/Epoll/DB/Choice.pm 
     32lib/Epoll/Model/Vote.pm 
     33lib/Epoll/Template/Plugin/Mail.pm 
     34lib/Epoll/View/Mail.pm 
     35lib/Epoll/View/TT.pm 
     36lib/Epoll/View/Latex.pm 
    3737Makefile.PL 
    3838MANIFEST                        This list of files 
     
    9797root/templates/newpoll/request.tt 
    9898root/templates/vote/default.tt 
    99 script/vote_cgi.pl 
    100 script/vote_create.pl 
    101 script/vote_fastcgi.pl 
    102 script/vote_server.pl 
    103 script/vote_test.pl 
     99script/epoll_cgi.pl 
     100script/epoll_create.pl 
     101script/epoll_fastcgi.pl 
     102script/epoll_server.pl 
     103script/epoll_test.pl 
    104104sql/postgres.dump 
    105105t/01app.t 
    106106t/02pod.t 
    107107t/03podcoverage.t 
    108 t/10Vote_DB.t 
    109 t/11Vote_DB_crypted.t 
    110 t/20Vote_Web.t 
     108t/10Epoll_DB.t 
     109t/11Epoll_DB_crypted.t 
     110t/20Epoll_Web.t 
    111111t/controller_Admin.t 
    112112t/controller_Ballot.t 
    113113t/controller_Newpoll.t 
    114 t/controller_Vote.t 
    115 t/model_Vote.t 
     114t/controller_Epoll.t 
     115t/model_Epoll.t 
    116116t/view_Mail.t 
    117117t/view_TT.t 
  • trunk/Makefile.PL

    r240 r242  
    11use inc::Module::Install; 
    22 
    3 name 'Vote'; 
    4 all_from 'lib/Vote/DB.pm'; 
     3name 'Epoll'; 
     4all_from 'lib/Epoll/DB.pm'; 
    55 
    66requires 'Catalyst' => '5.7015'; 
     
    88requires 'Catalyst::Plugin::Static::Simple'; 
    99requires 'Catalyst::Action::RenderView'; 
     10requires 'Catalyst::Plugin::Session::State::Cookie'; 
     11requires 'Catalyst::Plugin::Session::Store::DBI'; 
     12requires 'Catalyst::Plugin::Static::Simple'; 
     13requires 'Catalyst::Plugin::ConfigLoader'; 
     14requires 'Catalyst::View::TT'; 
    1015 
    1116requires 'YAML'; # This should reflect the config file format you've chosen 
     
    1823requires 'Crypt::RSA'; 
    1924requires 'DBI'; 
     25requires 'DBD::Pg'; 
    2026requires 'MIME::Base64'; 
    2127requires 'Mail::Mailer'; 
  • trunk/lib/Epoll.pm

    r213 r242  
    1 package Vote; 
     1package Epoll; 
    22 
    33use strict; 
     
    3232# local deployment. 
    3333 
    34 __PACKAGE__->config( name => 'Vote' ); 
     34__PACKAGE__->config( name => 'Epoll' ); 
    3535 
    3636# Config file, in tree, else should be in /etc 
  • trunk/lib/Epoll/Controller/Admin.pm

    r229 r242  
    1 package Vote::Controller::Admin; 
     1package Epoll::Controller::Admin; 
    22 
    33use strict; 
     
    77=head1 NAME 
    88 
    9 Vote::Controller::Admin - Catalyst Controller 
     9Epoll::Controller::Admin - Catalyst Controller 
    1010 
    1111=head1 DESCRIPTION 
     
    106106                my $pass = $voting->gen_passwd; 
    107107                $c->forward( 
    108                     q'Vote::View::Mail', 'render', 
     108                    q'Epoll::View::Mail', 'render', 
    109109                    [ 'voting_passwd.tt', { 
    110110                        From => $poll->info->{owner}, 
     
    233233    my ($self, $c) = @_; 
    234234    if ($c->res->body) { return } 
    235     elsif ($c->stash->{latex}) { $c->forward(qw/Vote::View::Latex/) } 
    236     else { $c->forward(qw/Vote::View::TT/) } 
     235    elsif ($c->stash->{latex}) { $c->forward(qw/Epoll::View::Latex/) } 
     236    else { $c->forward(qw/Epoll::View::TT/) } 
    237237} 
    238238 
  • trunk/lib/Epoll/Controller/Ballot.pm

    r221 r242  
    1 package Vote::Controller::Ballot; 
     1package Epoll::Controller::Ballot; 
    22 
    33use strict; 
     
    77=head1 NAME 
    88 
    9 Vote::Controller::Ballot - Catalyst Controller 
     9Epoll::Controller::Ballot - Catalyst Controller 
    1010 
    1111=head1 DESCRIPTION 
     
    123123        ); # TODO trap error 
    124124        $c->forward( 
    125             q'Vote::View::Mail', 'render', 
     125            q'Epoll::View::Mail', 'render', 
    126126            [ 'ballot_confirm.tt', { 
    127127                From => $mail, 
     
    136136 
    137137        $c->stash->{template} = 'ballot/done.tt'; 
    138         $c->delete_session('Vote terminé'); 
     138        $c->delete_session('Epoll terminé'); 
    139139    } 
    140140} 
     
    143143    my ($self, $c) = @_; 
    144144    if ($c->res->body) { return } 
    145     else { $c->forward(qw/Vote::View::TT/) } 
     145    else { $c->forward(qw/Epoll::View::TT/) } 
    146146} 
    147147 
  • trunk/lib/Epoll/Controller/Newpoll.pm

    r226 r242  
    1 package Vote::Controller::Newpoll; 
     1package Epoll::Controller::Newpoll; 
    22 
    33use strict; 
     
    77=head1 NAME 
    88 
    9 Vote::Controller::Newpoll - Catalyst Controller 
     9Epoll::Controller::Newpoll - Catalyst Controller 
    1010 
    1111=head1 DESCRIPTION 
     
    3838        ); 
    3939        $c->forward( 
    40             q'Vote::View::Mail', 'render', 
     40            q'Epoll::View::Mail', 'render', 
    4141            [ 'poll_request.tt', { 
    4242                To => $c->req->param('mail'), 
     
    7676    my ($self, $c) = @_; 
    7777    if ($c->res->body) { return } 
    78     else { $c->forward(qw/Vote::View::TT/) } 
     78    else { $c->forward(qw/Epoll::View::TT/) } 
    7979} 
    8080 
  • trunk/lib/Epoll/Controller/Root.pm

    r200 r242  
    1 package Vote::Controller::Root; 
     1package Epoll::Controller::Root; 
    22 
    33use strict; 
     
    1313=head1 NAME 
    1414 
    15 Vote::Controller::Root - Root Controller for Vote 
     15Epoll::Controller::Root - Root Controller for Epoll 
    1616 
    1717=head1 DESCRIPTION 
     
    3434sub default : Private { 
    3535    my ( $self, $c ) = @_; 
    36     $c->stash->{page}{title} = 'Epoll ' . $Vote::DB::VERSION; 
     36    $c->stash->{page}{title} = 'Epoll ' . $Epoll::DB::VERSION; 
    3737} 
    3838 
     
    4646    my ($self, $c) = @_; 
    4747    if ($c->res->body) { return } 
    48     else { $c->forward(qw/Vote::View::TT/) } 
     48    else { $c->forward(qw/Epoll::View::TT/) } 
    4949} 
    5050 
  • trunk/lib/Epoll/Controller/Vote.pm

    r226 r242  
    1 package Vote::Controller::Vote; 
     1package Epoll::Controller::Vote; 
    22 
    33use strict; 
     
    77=head1 NAME 
    88 
    9 Vote::Controller::Vote - Catalyst Controller 
     9Epoll::Controller::Vote - Catalyst Controller 
    1010 
    1111=head1 DESCRIPTION 
     
    3838 
    3939    $c->stash->{voteid} = $id; 
    40     $c->stash->{page}{title} = 'Vote: ' . $c->model('Vote')->poll($id)->info('label'); 
     40    $c->stash->{page}{title} = 'Epoll: ' . $c->model('Vote')->poll($id)->info('label'); 
    4141} 
    4242 
     
    6666    my ($self, $c) = @_; 
    6767    if ($c->res->body) { return } 
    68     elsif ($c->stash->{latex}) { $c->forward(qw/Vote::View::Latex/) } 
    69     else { $c->forward(qw/Vote::View::TT/) } 
     68    elsif ($c->stash->{latex}) { $c->forward(qw/Epoll::View::Latex/) } 
     69    else { $c->forward(qw/Epoll::View::TT/) } 
    7070} 
    7171 
  • trunk/lib/Epoll/DB.pm

    r213 r242  
    1 package Vote::DB; 
     1package Epoll::DB; 
    22 
    33# $Id$ 
     
    55use strict; 
    66use warnings; 
    7 use base 'Vote::DB::common'; 
    8 use Vote::DB::Poll; 
    9 use Vote::DB::Poll::Results; 
     7use base 'Epoll::DB::common'; 
     8use Epoll::DB::Poll; 
     9use Epoll::DB::Poll::Results; 
    1010 
    1111our $VERSION = '1.90'; 
     
    1313=head1 NAME 
    1414 
    15 Vote::Model::Vote - Catalyst Model 
     15Epoll::Model::Vote - Catalyst Model 
    1616 
    1717=head1 DESCRIPTION 
     
    2626    bless { 
    2727        dbstring => $dbstring, 
    28         db => Vote::DB::common::_newdb($dbstring), 
     28        db => Epoll::DB::common::_newdb($dbstring), 
    2929    }, $class; 
    3030} 
     
    8989sub poll { 
    9090    my ($self, $pollid) = @_; 
    91     Vote::DB::Poll->new($self->{dbstring}, $self->poll_id_from_uid($pollid)); 
     91    Epoll::DB::Poll->new($self->{dbstring}, $self->poll_id_from_uid($pollid)); 
    9292} 
    9393 
    9494sub results { 
    9595    my ($self, $pollid) = @_; 
    96     Vote::DB::Poll::Results->new($self->{dbstring}, $self->poll_id_from_uid($pollid)); 
     96    Epoll::DB::Poll::Results->new($self->{dbstring}, $self->poll_id_from_uid($pollid)); 
    9797} 
    9898 
  • trunk/lib/Epoll/DB/Ballot.pm

    r195 r242  
    1 package Vote::DB::Ballot; 
     1package Epoll::DB::Ballot; 
    22 
    33# $Id$ 
     
    55use strict; 
    66use warnings; 
    7 use base 'Vote::DB::common'; 
    8 use Vote::DB::Poll; 
     7use base 'Epoll::DB::common'; 
     8use Epoll::DB::Poll; 
    99 
    1010=head1 NAME 
    1111 
    12 Vote::Model::Vote - Catalyst Model 
     12Epoll::Model::Epoll - Catalyst Model 
    1313 
    1414=head1 DESCRIPTION 
     
    2424        id => $id, 
    2525        dbstring => $dbstring, 
    26         db => Vote::DB::common::_newdb($dbstring), 
     26        db => Epoll::DB::common::_newdb($dbstring), 
    2727    }, $class; 
    2828} 
     
    3232sub poll { 
    3333    my ($self) = @_; 
    34     Vote::DB::Poll->new($self->{dbstring}, $self->info->{poll}); 
     34    Epoll::DB::Poll->new($self->{dbstring}, $self->info->{poll}); 
    3535} 
    3636 
  • trunk/lib/Epoll/DB/Choice.pm

    r165 r242  
    1 package Vote::DB::Choice; 
     1package Epoll::DB::Choice; 
    22 
    33# $Id$ 
     
    55use strict; 
    66use warnings; 
    7 use base 'Vote::DB::common'; 
    8 use Vote::DB::Poll; 
     7use base 'Epoll::DB::common'; 
     8use Epoll::DB::Poll; 
    99 
    1010=head1 NAME 
    1111 
    12 Vote::Model::Vote - Catalyst Model 
     12Epoll::Model::Epoll - Catalyst Model 
    1313 
    1414=head1 DESCRIPTION 
     
    2424        key => $key, 
    2525        dbstring => $dbstring, 
    26         db => Vote::DB::common::_newdb($dbstring), 
     26        db => Epoll::DB::common::_newdb($dbstring), 
    2727    }, $class; 
    2828} 
     
    3232sub poll { 
    3333    my ($self) = @_; 
    34     Vote::DB::Poll->new($self->{dbstring}, $self->info->{poll}); 
     34    Epoll::DB::Poll->new($self->{dbstring}, $self->info->{poll}); 
    3535} 
    3636 
  • trunk/lib/Epoll/DB/Poll.pm

    r224 r242  
    1 package Vote::DB::Poll; 
     1package Epoll::DB::Poll; 
    22 
    33# $Id$ 
     
    55use strict; 
    66use warnings; 
    7 use base 'Vote::DB::common'; 
     7use base 'Epoll::DB::common'; 
    88use Crypt::RSA; 
    99use Crypt::RSA::Key::Public::SSH; 
    1010use Crypt::RSA::Key::Private::SSH; 
    1111use MIME::Base64; 
    12 use Vote::DB::Ballot; 
    13 use Vote::DB::Voting; 
    14 use Vote::DB::Choice; 
    15 use Vote::DB::Poll::Bdata; 
     12use Epoll::DB::Ballot; 
     13use Epoll::DB::Voting; 
     14use Epoll::DB::Choice; 
     15use Epoll::DB::Poll::Bdata; 
    1616 
    1717=head1 NAME 
    1818 
    19 Vote::Model::Vote - Catalyst Model 
     19Epoll::Model::Vote - Catalyst Model 
    2020 
    2121=head1 DESCRIPTION 
     
    3333        voteid => $voteid, 
    3434        dbstring => $dbstring, 
    35         db => Vote::DB::common::_newdb($dbstring), 
     35        db => Epoll::DB::common::_newdb($dbstring), 
    3636    }, $class; 
    3737} 
     
    5050        free_choice => 0, 
    5151        choice_count => 1, 
    52         uid => Vote::DB::common::random_string(), 
     52        uid => Epoll::DB::common::random_string(), 
    5353    ); 
    5454} 
     
    226226    my $res = $sth->fetchrow_hashref; 
    227227    $sth->finish; 
    228     return $res ? Vote::DB::Voting->new($self->{dbstring}, $votingkey) : undef; 
     228    return $res ? Epoll::DB::Voting->new($self->{dbstring}, $votingkey) : undef; 
    229229} 
    230230 
     
    241241    my $res = $sth->fetchrow_hashref; 
    242242    $sth->finish; 
    243     return $res ? Vote::DB::Voting->new($self->{dbstring}, $res->{key}) : undef; 
     243    return $res ? Epoll::DB::Voting->new($self->{dbstring}, $res->{key}) : undef; 
    244244} 
    245245 
     
    289289    my $res = $sth->fetchrow_hashref; 
    290290    $sth->finish; 
    291     return $res ? Vote::DB::Choice->new($self->{dbstring}, $chid) : undef; 
     291    return $res ? Epoll::DB::Choice->new($self->{dbstring}, $chid) : undef; 
    292292} 
    293293 
     
    475475sub bdata { 
    476476    my ($self) = @_; 
    477     Vote::DB::Poll::Bdata->new($self->{dbstring}, $self); 
     477    Epoll::DB::Poll::Bdata->new($self->{dbstring}, $self); 
    478478} 
    479479 
     
    490490    my $res = $sth->fetchrow_hashref; 
    491491    $sth->finish; 
    492     return $res ? Vote::DB::Ballot->new($self->{dbstring}, $id) : undef; 
     492    return $res ? Epoll::DB::Ballot->new($self->{dbstring}, $id) : undef; 
    493493} 
    494494 
  • trunk/lib/Epoll/DB/Poll/Bdata.pm

    r240 r242  
    1 package Vote::DB::Poll::Bdata; 
     1package Epoll::DB::Poll::Bdata; 
    22 
    33# $Id$ 
     
    55use strict; 
    66use warnings; 
    7 use base 'Vote::DB::common'; 
    8 use Vote::DB::Poll; 
     7use base 'Epoll::DB::common'; 
     8use Epoll::DB::Poll; 
    99use XML::Simple; 
    1010use Crypt::CBC; 
     
    1313=head1 NAME 
    1414 
    15 Vote::Model::Vote - Catalyst Model 
     15Epoll::Model::Vote - Catalyst Model 
    1616 
    1717=head1 DESCRIPTION 
     
    2727        poll => $poll, 
    2828        dbstring => $dbstring, 
    29         db => Vote::DB::common::_newdb($dbstring), 
     29        db => Epoll::DB::common::_newdb($dbstring), 
    3030        data => {} 
    3131    }, $class; 
     
    4141sub uid { 
    4242    my ($self) = @_; 
    43     $self->{data}{id} ||= Vote::DB::common::gen_uid(); 
     43    $self->{data}{id} ||= Epoll::DB::common::gen_uid(); 
    4444} 
    4545 
     
    166166    ); 
    167167 
    168     my $uid = Vote::DB::common::gen_uid(); 
     168    my $uid = Epoll::DB::common::gen_uid(); 
    169169    $addenc->execute($uid, $encryptedballot, $encsymkey, $self->voteid); 
    170170} 
  • trunk/lib/Epoll/DB/Poll/Results.pm

    r218 r242  
    1 package Vote::DB::Poll::Results; 
     1package Epoll::DB::Poll::Results; 
    22 
    33# $Id$ 
     
    55use strict; 
    66use warnings; 
    7 use base 'Vote::DB::Poll'; 
     7use base 'Epoll::DB::Poll'; 
    88 
    99=head1 NAME 
    1010 
    11 Vote::Model::Vote - Catalyst Model 
     11Epoll::Model::Vote - Catalyst Model 
    1212 
    1313=head1 DESCRIPTION 
  • trunk/lib/Epoll/DB/Voting.pm

    r198 r242  
    1 package Vote::DB::Voting; 
     1package Epoll::DB::Voting; 
    22 
    33# $Id$ 
     
    55use strict; 
    66use warnings; 
    7 use base 'Vote::DB::common'; 
    8 use Vote::DB::Poll; 
     7use base 'Epoll::DB::common'; 
     8use Epoll::DB::Poll; 
    99 
    1010=head1 NAME 
    1111 
    12 Vote::Model::Vote - Catalyst Model 
     12Epoll::DB::Voting - Catalyst Model 
    1313 
    1414=head1 DESCRIPTION 
     
    2424        key => $key, 
    2525        dbstring => $dbstring, 
    26         db => Vote::DB::common::_newdb($dbstring), 
     26        db => Epoll::DB::common::_newdb($dbstring), 
    2727    }, $class; 
    2828} 
     
    3232sub poll { 
    3333    my ($self) = @_; 
    34     Vote::DB::Poll->new($self->{dbstring}, $self->info->{poll}); 
     34    Epoll::DB::Poll->new($self->{dbstring}, $self->info->{poll}); 
    3535} 
    3636 
     
    8383sub gen_passwd { 
    8484    my ($self) = @_; 
    85     my $passwd = Vote::DB::common::random_string(8); 
     85    my $passwd = Epoll::DB::common::random_string(8); 
    8686    my $encpasswd = $self->gen_enc_passwd($passwd); 
    8787    my $upd_voting = $self->db->prepare_cached( 
  • trunk/lib/Epoll/DB/common.pm

    r231 r242  
    1 package Vote::DB::common; 
     1package Epoll::DB::common; 
    22 
    33# $Id$ 
     
    1212=head1 NAME 
    1313 
    14 Vote::Model::Vote - Catalyst Model 
     14Epoll::Model::Vote - Catalyst Model 
    1515 
    1616=head1 DESCRIPTION 
     
    6262        'Content-Type' => 'text/plain; charset=UTF-8; format=flowed', 
    6363        'Content-Transfer-Encoding' => '8bit', 
    64         'X-Epoll-version' => $Vote::VERSION, 
     64        'X-Epoll-version' => $Epoll::VERSION, 
    6565    ); 
    6666} 
  • trunk/lib/Epoll/Model/Vote.pm

    r157 r242  
    1 package Vote::Model::Vote; 
     1package Epoll::Model::Vote; 
    22 
    33use strict; 
    44use warnings; 
    55use base 'Catalyst::Model'; 
    6 use base 'Vote::DB'; 
     6use base 'Epoll::DB'; 
    77 
    88=head1 NAME 
    99 
    10 Vote::Model::Vote - Catalyst Model 
     10Epoll::Model::Vote - Catalyst Model 
    1111 
    1212=head1 DESCRIPTION 
     
    1919    my ($class) = @_; 
    2020     
    21     bless Vote::DB->new(Vote->config->{db}), $class; 
     21    bless Epoll::DB->new(Epoll->config->{db}), $class; 
    2222} 
    2323 
  • trunk/lib/Epoll/Template/Plugin/Mail.pm

    r128 r242  
    11# $Id$ 
    22 
    3 package Vote::Template::Plugin::Mail; 
     3package Epoll::Template::Plugin::Mail; 
    44 
    55=head1 NAME 
  • trunk/lib/Epoll/View/Latex.pm

    r230 r242  
    1 package Vote::View::Latex; 
     1package Epoll::View::Latex; 
    22 
    33use strict; 
    4 use base 'Vote::View::TT'; 
     4use base 'Epoll::View::TT'; 
    55use LaTeX::Driver; 
    66use File::Temp; 
     
    88__PACKAGE__->config( 
    99    TEMPLATE_EXTENSION => '.tt', 
    10     INCLUDE_PATH => Vote->path_to( 'root', 'latex' ), 
     10    INCLUDE_PATH => Epoll->path_to( 'root', 'latex' ), 
    1111    PRE_PROCESS => 'includes/header.tt', 
    1212    POST_PROCESS => 'includes/footer.tt', 
    13     PLUGIN_BASE => 'Vote::Template::Plugin', 
     13    PLUGIN_BASE => 'Epoll::Template::Plugin', 
    1414); 
    1515 
    1616=head1 NAME 
    1717 
    18 Vote::View::Latex - Latex View for Vote 
     18Epoll::View::Latex - Latex View for Epoll 
    1919 
    2020=head1 DESCRIPTION 
    2121 
    22 TT View for Vote.  
     22TT View for Epoll.  
    2323 
    2424=cut 
     
    7373=head1 SEE ALSO 
    7474 
    75 L<Vote> 
     75L<Epoll> 
    7676 
    7777=head1 AUTHOR 
  • trunk/lib/Epoll/View/Mail.pm

    r200 r242  
    1 package Vote::View::Mail; 
     1package Epoll::View::Mail; 
    22 
    33use strict; 
    44use base 'Catalyst::View::TT'; 
    55use Mail::Mailer; 
    6 use Vote; 
    7 use Vote::DB; 
     6use Epoll; 
     7use Epoll::DB; 
    88 
    99__PACKAGE__->config( 
    1010    TEMPLATE_EXTENSION => '.tt', 
    11     INCLUDE_PATH => Vote->path_to( 'root', 'mail' ), 
    12     PLUGIN_BASE => 'Vote::Template::Plugin', 
     11    INCLUDE_PATH => Epoll->path_to( 'root', 'mail' ), 
     12    PLUGIN_BASE => 'Epoll::Template::Plugin', 
    1313); 
    1414 
    1515=head1 NAME 
    1616 
    17 Vote::View::TT - TT View for Vote 
     17Epoll::View::TT - TT View for Epoll 
    1818 
    1919=head1 DESCRIPTION 
    2020 
    21 TT View for Vote.  
     21TT View for Epoll.  
    2222 
    2323=cut 
     
    2727 
    2828    $ENV{MAILADDRESS} = $args->{From}; 
    29     my $mailer = new Mail::Mailer 'smtp', Server => (Vote->config->{smtp} || 'localhost'); 
     29    my $mailer = new Mail::Mailer 'smtp', Server => (Epoll->config->{smtp} || 'localhost'); 
    3030    $mailer->open({ 
    3131        (map { $_ => $args->{$_} } grep { $_ !~ /^(mail)$/ } keys %{ $args || {}}), 
    3232        'Content-Type' => 'text/plain; charset=UTF-8; format=flowed', 
    3333        'Content-Transfer-Encoding' => '8bit', 
    34         'X-Epoll-version' => $Vote::DB::VERSION, 
     34        'X-Epoll-version' => $Epoll::DB::VERSION, 
    3535    }); 
    3636    print $mailer 
     
    4141=head1 SEE ALSO 
    4242 
    43 L<Vote> 
     43L<Epoll> 
    4444 
    4545=head1 AUTHOR 
  • trunk/lib/Epoll/View/TT.pm

    r200 r242  
    1 package Vote::View::TT; 
     1package Epoll::View::TT; 
    22 
    33use strict; 
    44use base 'Catalyst::View::TT'; 
    5 use Vote; 
    6 use Vote::DB; 
     5use Epoll; 
     6use Epoll::DB; 
    77 
    88__PACKAGE__->config( 
    99    TEMPLATE_EXTENSION => '.tt', 
    10     INCLUDE_PATH => Vote->path_to( 'root', 'templates' ), 
     10    INCLUDE_PATH => Epoll->path_to( 'root', 'templates' ), 
    1111    PRE_PROCESS => 'includes/header.tt', 
    1212    POST_PROCESS => 'includes/footer.tt', 
    13     PLUGIN_BASE => 'Vote::Template::Plugin', 
     13    PLUGIN_BASE => 'Epoll::Template::Plugin', 
    1414); 
    1515 
    1616=head1 NAME 
    1717 
    18 Vote::View::TT - TT View for Vote 
     18Epoll::View::TT - TT View for Epoll 
    1919 
    2020=head1 DESCRIPTION 
    2121 
    22 TT View for Vote.  
     22TT View for Epoll.  
    2323 
    2424=cut 
     
    2727    my ($self, $c) = @_; 
    2828 
    29     $c->stash->{Vote}{VERSION} = $Vote::DB::VERSION; 
     29    $c->stash->{Epoll}{VERSION} = $Epoll::DB::VERSION; 
    3030    Catalyst::View::TT::process($self, $c); 
    3131} 
     
    3333=head1 SEE ALSO 
    3434 
    35 L<Vote> 
     35L<Epoll> 
    3636 
    3737=head1 AUTHOR 
  • trunk/script/epoll_cgi.pl

    r213 r242  
    77use FindBin; 
    88use lib "$FindBin::Bin/../lib"; 
    9 use Vote; 
     9use Epoll; 
    1010 
    11 Vote->run; 
     11Epoll->run; 
    1212 
    13131; 
     
    1515=head1 NAME 
    1616 
    17 vote_cgi.pl - Catalyst CGI 
     17epoll_cgi.pl - Catalyst CGI 
    1818 
    1919=head1 SYNOPSIS 
  • trunk/script/epoll_create.pl

    r213 r242  
    2121my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } ); 
    2222 
    23 pod2usage(1) unless $helper->mk_component( 'Vote', @ARGV ); 
     23pod2usage(1) unless $helper->mk_component( 'Epoll', @ARGV ); 
    2424 
    25251; 
     
    2727=head1 NAME 
    2828 
    29 vote_create.pl - Create a new Catalyst Component 
     29epoll_create.pl - Create a new Catalyst Component 
    3030 
    3131=head1 SYNOPSIS 
    3232 
    33 vote_create.pl [options] model|view|controller name [helper] [options] 
     33epoll_create.pl [options] model|view|controller name [helper] [options] 
    3434 
    3535 Options: 
     
    3939 
    4040 Examples: 
    41    vote_create.pl controller My::Controller 
    42    vote_create.pl -mechanize controller My::Controller 
    43    vote_create.pl view My::View 
    44    vote_create.pl view MyView TT 
    45    vote_create.pl view TT TT 
    46    vote_create.pl model My::Model 
    47    vote_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\ 
     41   epoll_create.pl controller My::Controller 
     42   epoll_create.pl -mechanize controller My::Controller 
     43   epoll_create.pl view My::View 
     44   epoll_create.pl view MyView TT 
     45   epoll_create.pl view TT TT 
     46   epoll_create.pl model My::Model 
     47   epoll_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\ 
    4848   dbi:SQLite:/tmp/my.db 
    49    vote_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\ 
     49   epoll_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\ 
    5050   dbi:Pg:dbname=foo root 4321 
    5151 
  • trunk/script/epoll_fastcgi.pl

    r213 r242  
    99use FindBin; 
    1010use lib "$FindBin::Bin/../lib"; 
    11 use Vote; 
     11use Epoll; 
    1212 
    1313my $help = 0; 
     
    2626pod2usage(1) if $help; 
    2727 
    28 Vote->run(  
     28Epoll->run(  
    2929    $listen,  
    3030    {   nproc   => $nproc, 
     
    4040=head1 NAME 
    4141 
    42 vote_fastcgi.pl - Catalyst FastCGI 
     42epoll_fastcgi.pl - Catalyst FastCGI 
    4343 
    4444=head1 SYNOPSIS 
    4545 
    46 vote_fastcgi.pl [options] 
     46epoll_fastcgi.pl [options] 
    4747  
    4848 Options: 
  • trunk/script/epoll_server.pl

    r213 r242  
    5151# This is require instead of use so that the above environment 
    5252# variables can be set at runtime. 
    53 require Vote; 
     53require Epoll; 
    5454 
    55 Vote->run( $port, $host, { 
     55Epoll->run( $port, $host, { 
    5656    argv              => \@argv, 
    5757    'fork'            => $fork, 
     
    6767=head1 NAME 
    6868 
    69 vote_server.pl - Catalyst Testserver 
     69epoll_server.pl - Catalyst Testserver 
    7070 
    7171=head1 SYNOPSIS 
    7272 
    73 vote_server.pl [options] 
     73epoll_server.pl [options] 
    7474 
    7575 Options: 
  • trunk/script/epoll_test.pl

    r213 r242  
    77use FindBin; 
    88use lib "$FindBin::Bin/../lib"; 
    9 use Catalyst::Test 'Vote'; 
     9use Catalyst::Test 'Epoll'; 
    1010 
    1111my $help = 0; 
     
    2121=head1 NAME 
    2222 
    23 vote_test.pl - Catalyst Test 
     23epoll_test.pl - Catalyst Test 
    2424 
    2525=head1 SYNOPSIS 
    2626 
    27 vote_test.pl [options] uri 
     27epoll_test.pl [options] uri 
    2828 
    2929 Options: 
     
    3131 
    3232 Examples: 
    33    vote_test.pl http://localhost/some_action 
    34    vote_test.pl /some_action 
     33   epoll_test.pl http://localhost/some_action 
     34   epoll_test.pl /some_action 
    3535 
    3636 See also: 
  • trunk/t/01app.t

    r2 r242  
    33use Test::More tests => 2; 
    44 
    5 BEGIN { use_ok 'Catalyst::Test', 'Vote' } 
     5BEGIN { use_ok 'Catalyst::Test', 'Epoll' } 
    66 
    77ok( request('/')->is_success, 'Request should succeed' ); 
  • trunk/t/10Epoll_DB.t

    r225 r242  
    124124    + $poll_test_count;        # poll test 
    125125 
    126 use_ok 'Vote', 'Vote'; 
    127 use_ok 'Vote::DB'; 
     126use_ok 'Epoll', 'Epoll'; 
     127use_ok 'Epoll::DB'; 
    128128$ENV{EPOLL_NO_COMMIT} = 1; 
    129 isa_ok(my $vote = Vote::DB->new(Vote->config->{db}), 'Vote::DB'); 
     129isa_ok(my $vote = Epoll::DB->new(Epoll->config->{db}), 'Epoll::DB'); 
    130130 
    131131my $count = 0; 
     
    136136        "can create a new poll"); 
    137137 
    138     isa_ok(my $poll = $vote->poll($pollid), 'Vote::DB::Poll'); 
     138    isa_ok(my $poll = $vote->poll($pollid), 'Epoll::DB::Poll'); 
    139139 
    140140    ok(my $puid = $poll->uid, "can get poll uid"); 
     
    161161    } 
    162162     
    163     isa_ok(my $results = $vote->results($pollid), 'Vote::DB::Poll'); 
     163    isa_ok(my $results = $vote->results($pollid), 'Epoll::DB::Poll'); 
    164164 
    165165    $tpoll->{tests}->($results); 
  • trunk/t/11Epoll_DB_crypted.t

    r219 r242  
    55# $Id$ 
    66 
    7 use_ok 'Vote', 'Vote'; 
    8 use_ok 'Vote::DB'; 
     7use_ok 'Epoll', 'Epoll'; 
     8use_ok 'Epoll::DB'; 
    99$ENV{EPOLL_NO_COMMIT} = 1; 
    10 isa_ok(my $vote = Vote::DB->new(Vote->config->{db}), 'Vote::DB'); 
     10isa_ok(my $vote = Epoll::DB->new(Epoll->config->{db}), 'Epoll::DB'); 
    1111 
    1212ok(my $pollid = $vote->create_poll('test@', "Vote test", "password"), 
    1313    "can create a new poll"); 
    1414 
    15 isa_ok(my $poll = $vote->poll($pollid), 'Vote::DB::Poll'); 
     15isa_ok(my $poll = $vote->poll($pollid), 'Epoll::DB::Poll'); 
    1616 
    1717ok($poll->gen_poll_keys('keypass'), 'can generate poll keys'); 
     
    2323$poll->register_ballot('c', [], 'localhost'); 
    2424 
    25 isa_ok(my $results = $vote->results($pollid), 'Vote::DB::Poll'); 
     25isa_ok(my $results = $vote->results($pollid), 'Epoll::DB::Poll'); 
    2626 
    2727ok($results->decrypted_ballots('keypass'), "Can decrypt ballot"); 
  • trunk/t/20Epoll_Web.t

    r228 r242  
    77$ENV{EPOLL_NO_COMMIT} = 1; 
    88 
    9 use_ok 'Vote', 'Vote'; 
    10 use_ok 'Vote::DB'; 
    11 use_ok 'Catalyst::Test', 'Vote';  
     9use_ok 'Epoll', 'Epoll'; 
     10use_ok 'Epoll::DB'; 
     11use_ok 'Catalyst::Test', 'Epoll';  
    1212 
    13 my $vote = Vote->model('Vote'); 
     13my $vote = Epoll->model('Vote'); 
    1414 
    1515ok(my $pollid = $vote->create_poll('test@', 'Test poll', 'password'), 
  • trunk/t/controller_Admin.t

    r200 r242  
    33use Test::More tests => 3; 
    44 
    5 BEGIN { use_ok 'Catalyst::Test', 'Vote' } 
    6 BEGIN { use_ok 'Vote::Controller::Admin' } 
     5BEGIN { use_ok 'Catalyst::Test', 'Epoll' } 
     6BEGIN { use_ok 'Epoll::Controller::Admin' } 
    77 
    88ok( request('/admin')->is_redirect, 'Request should succeed' ); 
  • trunk/t/controller_Ballot.t

    r200 r242  
    33use Test::More tests => 3; 
    44 
    5 BEGIN { use_ok 'Catalyst::Test', 'Vote' } 
    6 BEGIN { use_ok 'Vote::Controller::Ballot' } 
     5BEGIN { use_ok 'Catalyst::Test', 'Epoll' } 
     6BEGIN { use_ok 'Epoll::Controller::Ballot' } 
    77 
    88ok( request('/ballot')->is_redirect, 'Request should succeed' ); 
  • trunk/t/controller_Epoll.t

    r213 r242  
    33use Test::More tests => 3; 
    44 
    5 BEGIN { use_ok 'Catalyst::Test', 'Vote' } 
    6 BEGIN { use_ok 'Vote::Controller::Vote' } 
     5BEGIN { use_ok 'Catalyst::Test', 'Epoll' } 
     6BEGIN { use_ok 'Epoll::Controller::Vote' } 
    77 
    88ok( request('/vote')->is_redirect, 'Request should succeed' ); 
  • trunk/t/controller_Newpoll.t

    r30 r242  
    33use Test::More tests => 3; 
    44 
    5 BEGIN { use_ok 'Catalyst::Test', 'Vote' } 
    6 BEGIN { use_ok 'Vote::Controller::Newpoll' } 
     5BEGIN { use_ok 'Catalyst::Test', 'Epoll' } 
     6BEGIN { use_ok 'Epoll::Controller::Newpoll' } 
    77 
    88ok( request('/newpoll')->is_success, 'Request should succeed' ); 
  • trunk/t/model_Epoll.t

    r213 r242  
    33use Test::More tests => 1; 
    44 
    5 BEGIN { use_ok 'Vote::Model::Vote' } 
     5BEGIN { use_ok 'Epoll::Model::Vote' } 
    66 
  • trunk/t/view_Latex.t

    r183 r242  
    33use Test::More tests => 1; 
    44 
    5 BEGIN { use_ok 'Vote::View::Latex' } 
     5BEGIN { use_ok 'Epoll::View::Latex' } 
    66 
  • trunk/t/view_Mail.t

    r180 r242  
    33use Test::More tests => 1; 
    44 
    5 BEGIN { use_ok 'Vote::View::Mail' } 
     5BEGIN { use_ok 'Epoll::View::Mail' } 
    66 
  • trunk/t/view_TT.t

    r3 r242  
    33use Test::More tests => 1; 
    44 
    5 BEGIN { use_ok 'Vote::View::TT' } 
     5BEGIN { use_ok 'Epoll::View::TT' } 
    66 
Note: See TracChangeset for help on using the changeset viewer.