X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FClass.pm;h=563a208ef3217b9bff4b0e94481e6a2a8e21fb7c;hb=83fd4df5c46993d68fc0c2d84a1faffaef2b3cdd;hp=ab75b2b5048473f655b8f113a5a3c75209a7f245;hpb=0126c27c413cb63f67e66e09b0fdfeb92117503a;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index ab75b2b..563a208 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -188,7 +188,7 @@ sub _initialize_object{ my $key = $attribute->name; if (defined($from) && exists($args->{$from})) { - $object->{$key} = $attribute->_coerce_and_verify($args->{$from}); + $object->{$key} = $attribute->_coerce_and_verify($args->{$from}, $object); weaken($object->{$key}) if ref($object->{$key}) && $attribute->is_weak_ref; @@ -206,7 +206,7 @@ sub _initialize_object{ : ref($default) eq 'CODE' ? $object->$default() : $default; - $object->{$key} = $attribute->_coerce_and_verify($value, $object);; + $object->{$key} = $attribute->_coerce_and_verify($value, $object); weaken($object->{$key}) if ref($object->{$key}) && $attribute->is_weak_ref;