Actually, call that verify_type_constraint
Shawn M Moore [Sun, 21 Dec 2008 23:12:37 +0000 (23:12 +0000)]
Changes
lib/Moose/Meta/Attribute.pm

diff --git a/Changes b/Changes
index 42e4537..e62788d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,7 +5,7 @@ Revision history for Perl extension Moose
       - Always inline predicate and clearer methods (Sartak)
     * Moose::Meta::Attribute
       - Support for parameterized traits (Sartak)
-      - check_type_constraint method to avoid duplication and
+      - verify_type_constraint method to avoid duplication and
         enhance extensibility (Sartak)
     * Moose::Meta::Class
       - Tests (but no support yet) for parameterized traits (Sartak)
index 88d3756..fa86b7d 100644 (file)
@@ -411,7 +411,7 @@ sub initialize_instance_slot {
         if ($self->should_coerce && $type_constraint->has_coercion) {
             $val = $type_constraint->coerce($val);
         }
-        $self->check_type_constraint($val, instance => $instance);
+        $self->verify_type_constraint($val, instance => $instance);
     }
 
     $self->set_initial_value($instance, $val);
@@ -463,7 +463,7 @@ sub _set_initial_slot_value {
         if ($type_constraint) {
             $val = $type_constraint->coerce($val)
                 if $can_coerce;
-            $self->check_type_constraint($val, object => $instance);
+            $self->verify_type_constraint($val, object => $instance);
         }
         $meta_instance->set_slot_value($instance, $slot_name, $val);
     };
@@ -527,7 +527,7 @@ sub get_value {
                 my $type_constraint = $self->type_constraint;
                 $value = $type_constraint->coerce($value)
                     if ($self->should_coerce);
-                $self->check_type_constraint($value);
+                $self->verify_type_constraint($value);
             }
             $self->set_initial_value($instance, $value);
         }
@@ -720,7 +720,7 @@ sub _make_delegation_method {
     );
 }
 
-sub check_type_constraint {
+sub verify_type_constraint {
     my $self = shift;
     my $val  = shift;
 
@@ -850,9 +850,9 @@ A read-only accessor for this meta-attribute's type constraint. For
 more information on what you can do with this, see the documentation
 for L<Moose::Meta::TypeConstraint>.
 
-=item B<check_type_constraint>
+=item B<verify_type_constraint>
 
-Confirms that the given value is valid under this attribute's type
+Verifies that the given value is valid under this attribute's type
 constraint, otherwise throws an error.
 
 =item B<has_handles>