Commits on Jul 4, 2013
The attached tests / Changes diff should explain this. We can now use default values returned by subs too, so this also works for e.g. HashRef where you want to supply a default value.
Commits on Jul 1, 2013
Commits on May 2, 2012
A lot of our existing validation code just warns on or ignores invalid values, whereas Moose will die on invalid values. This makes converting a lot of code inconvenient, particularly code that has values that are supplied directly by the user, usually we don't want the whole process to die if we have some invalid parameter. We're dealing with these in some cases by wrapping a Moose constructor in try/catch, but that only allows us to either construct an object or not, this trait gives us a much more finely grained control over this not an attribute level. Now you can define on an attribute level what should be done with invalid values, we can either throw an error (the default), warn and keep the invalid value, fall back on the default either with a warning or without one.