From: Jesse Luehrs Date: Mon, 18 Oct 2010 21:59:27 +0000 (-0500) Subject: use type_constraint_obj here X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=896fe69d27a7b3fd1e0e97437a9c74aee5ba76fe;p=gitmo%2FMoose.git use type_constraint_obj here --- diff --git a/lib/Moose/Meta/Method/Accessor.pm b/lib/Moose/Meta/Method/Accessor.pm index d384b78..dc82a64 100644 --- a/lib/Moose/Meta/Method/Accessor.pm +++ b/lib/Moose/Meta/Method/Accessor.pm @@ -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 {