X-Git-Url: http://git.ieval.ro/?p=gruntmaster-daemon.git;a=blobdiff_plain;f=lib%2FGruntmaster%2FDaemon%2FConstants.pm;h=eb52456945cd788f1d1c2869da064c2a487cb6bd;hp=189aabeae21a9a3a0026acaab14c872c2bcc80e4;hb=a722431b0f35babda9d7da134824caf76ad75458;hpb=5c5cd38ad5b9e3c2b331564bc0b23e9167b7d07a diff --git a/lib/Gruntmaster/Daemon/Constants.pm b/lib/Gruntmaster/Daemon/Constants.pm index 189aabe..eb52456 100644 --- a/lib/Gruntmaster/Daemon/Constants.pm +++ b/lib/Gruntmaster/Daemon/Constants.pm @@ -5,22 +5,80 @@ use strict; use warnings; use parent qw/Exporter/; -our $VERSION = '0.001'; +our $VERSION = "5999.000_002"; use constant +{ - # Accepted - AC => 0, - - # Internal server error - ERR => -1, - - # All other errors - WA => 1, - NZX => 2, - TLE => 3, - OLE => 4, - DIED => 5, - REJ => 10, + # Accepted + AC => 0, + + # Internal server error + ERR => -1, + + # All other errors + WA => 1, + NZX => 2, + TLE => 3, + OLE => 4, + DIED => 5, + REJ => 10, }; our @EXPORT_OK = qw/AC ERR WA NZX TLE OLE DIED REJ/; + +1; +__END__ + +=encoding utf-8 + +=head1 NAME + +Gruntmaster::Daemon::Constants - Constants for the Gruntmaster daemon + +=head1 SYNOPSIS + + use Gruntmaster::Daemon::Constants qw/WA NZX/; + ... + return [NZX, 'Non-zero exit status'] if $status; + return [WA, 'Wrong answer'] unless is_correct($answer); + +=head1 DESCRIPTION + +Gruntmaster::Daemon::Constants provides constants which are used in more than one module. + +The constants are: + +=over + +=item B The 'Accepted' job result. + +=item B The 'Internal server error' job result. + +=item B The 'Wrong answer' job result. + +=item B The 'Non-zero exit status' job result. + +=item B The 'Time limit exceeded' job result. + +=item B The 'Output limit exceeded' job result. + +=item B The 'Crash' job result. Used when a program is killed by a signal. + +=item B The 'Rejected' job result. Used when none of the above is appropriate. + +=back + +=head1 AUTHOR + +Marius Gavrilescu Emarius@ieval.roE + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2014 by Marius Gavrilescu + +This library is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + + +=cut