X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FDaemon%2FJudge%2FPoints.pm;h=0ddc71f395d0b173aa46e3151b75b387e0a75711;hp=6d13ad07f4c489dff820c0e2c10cfe48690405a6;hb=a552265610c628aa30a1195497aa08d3c79f0a37;hpb=5c5cd38ad5b9e3c2b331564bc0b23e9167b7d07a diff --git a/lib/Gruntmaster/Daemon/Judge/Points.pm b/lib/Gruntmaster/Daemon/Judge/Points.pm index 6d13ad0..0ddc71f 100644 --- a/lib/Gruntmaster/Daemon/Judge/Points.pm +++ b/lib/Gruntmaster/Daemon/Judge/Points.pm @@ -7,14 +7,15 @@ use warnings; use Gruntmaster::Daemon::Constants qw/AC REJ/; use List::Util qw/sum/; use Log::Log4perl qw/get_logger/; -our $VERSION = '0.001'; + +our $VERSION = '5999.000_001'; ################################################## sub judge{ no warnings qw/numeric/; get_logger->trace("Judging results: @_"); - my $points = sum 0, grep { $_+0 eq "$_" } @_; + my $points = sum 0, grep { !ref } @_; $points == 100 ? (result => AC, result_text => 'Accepted') : (result => REJ, result_text => "$points points", points => $points) }