Mercurial > pub > buggler
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lib/Benzin/Bugzilla/BugComment.pm Fri Sep 04 19:41:28 2015 +0300 @@ -0,0 +1,32 @@ +package Benzin::Bugzilla::BugComment; +use strict; + +my @fields; + +BEGIN { + @fields = qw( + id + ); +} + +use constant { + BUG_FIELDS => \@fields +}; + +use IMPL::declare { + base => [ + 'IMPL::Object::Fields' => undef + ] +}; + +use fields @fields; + +sub CTOR { + my SELF $this = shift; + my $data = shift; + + $this->{$_} = $data->{$_} foreach grep exists $data->{$_}, SELF->BUG_FIELDS; +} + + +1;