[Moose-commits] r7148 - in Moose/trunk: . lib/Moose/Meta
sartak at code2.0beta.co.uk
sartak at code2.0beta.co.uk
Mon Dec 22 02:52:12 GMT 2008
Author: sartak
Date: 2008-12-21 18:52:12 -0800 (Sun, 21 Dec 2008)
New Revision: 7148
Modified:
Moose/trunk/
Moose/trunk/Changes
Moose/trunk/lib/Moose/Meta/Attribute.pm
Log:
r77743 at onn: sartak | 2008-12-21 21:48:55 -0500
Rename verify_type_constraint to verify_against_type_constraint
Property changes on: Moose/trunk
___________________________________________________________________
Name: svk:merge
- 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
+ 08e7d58d-de06-4458-8c15-335e402ab116:/local/Moose:77743
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-22 02:45:39 UTC (rev 7147)
+++ Moose/trunk/Changes 2008-12-22 02:52:12 UTC (rev 7148)
@@ -5,8 +5,8 @@
- Always inline predicate and clearer methods (Sartak)
* Moose::Meta::Attribute
- Support for parameterized traits (Sartak)
- - verify_type_constraint method to avoid duplication and
- enhance extensibility (Sartak)
+ - verify_against_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-22 02:45:39 UTC (rev 7147)
+++ Moose/trunk/lib/Moose/Meta/Attribute.pm 2008-12-22 02:52:12 UTC (rev 7148)
@@ -411,7 +411,7 @@
if ($self->should_coerce && $type_constraint->has_coercion) {
$val = $type_constraint->coerce($val);
}
- $self->verify_type_constraint($val, instance => $instance);
+ $self->verify_against_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->verify_type_constraint($val, object => $instance);
+ $self->verify_against_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->verify_type_constraint($value);
+ $self->verify_against_type_constraint($value);
}
$self->set_initial_value($instance, $value);
}
@@ -720,7 +720,7 @@
);
}
-sub verify_type_constraint {
+sub verify_against_type_constraint {
my $self = shift;
my $val = shift;
@@ -850,7 +850,7 @@
more information on what you can do with this, see the documentation
for L<Moose::Meta::TypeConstraint>.
-=item B<verify_type_constraint>
+=item B<verify_against_type_constraint>
Verifies that the given value is valid under this attribute's type
constraint, otherwise throws an error.
More information about the Moose-commits
mailing list