line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Lighthouse::Project::Ticket::Version; |
2
|
3
|
|
|
3
|
|
3272
|
use Any::Moose; |
|
3
|
|
|
|
|
43000
|
|
|
3
|
|
|
|
|
24
|
|
3
|
3
|
|
|
3
|
|
1540
|
use Params::Validate ':all'; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
705
|
|
4
|
3
|
|
|
3
|
|
557
|
use Net::Lighthouse::Util; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
372
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# read only attr |
7
|
|
|
|
|
|
|
has [qw/created_at updated_at/] => ( |
8
|
|
|
|
|
|
|
isa => 'DateTime', |
9
|
|
|
|
|
|
|
is => 'ro', |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has [ |
13
|
|
|
|
|
|
|
qw/milestone_id assigned_user_id number user_id |
14
|
|
|
|
|
|
|
project_id creator_id attachments_count/ |
15
|
|
|
|
|
|
|
] => ( |
16
|
|
|
|
|
|
|
isa => 'Maybe[Int]', |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has [qw/closed/] => ( |
21
|
|
|
|
|
|
|
isa => 'Bool', |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
has [qw/diffable_attributes/] => ( |
26
|
|
|
|
|
|
|
isa => 'HashRef', |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
has [ |
31
|
|
|
|
|
|
|
'assigned_user_name', 'body', |
32
|
|
|
|
|
|
|
'body_html', 'permalink', |
33
|
|
|
|
|
|
|
'state', 'tag', |
34
|
|
|
|
|
|
|
'title', 'user_id', |
35
|
|
|
|
|
|
|
'user_name', 'creator_name', |
36
|
|
|
|
|
|
|
'url', 'milestone_title', |
37
|
|
|
|
|
|
|
] => ( |
38
|
|
|
|
|
|
|
isa => 'Maybe[Str]', |
39
|
|
|
|
|
|
|
is => 'ro', |
40
|
|
|
|
|
|
|
); |
41
|
|
|
|
|
|
|
|
42
|
3
|
|
|
3
|
|
31
|
no Any::Moose; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
23
|
|
43
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub load_from_xml { |
46
|
2
|
|
|
2
|
1
|
8686
|
my $self = shift; |
47
|
2
|
|
|
|
|
20
|
my $ref = Net::Lighthouse::Util->translate_from_xml(shift); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
# dirty hack: some attrs are read-only, and Mouse doesn't support |
50
|
|
|
|
|
|
|
# writer => '...' |
51
|
2
|
|
|
|
|
16
|
for my $k ( keys %$ref ) { |
52
|
44
|
|
|
|
|
122
|
$self->{$k} = $ref->{$k}; |
53
|
|
|
|
|
|
|
} |
54
|
2
|
|
|
|
|
22
|
return $self; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |