use Moose::Util::TypeConstraints; enum 'RGBColors', [qw(red green blue)];
(FWIW this is the first hit on https://www.google.com/search?q=moose+enum ) On Wed, Apr 4, 2012 at 9:27 AM, Dov Levenglick <[email protected]>wrote: > Hi, > I want to declare a 3 value'd enum equivalent - i.e. (mixing C and perl): > > package My::Enum > use Moose; > > typedef enum {A, B, C} enum_t; // knowledge in C - how do I > port this concept to Perl? > has 'b' => (isa => 'enum_t', is => 'rw'); > > 1; > > > How would one go about doing that > > > Best Regards, > Dov Levenglick > _______________________________________________ > Perl mailing list > [email protected] > http://mail.perl.org.il/mailman/listinfo/perl > -- Gaal Yahas <[email protected]> http://gaal.livejournal.com/
_______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
