Skip to content

Instantly share code, notes, and snippets.

@pdcawley
Created March 10, 2010 05:19
Show Gist options
  • Save pdcawley/327549 to your computer and use it in GitHub Desktop.
Save pdcawley/327549 to your computer and use it in GitHub Desktop.
An example of a more complicated Moose attribute declaration
use MP::MS5::Types qw[ClientType];
has _client_types => (
is => 'rw',
default => sub { [] },
coerce => 1,
isa => ClientTypes,
traits => [qw(Array)],
handles => {
register => 'push',
client_types => 'elements',
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment