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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Sep 8 02:07:54 EDT 2009


The branch, master has been updated
       via  f2bd5aa3abbf1be308f1abfd141c1f6de5303d10 (commit)
      from  b3a750c795da28479b0a1bf6b2b9b8283f3e7007 (commit)

Summary of changes:
 lib/Net/Lighthouse/Project.pm           |   10 ++++++----
 lib/Net/Lighthouse/Project/Changeset.pm |    5 +++--
 lib/Net/Lighthouse/Project/Message.pm   |    5 +++--
 lib/Net/Lighthouse/Project/Ticket.pm    |    9 ++-------
 4 files changed, 14 insertions(+), 15 deletions(-)

- Log -----------------------------------------------------------------
commit f2bd5aa3abbf1be308f1abfd141c1f6de5303d10
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Sep 8 14:07:47 2009 +0800

    make all arrayref attrs auto_deref

diff --git a/lib/Net/Lighthouse/Project.pm b/lib/Net/Lighthouse/Project.pm
index cd8c61e..7ae9ce8 100644
--- a/lib/Net/Lighthouse/Project.pm
+++ b/lib/Net/Lighthouse/Project.pm
@@ -17,10 +17,12 @@ has [qw/created_at updated_at/] => (
     is  => 'ro',
 );
 
-has [ qw/ open_states_list closed_states_list open_states closed_states / ] => (
-    isa => 'ArrayRef',
-    is  => 'ro',
-  );
+has [qw/ open_states_list closed_states_list open_states closed_states /] => (
+    isa        => 'ArrayRef',
+    is         => 'ro',
+    auto_deref => 1,
+);
+
 has [
     qw/default_assigned_user_id default_milestone_id id open_tickets_count /] =>
   (
diff --git a/lib/Net/Lighthouse/Project/Changeset.pm b/lib/Net/Lighthouse/Project/Changeset.pm
index 090c03a..83ef5ba 100644
--- a/lib/Net/Lighthouse/Project/Changeset.pm
+++ b/lib/Net/Lighthouse/Project/Changeset.pm
@@ -23,8 +23,9 @@ has 'changed_at' => (
 );
 
 has 'changes' => (
-    isa => 'ArrayRef',
-    is  => 'rw',
+    isa        => 'ArrayRef',
+    is         => 'rw',
+    auth_deref => 1,
 );
 
 has [qw/body title revision/] => (
diff --git a/lib/Net/Lighthouse/Project/Message.pm b/lib/Net/Lighthouse/Project/Message.pm
index f882f94..ab1fff3 100644
--- a/lib/Net/Lighthouse/Project/Message.pm
+++ b/lib/Net/Lighthouse/Project/Message.pm
@@ -24,8 +24,9 @@ has [ 'body_html', 'user_name', 'permalink', 'url', ] => (
 );
 
 has 'comments' => (
-    isa => 'ArrayRef[Net::Lighthouse::Project::Message]',
-    is  => 'ro',
+    isa        => 'ArrayRef[Net::Lighthouse::Project::Message]',
+    is         => 'ro',
+    auto_deref => 1,
 );
 
 # read&write attr
diff --git a/lib/Net/Lighthouse/Project/Ticket.pm b/lib/Net/Lighthouse/Project/Ticket.pm
index feb6efd..8cfc257 100644
--- a/lib/Net/Lighthouse/Project/Ticket.pm
+++ b/lib/Net/Lighthouse/Project/Ticket.pm
@@ -32,18 +32,13 @@ has [
   );
 
 has 'attachments' => (
-# TODO Mouse doesn't treat ArrayRef[Net::Lighthouse::Project::Ticket::Attachment]
-# as ArrayRef :/ it's a bug I think
-
-#    isa        => 'ArrayRef[Net::Lighthouse::Project::Ticket::Attachment]',
-    isa        => 'ArrayRef',
+    isa        => 'ArrayRef[Net::Lighthouse::Project::Ticket::Attachment]',
     is         => 'ro',
     auto_deref => 1,
 );
 
 has 'versions' => (
-#    isa        => 'ArrayRef[Net::Lighthouse::Project::Ticket::Version]',
-    isa        => 'ArrayRef',
+    isa        => 'ArrayRef[Net::Lighthouse::Project::Ticket::Version]',
     is         => 'ro',
     auto_deref => 1,
 );

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



More information about the Bps-public-commit mailing list