moose/moose — pull request #19 by tobyink (2013-05-22 09:53:49+00:00)
Title: Topic/rt 77406 requires attribute

Fixes RT#46347 and RT#77406, and makes seven TODO test cases pass.

It allows an attribute defined in one role (including accessors, clearers, predicates, and delegated methods associated with that attribute) to satisfy a "requires" in another role.

It still has one caveat - if the attribute has traits which would end up creating more methods, it is not aware of these. Traits are not applied to attributes until they're composed into a class, so the `_theoretically_associated_method_names` has no way of knowing what they will do.