X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FAttribute.pm;h=1e849375db7a21dabf5e63fad1c51116cc319b4b;hb=3968746e3249ebba86ee9caa5bc1cf423fba24bd;hp=dfdfbbe07ddd76218500ee884c2e70061d5baaad;hpb=28c143f390d40727155bcc7a7bb88e49b5266ff5;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index dfdfbbe..1e84937 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -574,6 +574,13 @@ sub _process_accessors { . "an accessor" ); } + if (!$self->associated_class->has_method($accessor) + && $self->associated_class->has_package_symbol('&' . $accessor)) { + Carp::cluck( + "You are overwriting a locally defined function ($accessor) with " + . "an accessor" + ); + } $self->SUPER::_process_accessors(@_); }