]> iEval git - gruntmaster-daemon.git/blob - lib/Gruntmaster/Daemon/Constants.pm
Bump version number and update Changes
[gruntmaster-daemon.git] / lib / Gruntmaster / Daemon / Constants.pm
1 package Gruntmaster::Daemon::Constants;
2
3 use 5.014000;
4 use strict;
5 use warnings;
6 use parent qw/Exporter/;
7
8 our $VERSION = "5999.000_002";
9
10 use constant +{
11 # Accepted
12 AC => 0,
13
14 # Internal server error
15 ERR => -1,
16
17 # All other errors
18 WA => 1,
19 NZX => 2,
20 TLE => 3,
21 OLE => 4,
22 DIED => 5,
23 REJ => 10,
24 };
25
26 our @EXPORT_OK = qw/AC ERR WA NZX TLE OLE DIED REJ/;
27
28 1;
29 __END__
30
31 =encoding utf-8
32
33 =head1 NAME
34
35 Gruntmaster::Daemon::Constants - Constants for the Gruntmaster daemon
36
37 =head1 SYNOPSIS
38
39 use Gruntmaster::Daemon::Constants qw/WA NZX/;
40 ...
41 return [NZX, 'Non-zero exit status'] if $status;
42 return [WA, 'Wrong answer'] unless is_correct($answer);
43
44 =head1 DESCRIPTION
45
46 Gruntmaster::Daemon::Constants provides constants which are used in more than one module.
47
48 The constants are:
49
50 =over
51
52 =item B<AC> The 'Accepted' job result.
53
54 =item B<ERR> The 'Internal server error' job result.
55
56 =item B<WA> The 'Wrong answer' job result.
57
58 =item B<NZX> The 'Non-zero exit status' job result.
59
60 =item B<TLE> The 'Time limit exceeded' job result.
61
62 =item B<OLE> The 'Output limit exceeded' job result.
63
64 =item B<DIED> The 'Crash' job result. Used when a program is killed by a signal.
65
66 =item B<REJ> The 'Rejected' job result. Used when none of the above is appropriate.
67
68 =back
69
70 =head1 AUTHOR
71
72 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
73
74 =head1 COPYRIGHT AND LICENSE
75
76 Copyright (C) 2014 by Marius Gavrilescu
77
78 This library is free software: you can redistribute it and/or modify
79 it under the terms of the GNU Affero General Public License as published by
80 the Free Software Foundation, either version 3 of the License, or
81 (at your option) any later version.
82
83
84 =cut
This page took 0.049477 seconds and 4 git commands to generate.