]> iEval git - gruntmaster-data.git/commitdiff
Prevent experimental reference usage warnings
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 26 Sep 2014 21:35:46 +0000 (00:35 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 26 Sep 2014 21:35:46 +0000 (00:35 +0300)
lib/Gruntmaster/Data.pm

index e8ce571cba8c3b378300f18e965c36afb34e9e88..c3aa9975f62ede2c83ae5e9d63856789e8dd5f07 100644 (file)
@@ -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
 }
This page took 0.032852 seconds and 4 git commands to generate.