Kang-min Liu writes: > On Monday 26 Jul 2010 22:31:24 Ovid wrote: > > > I'm thinking about writing a module which is merely a role > > (Moose::Role) which one must consume. ... 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. > > > > Thoughts? > > Due to the fact Moose roles are used with the word 'with', it feels a little > bit weird to say something like: > > package Car; > use Moose; > with 'Does::AutoPilot';
Yes. Appending ::Role works better in terms of reading the whole thing as English. with 'AutoPilot::Role'; with 'Serialize::YAML::Role'; That also happens to address the concern expressed that such modules should be in their relevant topic's namespace. Moreover, putting "Role" in the module's name makes it abundantly obvious that it's a role to somebody who has only vaguely heard of roles. And it gives those who haven't something to Google or Duck for. Searching the web for "does" is unlikely to yield the desired explanation. > Although there is no reason not to make a keyword 'which' for that > matter. Yes, 'which does autopilot' reads nicely. Smylers -- http://twitter.com/Smylers2