From 0d5a97a87d1e42626f8e21b36ef327afd556865c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 18 Feb 2011 00:43:09 -0600 Subject: don't duplicate user objects --- lib/Narwhal/User.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/Narwhal/User.pm') diff --git a/lib/Narwhal/User.pm b/lib/Narwhal/User.pm index 6bb66c6..5ce4a63 100644 --- a/lib/Narwhal/User.pm +++ b/lib/Narwhal/User.pm @@ -1,12 +1,22 @@ package Narwhal::User; use Moose; +with 'KiokuDB::Role::ID'; + has id => ( is => 'ro', isa => 'Str', required => 1, ); +has is_anon => ( + is => 'ro', + isa => 'Str', + default => 0, +); + +sub kiokudb_object_id { 'user:' . shift->id } + __PACKAGE__->meta->make_immutable; no Moose; -- cgit v1.2.3-54-g00ecf