Re: make_immutable bug?

[email protected] (Jesse Luehrs)
Newsgroups perl.moose
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.