From 35596ea828c058c16154e7503e40f57aef8aedfa Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 27 Sep 2014 00:35:46 +0300 Subject: [PATCH] Prevent experimental reference usage warnings --- lib/Gruntmaster/Data.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 } -- 2.39.2