Ovid wrote:
I'm thinking about writing a module which is merely a role (Moose::Role) which one must consume. While there doesn't appear to be a standard for this, I was thinking about trying to set a precedent and use the Does:: namespace. For example, if you want a upload a role which serializes things to YAML, you might call it "Does::Serialize::YAML" to make it clear it's a role to be consumed and not a stand-alone package.

I don't think that a separate namespace for roles is warranted. In some ways this is just an implementation detail, like OO vs not.

I suggest an alternative approach is having a convention of naming roles as adjectives while naming classes as nouns.

Or at least that should work in the cases where the code is object-centric, such as with typical roles and classes in Perl 6 - Synopsis 2.

I suggest you could name your role Serializes::YAML for example.

-- Darren Duncan

Reply via email to