Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

id_for_user refactoring

  • Loading branch information...
commit 475ffecb48be9f6685ec1a79d6a360c6863796d7 1 parent c986efe
@nothingmuch authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/KiokuX/User/ID.pm
View
10 lib/KiokuX/User/ID.pm
@@ -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",
Please sign in to comment.
Something went wrong with that request. Please try again.