1 |
#
|
2 |
# BuildReport.pm
|
3 |
#
|
4 |
# Originally Written by Christopher Williams
|
5 |
#
|
6 |
# Description
|
7 |
#
|
8 |
# Interface
|
9 |
# ---------
|
10 |
# new() : A new BuildReport object
|
11 |
# status() : Build exit status
|
12 |
# error([message]) : Add an error message - set pass to fail, return message
|
13 |
# list
|
14 |
# message([message]) : add an informational message
|
15 |
# report([BuildReport]) : add a BuildReport/ retrieve list of buildreports
|
16 |
|
17 |
package BuildSystem::BuildReport;
|
18 |
require 5.004;
|
19 |
|
20 |
sub new {
|
21 |
my $class=shift;
|
22 |
my $self={};
|
23 |
bless $self, $class;
|
24 |
return $self;
|
25 |
}
|
26 |
|
27 |
sub status {
|
28 |
my $self=shift;
|
29 |
if ( @_ ) {
|
30 |
$self->{status}=shift;
|
31 |
}
|
32 |
return $self->{status};
|
33 |
}
|
34 |
|
35 |
sub error {
|
36 |
my $self=shift;
|
37 |
if ( @_ ) {
|
38 |
push @{$self->{errormessage}}, shift;
|
39 |
}
|
40 |
return @{$self->{errormessage}};
|
41 |
}
|
42 |
|
43 |
sub message {
|
44 |
my $self=shift;
|
45 |
if ( @_ ) {
|
46 |
push @{$self->{message}}, shift;
|
47 |
}
|
48 |
return @{$self->{message}};
|
49 |
}
|
50 |
|
51 |
sub report {
|
52 |
my $self=shift;
|
53 |
if ( @_ ) {
|
54 |
push @{$self->{reports}}, shift;
|
55 |
}
|
56 |
return @{$self->{reports}};
|
57 |
}
|