[Bps-public-commit] net-lighthouse branch, master, updated. 587dc22707f8740a9262b3b3f7a41c6057977d7b

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Aug 27 04:01:42 EDT 2009


The branch, master has been updated
       via  587dc22707f8740a9262b3b3f7a41c6057977d7b (commit)
      from  d04b74a892643d924b754b684cb5b5fb3239f883 (commit)

Summary of changes:
 lib/Net/Lighthouse/Project/Message.pm |   65 +++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 0 deletions(-)
 create mode 100644 lib/Net/Lighthouse/Project/Message.pm

- Log -----------------------------------------------------------------
commit 587dc22707f8740a9262b3b3f7a41c6057977d7b
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Aug 27 16:01:38 2009 +0800

    implement attrs for message

diff --git a/lib/Net/Lighthouse/Project/Message.pm b/lib/Net/Lighthouse/Project/Message.pm
new file mode 100644
index 0000000..d86b22c
--- /dev/null
+++ b/lib/Net/Lighthouse/Project/Message.pm
@@ -0,0 +1,65 @@
+package Net::Lighthouse::Project::Message;
+use Any::Moose;
+use XML::Simple;
+use Params::Validate ':all';
+use Net::Lighthouse::Util;
+extends 'Net::Lighthouse';
+# read only attr
+has [
+    'created_at',     'body_html',
+    'user_name',      'permalink',
+    'comments_count', 'parent_id',
+    'url',            'updated_at',
+    'id',             'user_id',
+    'project_id',     'all_attachments_count',
+    'attachments_count',
+  ] => (
+    isa => 'Maybe[Str]',
+    is  => 'ro',
+  );
+
+has 'comments' => (
+    isa => 'ArrayRef[Net::Lighthouse::Project::Message]',
+    is  => 'ro',
+);
+
+# read&write attr
+has [qw/title body/] => (
+    isa => 'Maybe[Str]',
+    is  => 'rw',
+);
+
+no Any::Moose;
+__PACKAGE__->meta->make_immutable;
+
+
+1;
+
+__END__
+
+=head1 NAME
+
+Net::Lighthouse::Project::Message - 
+
+=head1 SYNOPSIS
+
+    use Net::Lighthouse::Project::Message;
+
+=head1 DESCRIPTION
+
+
+=head1 INTERFACE
+
+
+=head1 AUTHOR
+
+sunnavy  C<< <sunnavy at bestpractical.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright 2009 Best Practical Solutions.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list