package Gruntmaster::Daemon::Constants; use 5.014000; use strict; use warnings; use parent qw/Exporter/; our $VERSION = "5999-TRIAL"; 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, }; 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