use type_constraint_obj here
Jesse Luehrs [Mon, 18 Oct 2010 21:59:27 +0000 (16:59 -0500)]
lib/Moose/Meta/Method/Accessor.pm

index d384b78..dc82a64 100644 (file)
@@ -169,7 +169,7 @@ sub _inline_check_coercion {
     my $attr = $self->associated_attribute;
 
     return '' unless $attr->should_coerce && $attr->type_constraint->has_coercion;
-    return "$value = \$attr->type_constraint->coerce($value);";
+    return "$value = \$type_constraint_obj->coerce($value);";
 }
 
 sub _inline_check_required {