X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FClass.pm;h=7b40497d53b9b2af1ebfd531ccafa7461cb57785;hp=a33083afaf8949e7b27bf8f1d7fc8347814b2c6c;hb=6a8eecb78c88a4d9d77b03e8cf5885b5c6a1fdf9;hpb=8c9b95f269d4936aa47e2d787a27f398a1c87197 diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index a33083a..7b40497 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -65,6 +65,7 @@ sub find_method_by_name{ my($self, $method_name) = @_; defined($method_name) or $self->throw_error('You must define a method name to find'); + foreach my $class( $self->linearized_isa ){ my $method = $self->initialize($class)->get_method($method_name); return $method if defined $method; @@ -143,7 +144,8 @@ sub add_attribute { } sub compute_all_applicable_attributes { - Carp::cluck('compute_all_applicable_attributes() has been deprecated'); + Carp::cluck('compute_all_applicable_attributes() has been deprecated') + if _MOUSE_VERBOSE; return shift->get_all_attributes(@_) } @@ -186,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; @@ -204,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; @@ -470,6 +472,10 @@ __END__ Mouse::Meta::Class - The Mouse class metaclass +=head1 VERSION + +This document describes Mouse version 0.39 + =head1 METHODS =head2 C<< initialize(ClassName) -> Mouse::Meta::Class >>