good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^4: Making 'all' the attributes read only by default (Moo)by blindluke (Hermit) |
on Jan 23, 2015 at 11:07 UTC ( [id://1114265]=note: print w/replies, xml ) | Need Help?? |
Can the Boo constant consume a role? I don't think so. I know that your replies are usually both knowledgeable and helpful, as I've learned much from many of them, so I'll skip over the 'angst' remark and try to provide an example that better conveys my aim:
I'm asking about a way to state that all the attributes of Ghost are readonly, as I think that:
or something like this, would be much more elegant than the way I am using now. If my "classes" did not consume roles, had no methods, and were as simple as the one I provided, then I would have no reason to use Moo in the first place. - Luke
In Section
Seekers of Perl Wisdom
|
|