llancet has asked for the wisdom of the Perl Monks concerning the following question:

I've tried to find how to do that, but there's only documents about get the attribute's type constraint, but not change that.
  • Comment on Moose: How to change type constraint of an attribute at runtime?

Replies are listed 'Best First'.
Re: Moose: How to change type constraint of an attribute at runtime?
by stvn (Monsignor) on May 31, 2010 at 03:37 UTC

    The type constraint slot is read-only, and for good reasons. There should be no reason you would ever want to do this, can you perhaps explain what you are trying to achieve?

    -stvn

      You are probably right. I'm doing something so ugly that is difficult to describe in a few words, and the implementation seems need to be changed...