Fix test failure introduced several commits ago
[gruntmaster-daemon.git] / lib / Gruntmaster / Daemon / Constants.pm
CommitLineData
5c5cd38a
MG
1package Gruntmaster::Daemon::Constants;
2
3use 5.014000;
4use strict;
5use warnings;
6use parent qw/Exporter/;
7
3e7fd903 8our $VERSION = "5999.000_004";
5c5cd38a
MG
9
10use constant +{
a722431b
MG
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,
5c5cd38a
MG
24};
25
26our @EXPORT_OK = qw/AC ERR WA NZX TLE OLE DIED REJ/;
bc372959
MG
27
281;
29__END__
30
31=encoding utf-8
32
33=head1 NAME
34
35Gruntmaster::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
46Gruntmaster::Daemon::Constants provides constants which are used in more than one module.
47
48The 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
72Marius Gavrilescu E<lt>marius@ieval.roE<gt>
73
74=head1 COPYRIGHT AND LICENSE
75
76Copyright (C) 2014 by Marius Gavrilescu
77
78This library is free software: you can redistribute it and/or modify
79it under the terms of the GNU Affero General Public License as published by
80the 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.018408 seconds and 4 git commands to generate.