]>
Commit | Line | Data |
---|---|---|
10c4f6f5 MG |
1 | package Gruntmaster::Data; |
2 | use v5.14; | |
3 | use warnings; | |
4 | use parent qw/Exporter/; | |
5 | ||
6 | BEGIN { $INC{'Gruntmaster/Data.pm'} = 1; } | |
7 | ||
8 | my (@jobs, %problems); | |
9 | ||
10 | sub job_inmeta { $jobs[$_[0]]{inmeta} }; | |
11 | sub set_job_inmeta { $jobs[$_[0]]{inmeta} = $_[1] }; | |
12 | sub job_problem { $jobs[$_[0]]{problem} }; | |
13 | sub set_job_problem { $jobs[$_[0]]{problem} = $_[1] }; | |
14 | ||
15 | sub set_job_result { $jobs[$_[0]]{result} = $_[1] }; | |
16 | sub set_job_result_text { $jobs[$_[0]]{result_text} = $_[1] }; | |
17 | sub set_job_results { $jobs[$_[0]]{results} = $_[1] }; | |
18 | sub set_job_errors { $jobs[$_[0]]{errors} = $_[1] }; | |
19 | sub set_job_daemon { $jobs[$_[0]]{daemon} = $_[1] }; | |
20 | ||
21 | sub problem_meta { $problems{$_[0]}{meta} } | |
22 | sub set_problem_meta { $problems{$_[0]}{meta} = $_[1] } | |
23 | ||
24 | sub get_job { $jobs[$_[0]] } | |
25 | ||
26 | sub PUBLISH {} | |
27 | sub SUBSCRIBE {} | |
28 | sub WAIT_FOR_MESSAGES {} | |
29 | ||
30 | our @EXPORT = do { | |
31 | no strict 'refs'; | |
32 | grep { $_ =~ /^[a-zA-Z]/ and exists &$_ } keys %{__PACKAGE__ . '::'}; | |
33 | }; | |
34 | ||
35 | 1 |