From: Don Armstrong Date: Mon, 27 Apr 2015 18:44:59 +0000 (-0700) Subject: include the options when outputing the tally sheet X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e161b025c596a0d3d1bba6ffe48a96b67a898544;p=debian-ctte.git include the options when outputing the tally sheet --- diff --git a/scripts/pocket-devotee b/scripts/pocket-devotee index 5fb9fdc..e2e6678 100755 --- a/scripts/pocket-devotee +++ b/scripts/pocket-devotee @@ -184,6 +184,8 @@ sub winner { if (not defined $params{tally_fh}) { $params{tally_fh} = \*STDIN; } + # header been output? + my $header_output = 0; # This is where we get our input data from while (defined ($_ = $params{tally_fh}->getline)) { @@ -218,6 +220,10 @@ sub winner { for my $opt (@options) { $vote .= exists $option_rank{$opt->{key}} ? $number_to_option{$option_rank{$opt->{key}}} : '-'; } + if (not $header_output) { + print {$RESULTS} "/--".join("",map {$_->{key}} @options)."\n"; + $header_output = 1; + } print {$RESULTS} "V: $vote $voter\n"; } else {