Skip to content
Commits on Jul 4, 2013
  1. v0.03

    committed Jul 4, 2013
       - When you supplied `on_typeconstraint_failure => "default"' or
         `on_typeconstraint_failure => "default_no_warning"' with a
         default sub { ... } we'd just return the CodeRef instead of its
         value. Now we do the right thing and call the sub to get the
         value instead.
  2. Support default values that are subs as well as normal scalars

    committed 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
  1. v0.02

    committed Jul 1, 2013
       - Add tests and documentation about the limitations of this module.
Commits on May 2, 2012
  1. v0.01

    committed May 2, 2012
        - Initial buggy version
  2. Add a custom Moose attribute to control the fatality of TypeConstraints

    committed 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.
Something went wrong with that request. Please try again.