Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elections:master commit in: /
Date: Sat, 24 Jun 2017 23:54:39
Message-Id: 1498348452.b0c007c6048b687f3b4b1bfc9a489192e5e9f40e.robbat2@gentoo
1 commit: b0c007c6048b687f3b4b1bfc9a489192e5e9f40e
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 24 23:54:12 2017 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 24 23:54:12 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/elections.git/commit/?id=b0c007c6
7
8 Votify: debug spam.
9
10 Use of uninitialized value in subroutine entry at /etc/elections/Votify.pm line 135.
11 Votify::get_single_election_hashref("council-201706") called at /etc/elections/Votify.pm line 148
12 Votify::get_elections_hash() called at /etc/elections/Votify.pm line 153
13 Votify::get_open_elections_hash() called at /etc/elections/election-stats-count line 41
14
15 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
16
17 Votify.pm | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20 diff --git a/Votify.pm b/Votify.pm
21 index d53cfcb..d24b8cb 100644
22 --- a/Votify.pm
23 +++ b/Votify.pm
24 @@ -129,10 +129,10 @@ sub get_single_election_hashref {
25 return undef unless defined $election_dir;
26 my %election;
27 foreach my $fn (@REQUIRED_FILES){
28 - #print "Scan $fn\n";
29 + print STDERR "Scan $fn\n";
30 my @filenames = (sprintf("%s/%s", "$basedir/$election_name", $fn), sprintf("%s/%s-%s", "$basedir/$election_name", $fn, $election_name));
31 - #print Dumper(@filenames);
32 - my $filename = abs_path(List::Util::first { -f $_ } @filenames);
33 + print STDERR Dumper(@filenames);
34 + my $filename = abs_path(List::Util::first { $_ && -f $_ } @filenames);
35 $election{"${fn}file"} = $filename;
36 };
37 #print Dumper(%election);