Permalink
Browse files

id_for_user refactoring

  • Loading branch information...
1 parent c986efe commit 475ffecb48be9f6685ec1a79d6a360c6863796d7 @nothingmuch committed Apr 13, 2009
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/KiokuX/User/ID.pm
View
@@ -7,7 +7,15 @@ use namespace::clean -except => 'meta';
with qw(KiokuDB::Role::ID);
-sub kiokudb_object_id { "user:" . shift->id }
+sub id_for_user {
+ my ( $self, $id ) = @_;
+ return "user:$id"
+}
+
+sub kiokudb_object_id {
+ my $self = shift;
+ $self->id_for_user($self->id);
+}
has id => (
isa => "Str",

0 comments on commit 475ffec

Please sign in to comment.