From: Marius Gavrilescu Date: Tue, 16 Dec 2014 17:13:25 +0000 (+0200) Subject: Change count(%cond) to count(\%cond) to fix warning X-Git-Tag: 5999.000_013~9 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=59d291c001feac6118810de885a6b7b5989623bb;p=gruntmaster-data.git Change count(%cond) to count(\%cond) to fix warning --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index c46a358..59cd64b 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -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 ]