comparison 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
comparison
equal deleted inserted replaced
6:2a5f38eb25a9 7:29309bc8d932
1 package Benzin::Bugzilla::BugComment;
2 use strict;
3
4 my @fields;
5
6 BEGIN {
7 @fields = qw(
8 id
9 );
10 }
11
12 use constant {
13 BUG_FIELDS => \@fields
14 };
15
16 use IMPL::declare {
17 base => [
18 'IMPL::Object::Fields' => undef
19 ]
20 };
21
22 use fields @fields;
23
24 sub CTOR {
25 my SELF $this = shift;
26 my $data = shift;
27
28 $this->{$_} = $data->{$_} foreach grep exists $data->{$_}, SELF->BUG_FIELDS;
29 }
30
31
32 1;