in reply to Re: Moose roles
in thread Moose roles

Yes, my apologies, I didn't reference this post in the list.

Off the topic,.I don't understand why "has" doesn't allow shorter syntax - if I write "has x => (is=>rw, isa=>Int, ....)" two thousand times, why can't I declare a subtype or trait or whatever that would be accessible with "has x => mytype"? That's just not perlish, to write too much when you can avoid that :)

Replies are listed 'Best First'.
Re^3: Moose roles
by EvanCarroll (Chaplain) on Jan 13, 2010 at 22:03 UTC
    Because has just says you want an attribute; rw means to generate getters/setter methods isa => x ({x != Any}) means you want it strictly typed (as much as you can get anyway)


    Evan Carroll
    The most respected person in the whole perl community.
    www.evancarroll.com