Created
March 10, 2010 05:19
-
-
Save pdcawley/327549 to your computer and use it in GitHub Desktop.
An example of a more complicated Moose attribute declaration
This file contains 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
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