bump version to 1.25
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint.pm
index 00a8a0f..bd7b4ab 100644 (file)
@@ -15,7 +15,7 @@ use Sub::Name qw(subname);
 
 use base qw(Class::MOP::Object);
 
-our $VERSION   = '1.17';
+our $VERSION   = '1.25';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -402,9 +402,17 @@ C<equals> and C<is_subtype_of>.
 
 =item B<< $constraint->coerce($value) >>
 
-This will attempt to coerce the value to the type. If the type does
+This will attempt to coerce the value to the type. If the type does not
 have any defined coercions this will throw an error.
 
+If no coercion can produce a value matching C<$constraint>, the original
+value is returned.
+
+=item B<< $constraint->assert_coerce($value) >>
+
+This method behaves just like C<coerce>, but if the result is not valid
+according to C<$constraint>, an error is thrown.
+
 =item B<< $constraint->check($value) >>
 
 Returns true if the given value passes the constraint for the type.