Created
December 23, 2009 19:07
-
-
Save perigrin/262716 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package MyApp::Model::User; | |
| use Moose; | |
| use KiokuDB::Util qw(set weak_set); | |
| use MooseX::Aliases; | |
| use MooseX::Types::Email qw/EmailAddress/; | |
| use namespace::autoclean; | |
| with qw( | |
| KiokuX::User | |
| ); | |
| has email => ( | |
| isa => EmailAddress, | |
| is => 'ro', | |
| alias => [qw(id kiokudb_object_id key)], | |
| required => 1, | |
| ); | |
| has [qw(first_name last_name)] => ( | |
| isa => 'Str', | |
| is => 'ro', | |
| ); | |
| has [qw(verified agree_tos)] => ( isa => 'Bool', is => 'rw', default => 0 ); | |
| 1; | |
| __END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment