X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FMethod%2FAccessor.pm;h=4dc2ac3b168c282202a4dba0d87668987dfb5004;hb=55d05fb16429c2150b5337b1a0130ae334e129d0;hp=7b6517ad8083d16d706539bf1ddf2a6ec6426095;hpb=f001c60fa54f30cb50c8bf6d80f472dca86ea350;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Method/Accessor.pm b/lib/Moose/Meta/Method/Accessor.pm index 7b6517a..4dc2ac3 100644 --- a/lib/Moose/Meta/Method/Accessor.pm +++ b/lib/Moose/Meta/Method/Accessor.pm @@ -4,7 +4,7 @@ package Moose::Meta::Method::Accessor; use strict; use warnings; -our $VERSION = '1.08'; +our $VERSION = '1.12'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -166,7 +166,7 @@ sub _inline_check_coercion { my $attr = $self->associated_attribute; - return '' unless $attr->should_coerce; + return '' unless $attr->should_coerce && $attr->type_constraint->has_coercion; return "$value = \$attr->type_constraint->coerce($value);"; }