On Fri, Dec 02, 2011 at 09:45:51AM +0800, woosley. xu. wrote: > but I think I got your point. So basically even if I run > meta->make_immutable on an constructed object, it is applied to the whole > __CLASS__, not just the object.
Right. > What I want to do is to 'with' different Roles depending on the user > arguments passed to 'new' constructor, and then make the object immutable. > is that possible? Yes, this is possible. See MooseX::Traits, which does this sort of thing for you. -doy