Skip to content

Instantly share code, notes, and snippets.

@perigrin
Created December 23, 2009 19:07
Show Gist options
  • Select an option

  • Save perigrin/262716 to your computer and use it in GitHub Desktop.

Select an option

Save perigrin/262716 to your computer and use it in GitHub Desktop.
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