Subject: | contraint typos |
[Cc]onstraint is spelled [Cc]ontraint a few times, esp. in an error
message, which I am using for testing. A simple %s/ntraint/nstraint/g
for Moose::Meta::Attribute would fix the immediate issue I have when
testing type constraints, but doing that for
Moose::Util::TypeConstraints and Moose would fix a couple typos in the
docs. Attached is a patch.
Subject: | contraints.patch |
--- lib/Moose/Meta/Attribute.pm.orig 2006-08-19 20:14:23.000000000 -0700
+++ lib/Moose/Meta/Attribute.pm 2006-08-19 20:15:02.000000000 -0700
@@ -211,7 +211,7 @@
(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'";
}
@@ -231,7 +231,7 @@
# 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
--- lib/Moose/Util/TypeConstraints.pm.orig 2006-08-19 20:14:33.000000000 -0700
+++ lib/Moose/Util/TypeConstraints.pm 2006-08-19 20:15:21.000000000 -0700
@@ -182,7 +182,7 @@
=head1 DESCRIPTION
-This module provides Moose with the ability to create type contraints
+This module provides Moose with the ability to create type constraints
to be are used in both attribute definitions and for method argument
validation.
--- lib/Moose.pm.orig 2006-08-19 20:14:41.000000000 -0700
+++ lib/Moose.pm 2006-08-19 20:15:36.000000000 -0700
@@ -560,7 +560,7 @@
=item Without Yuval "nothingmuch" Kogman this module would not be possible,
and it certainly wouldn't have this name ;P
-=item The basis of the TypeContraints module was Rob Kinyon's idea
+=item The basis of the TypeConstraints module was Rob Kinyon's idea
originally, I just ran with it.
=item Thanks to mst & chansen and the whole #moose poose for all the