annotate lib/Benzin/Bugzilla/BugComment.pm @ 7:29309bc8d932

initial objects to work with bugzilla web service
author cin
date Fri, 04 Sep 2015 19:41:28 +0300
parents
children ff9c0c788382
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 {
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
7 @fields = qw(
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
8 id
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
9 );
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
10 }
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
11
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
12 use constant {
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
13 BUG_FIELDS => \@fields
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
14 };
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
15
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
16 use IMPL::declare {
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
17 base => [
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
18 'IMPL::Object::Fields' => undef
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
19 ]
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
20 };
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 fields @fields;
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
23
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
24 sub CTOR {
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
25 my SELF $this = shift;
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
26 my $data = shift;
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 $this->{$_} = $data->{$_} foreach grep exists $data->{$_}, SELF->BUG_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
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
31
29309bc8d932 initial objects to work with bugzilla web service
cin
parents:
diff changeset
32 1;