X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FAttribute.pm;h=eb3613f539207b07e053f1a2822c579167a7e1a1;hp=6a897742a0e25eabb0533e2db78cc14f1294f460;hb=d503a4f3aa9eda772309f6c99ccd4dfcdfed059d;hpb=a2db83e38b11a6f16370ade6061dec71ab4b8106 diff --git a/lib/Mouse/Meta/Attribute.pm b/lib/Mouse/Meta/Attribute.pm index 6a89774..eb3613f 100644 --- a/lib/Mouse/Meta/Attribute.pm +++ b/lib/Mouse/Meta/Attribute.pm @@ -335,6 +335,12 @@ sub install_accessors{ $attribute->create($metaclass, $attribute->name, %{$attribute}); } + if(!$attribute->{associated_methods} && ($attribute->{is} || '') ne 'bare'){ + Carp::cluck( + 'Attribute (' . $attribute->name . ') of class ' . $metaclass->name + . ' has no associated methods (did you mean to provide an "is" argument?)'); + } + return; } @@ -375,10 +381,7 @@ sub _make_delegation_method { my $delegator = $self->delegation_metaclass; Mouse::Util::load_class($delegator); - return $delegator->_generate_delegation($self, $handle, - ref($method_to_call) eq 'ARRAY' - ? @{$method_to_call} - : $method_to_call); + return $delegator->_generate_delegation($self, $handle, $method_to_call); } sub throw_error{ @@ -397,7 +400,7 @@ Mouse::Meta::Attribute - The Mouse attribute metaclass =head1 VERSION -This document describes Mouse version 0.50_01 +This document describes Mouse version 0.50_02 =head1 METHODS