subtype NaturalLessThanTen
=> as Natural
- => where { $_ < 10 };
+ => where { $_ < 10 }
+ => message { "This number ($_) is not less than ten!" };
coerce Num
=> from Str
This creates a base type, which has no parent.
-=item B<subtype ($name, $parent, $where_clause)>
+=item B<subtype ($name, $parent, $where_clause, ?$message)>
This creates a named subtype.
-=item B<subtype ($parent, $where_clause)>
+=item B<subtype ($parent, $where_clause, ?$message)>
This creates an unnamed subtype and will return the type
constraint meta-object, which will be an instance of