annotate lib/Benzin/Bugzilla/BugComment.pm @ 11:4eb9fdf4efa9

refactoring, non-working bookings
author cin
date Mon, 07 Sep 2015 19:18:21 +0300
parents cc7244ab1b9f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
1 package Benzin::Bugzilla::BugComment;
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
2 use strict;
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
3
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
4 my @fields;
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
5
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
6 BEGIN {
9
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
7 @fields = qw(
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
8 id
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
9 bug_id
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
10 attachment_id
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
11 count
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
12 text
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
13 creator
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
14 creation_time
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
15 is_private
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
16 is_markdown
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
17 );
7
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
18 }
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
19
9
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
20 use constant { COMMENT_FIELDS => \@fields };
7
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
21
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
22 use IMPL::declare {
9
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
23 base => [
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
24 'IMPL::Object::Fields' => undef
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
25 ]
7
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
26 };
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
27
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
28 use fields @fields;
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
29
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
30 sub CTOR {
9
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
31 my SELF $this = shift;
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
32 my $data = shift;
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
33
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
34 $this->{$_} = $data->{$_}
cc7244ab1b9f implemented time reports on bugs
cin
parents: 8
diff changeset
35 foreach grep exists $data->{$_}, @{ SELF->COMMENT_FIELDS };
7
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
36 }
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
37
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
38 1;