]> iEval git - gruntmaster-data.git/commitdiff
Change count(%cond) to count(\%cond) to fix warning
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 16 Dec 2014 17:13:25 +0000 (19:13 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 16 Dec 2014 17:13:25 +0000 (19:13 +0200)
lib/Gruntmaster/Data.pm

index c46a358964777ec70df4fbfdb0a2b129b104de7d..59cd64b3cb1536a751d5bed74a106ba6678b7afd 100644 (file)
@@ -44,8 +44,8 @@ BEGIN {
 sub user_list {
        my $rs = $_[0]->users->search(undef, {columns => USER_PUBLIC_COLUMNS, prefetch => [qw/problem_statuses contest_statuses/]} );
        [ sort { $b->{solved} <=> $a->{solved} or $b->{attempted} <=> $a->{attempted} } map { ## no critic (ProhibitReverseSort)
-               my $solved    = $_->problem_statuses->count(solved => 1);
-               my $attempted = $_->problem_statuses->count(solved => 0);
+               my $solved    = $_->problem_statuses->count({solved => 1});
+               my $attempted = $_->problem_statuses->count({solved => 0});
                my $contests  = $_->contest_statuses->count;
                +{ $_->get_columns, solved => $solved, attempted => $attempted, contests => $contests }
        } $rs->all ]
This page took 0.027059 seconds and 4 git commands to generate.