line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WWW::Bugzilla::BugTree::Bug; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1157
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
19
|
use 5.012; |
|
1
|
|
|
|
|
3
|
|
6
|
1
|
|
|
1
|
|
5
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
1
|
|
|
1
|
|
1002
|
use XML::Simple qw( XMLin ); |
|
1
|
|
|
|
|
7583
|
|
|
1
|
|
|
|
|
5
|
|
8
|
1
|
|
|
1
|
|
88
|
use overload '""' => sub { shift->as_string }; |
|
1
|
|
|
0
|
|
8
|
|
|
1
|
|
|
|
|
9
|
|
|
0
|
|
|
|
|
0
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: A bug tree returned from WWW::Bugzilla::BugTree |
11
|
|
|
|
|
|
|
our $VERSION = '0.08'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
has url => ( |
15
|
|
|
|
|
|
|
is => 'ro', |
16
|
|
|
|
|
|
|
required => 1, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has res => ( |
21
|
|
|
|
|
|
|
is => 'ro', |
22
|
|
|
|
|
|
|
required => 1, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has id => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
required => 1, |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has as_hashref => ( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
init_arg => undef, |
34
|
|
|
|
|
|
|
lazy => 1, |
35
|
|
|
|
|
|
|
default => sub { |
36
|
1
|
|
|
1
|
|
103
|
no warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
230
|
|
37
|
|
|
|
|
|
|
XMLin(shift->res->decoded_content); |
38
|
|
|
|
|
|
|
}, |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
has children => ( |
43
|
|
|
|
|
|
|
is => 'ro', |
44
|
|
|
|
|
|
|
init_arg => undef, |
45
|
|
|
|
|
|
|
default => sub { [] }, |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub as_string |
50
|
|
|
|
|
|
|
{ |
51
|
0
|
|
|
0
|
1
|
|
my($self) = @_; |
52
|
0
|
|
|
|
|
|
my $id = $self->id; |
53
|
0
|
|
|
|
|
|
my $status = $self->as_hashref->{bug}->{bug_status}; |
54
|
0
|
|
|
|
|
|
my $subject = $self->as_hashref->{bug}->{short_desc}; |
55
|
0
|
|
|
|
|
|
my $resolution = $self->as_hashref->{bug}->{resolution}; |
56
|
0
|
0
|
|
|
|
|
undef $resolution if ref $resolution; |
57
|
0
|
0
|
|
|
|
|
$resolution ? "$id $status ($resolution) $subject" : "$id $status $subject"; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# undocumented function |
61
|
|
|
|
|
|
|
sub summary_tree |
62
|
|
|
|
|
|
|
{ |
63
|
0
|
|
|
0
|
0
|
|
my($self) = @_; |
64
|
|
|
|
|
|
|
|
65
|
0
|
0
|
|
|
|
|
[ $self->as_string, @{ $self->children } > 0 ? map { $_->summary_tree } @{ $self->children } : () ]; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |