Vote::Count::Helper::Table
Table Formatting Helpers for use within Vote::Count
use Vote::Count::Helper::Table 'ChargeTable'; # $chargesPerChoice and $chargedPerChoice are from Vote::Count::Charge::Cascade say ChargeTable( $chargesPerChoice, $chargedPerChoice ); use Vote::Count::Helper::Table 'WeightedTable'; # When weighted voting is used will generate a table # with the Top Count and Approval totals say WeightedTable( $STV_Election );
Arguments: $chargesPerChoice, $chargedPerChoice
chargesPerChoice is a HashRef with the choices as keys, and the values the charge assessed each ballot supporting the choice.
chargedPerChoice is a HashRef with the choices as keys and the values a HashRef with the keys value, count, surplus, where value is the total vote value charged for the choice, count is the number of ballots that contributed, and surplus the value above quota charged.
Formats the current Vote Totals by Approval and Top Count when weighted voting is in use, for STV/Vote Charge methods.
To install Vote::Count, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Vote::Count
CPAN shell
perl -MCPAN -e shell install Vote::Count
For more information on module installation, please visit the detailed CPAN module installation guide.