(defined($type_constraint->check($val)))
|| confess "Attribute (" .
$self->name .
- ") does not pass the type contraint (" .
+ ") does not pass the type constraint (" .
$type_constraint->name .
") with '$val'";
}
# FIXME - remove 'unless defined($value) - constraint Undef
return sprintf <<'EOF', $value, $value, $value, $value
defined($attr->type_constraint->check(%s))
- || confess "Attribute (" . $attr->name . ") does not pass the type contraint ("
+ || confess "Attribute (" . $attr->name . ") does not pass the type constraint ("
. $attr->type_constraint->name . ") with " . (defined(%s) ? "'%s'" : "undef")
if defined(%s);
EOF
=head2 Additional Moose features
-Moose attributes support type-contstraint checking, weak reference
+Moose attributes support type-constraint checking, weak reference
creation and type coercion.
=over 4