]>
Commit | Line | Data |
---|---|---|
5c5cd38a MG |
1 | package Gruntmaster::Daemon::Judge::Points; |
2 | ||
3 | use 5.014000; | |
4 | use strict; | |
5 | use warnings; | |
6 | ||
7 | use Gruntmaster::Daemon::Constants qw/AC REJ/; | |
8 | use List::Util qw/sum/; | |
9 | use Log::Log4perl qw/get_logger/; | |
10 | our $VERSION = '0.001'; | |
11 | ||
12 | ################################################## | |
13 | ||
14 | sub judge{ | |
15 | no warnings qw/numeric/; | |
16 | get_logger->trace("Judging results: @_"); | |
ab436d78 | 17 | my $points = sum 0, grep { !ref } @_; |
5c5cd38a MG |
18 | $points == 100 ? (result => AC, result_text => 'Accepted') : (result => REJ, result_text => "$points points", points => $points) |
19 | } | |
20 | ||
21 | 1 |