diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-02-18 00:43:09 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-02-18 00:43:09 -0600 |
commit | 0d5a97a87d1e42626f8e21b36ef327afd556865c (patch) | |
tree | 50d8e62e8446ab3112e9c5d740fb461d673b573f /lib/Narwhal/User.pm | |
parent | b815a6f9be0eb015728b3fb7e8b0ec6cfba94dfe (diff) | |
download | narwhal-0d5a97a87d1e42626f8e21b36ef327afd556865c.tar.gz narwhal-0d5a97a87d1e42626f8e21b36ef327afd556865c.zip |
don't duplicate user objects
Diffstat (limited to 'lib/Narwhal/User.pm')
-rw-r--r-- | lib/Narwhal/User.pm | 10 |
1 files changed, 10 insertions, 0 deletions
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; |