From: Jesse Luehrs Date: Mon, 18 Oct 2010 21:59:27 +0000 (-0500) Subject: use type_constraint_obj here X-Git-Tag: 1.9900~44 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c604738d17f2907326ec576948b73db9f767d6e0;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 59c9341..7d81fa1 100644 --- a/lib/Moose/Meta/Method/Accessor.pm +++ b/lib/Moose/Meta/Method/Accessor.pm @@ -172,7 +172,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 {