PerlModule HTML::Mason::ApacheHandler
#PerlAddVar MasonCompRoot "main => /var/tmp/local/apache/htdocs/voting"
PerlAddVar MasonCompRoot "main => /var/tmp/local/apache/htdocs/vote"
PerlSetVar MasonCodeCacheMaxSize 0
{
package HTML::Mason::Commands;
use Data::Dumper;
use CGI ();
#use Apache::Constants qw(OK);
use Apache2::Connection ();
use Apache2::RequestRec ();
use Apache2::RequestUtil ();
use URI::Escape;
# This avoids the need to copy files over to perl lib directory
use lib qw(/directory/that/contains/Voting.pm/and/other/files);
use Voting::Utils qw(
retrieveCandidates
check_id_in_list
check_email_in_list
get_candidate_name_by_id
insert_voter_result
get_voted_candidates
get_vote_code_for_email
check_vote_code_for_email
send_vote_code_to_email
);
}
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler