[Moose-commits] r7140 - in Moose/trunk: . lib/Moose/Meta

sartak at code2.0beta.co.uk sartak at code2.0beta.co.uk
Sun Dec 21 23:12:37 GMT 2008


Author: sartak
Date: 2008-12-21 15:12:37 -0800 (Sun, 21 Dec 2008)
New Revision: 7140

Modified:
   Moose/trunk/
   Moose/trunk/Changes
   Moose/trunk/lib/Moose/Meta/Attribute.pm
Log:
 r77726 at onn:  sartak | 2008-12-21 18:12:27 -0500
 Actually, call that verify_type_constraint



Property changes on: Moose/trunk
___________________________________________________________________
Name: svk:merge
   - 08e7d58d-de06-4458-8c15-335e402ab116:/local/Moose:77724
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/BUILDARGS:4770
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/Moose-dumb_roles:1727
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/Moose-moosex_compile_support:3337
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/Moose-real_class_meta_type_constraint:3322
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/deprototype:6072
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/inline_wrapped_constructor:3777
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/meta-role-helper:5585
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/method-changes:5953
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/moose-exporter:5196
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/parameterize_constructor_role:5927
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/parameterized_type_fixes:6365
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/predicate_fix:2940
48425d73-d564-4cf1-a4fc-b7d19ba782dc:/local/Moose:54077
f7901bf9-e7b5-442b-97a4-4d7fd5798e10:/local/moose/Moose:41354
   + 08e7d58d-de06-4458-8c15-335e402ab116:/local/Moose:77726
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/BUILDARGS:4770
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/Moose-dumb_roles:1727
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/Moose-moosex_compile_support:3337
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/Moose-real_class_meta_type_constraint:3322
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/deprototype:6072
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/inline_wrapped_constructor:3777
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/meta-role-helper:5585
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/method-changes:5953
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/moose-exporter:5196
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/parameterize_constructor_role:5927
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/parameterized_type_fixes:6365
3efe9002-19ed-0310-8735-a98156148065:/Moose/branches/predicate_fix:2940
48425d73-d564-4cf1-a4fc-b7d19ba782dc:/local/Moose:54077
f7901bf9-e7b5-442b-97a4-4d7fd5798e10:/local/moose/Moose:41354

Modified: Moose/trunk/Changes
===================================================================
--- Moose/trunk/Changes	2008-12-21 23:10:19 UTC (rev 7139)
+++ Moose/trunk/Changes	2008-12-21 23:12:37 UTC (rev 7140)
@@ -5,7 +5,7 @@
       - 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)

Modified: Moose/trunk/lib/Moose/Meta/Attribute.pm
===================================================================
--- Moose/trunk/lib/Moose/Meta/Attribute.pm	2008-12-21 23:10:19 UTC (rev 7139)
+++ Moose/trunk/lib/Moose/Meta/Attribute.pm	2008-12-21 23:12:37 UTC (rev 7140)
@@ -411,7 +411,7 @@
         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 @@
         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 @@
                 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 check_type_constraint {
+sub verify_type_constraint {
     my $self = shift;
     my $val  = shift;
 
@@ -850,9 +850,9 @@
 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>




More information about the Moose-commits mailing list