Support problem parameters outside meta
[gruntmaster-daemon.git] / t / FakeData.pm
CommitLineData
10c4f6f5
MG
1package Gruntmaster::Data;
2use v5.14;
3use warnings;
4use parent qw/Exporter/;
5
6BEGIN { $INC{'Gruntmaster/Data.pm'} = 1; }
7
8my (@jobs, %problems);
9
10sub job_inmeta { $jobs[$_[0]]{inmeta} };
11sub set_job_inmeta { $jobs[$_[0]]{inmeta} = $_[1] };
12sub job_problem { $jobs[$_[0]]{problem} };
13sub set_job_problem { $jobs[$_[0]]{problem} = $_[1] };
14
15sub set_job_result { $jobs[$_[0]]{result} = $_[1] };
16sub set_job_result_text { $jobs[$_[0]]{result_text} = $_[1] };
17sub set_job_results { $jobs[$_[0]]{results} = $_[1] };
18sub set_job_errors { $jobs[$_[0]]{errors} = $_[1] };
19sub set_job_daemon { $jobs[$_[0]]{daemon} = $_[1] };
20
6d590c60 21sub problem_meta { $problems{$_}{meta} }
10c4f6f5 22sub set_problem_meta { $problems{$_[0]}{meta} = $_[1] }
6d590c60
MG
23sub problem_generator {}
24sub problem_runner {}
25sub problem_judge {}
26sub problem_testcnt {}
27sub problem_timeout {}
28sub problem_olimit {}
10c4f6f5
MG
29
30sub get_job { $jobs[$_[0]] }
31
32sub PUBLISH {}
33sub SUBSCRIBE {}
34sub WAIT_FOR_MESSAGES {}
35
36our @EXPORT = do {
37 no strict 'refs';
38 grep { $_ =~ /^[a-zA-Z]/ and exists &$_ } keys %{__PACKAGE__ . '::'};
39};
40
411
This page took 0.011858 seconds and 4 git commands to generate.