From: Marius Gavrilescu Date: Fri, 26 Sep 2014 21:35:46 +0000 (+0300) Subject: Prevent experimental reference usage warnings X-Git-Tag: 5999.000_009~1 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=35596ea828c058c16154e7503e40f57aef8aedfa;p=gruntmaster-data.git Prevent experimental reference usage warnings --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index e8ce571..c3aa997 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -85,7 +85,7 @@ sub standings { my $user = $_; +{ user => $self->user($user), - score => sum (values $scores{$user}), + score => sum (values %{$scores{$user}}), scores => [map { $scores{$user}{$_->id} // '-'} @problems], problems => $ct, } @@ -116,7 +116,7 @@ sub problem_list { $params{contest} = $args{contest} if $args{contest}; for ($rs->all) { $params{$_->level} //= []; - push $params{$_->level}, {$_->get_columns, owner_name => $_->owner->name} ; + push @{$params{$_->level}}, {$_->get_columns, owner_name => $_->owner->name} ; } \%params } @@ -144,7 +144,7 @@ sub contest_list { for ($rs->all) { my $state = $_->is_pending ? 'pending' : $_->is_running ? 'running' : 'finished'; $params{$state} //= []; - push $params{$state}, { $_->get_columns, started => !$_->is_pending, owner_name => $_->owner->name }; + push @{$params{$state}}, { $_->get_columns, started => !$_->is_pending, owner_name => $_->owner->name }; } \%params }