[Chicago-talk] Moose Role naming conventions

Sean Blanton sean at blanton.com
Mon Apr 12 12:38:33 PDT 2010


Since Moose Roles go into the same package format as regular classes, how
are people organizing them so they can be distinguished from classes that
use them?

A) Through namespace, as in:

My::Dog

My::Dog::Roles::Guide

My::Dog::Roles::Stray



B) through the package names (I think I'm going to go with this one):

My::Dog

My::Dog_GuideRole

My::Dog_StrayRole



C) or you don’t care at all about the fact that a .pm file might be a Moose
role:

My::Dog

My::Dog::Guide

My::Dog::Stray


I’d like to hear what others consider when making a decision.

Does a Moose role even have to be a package?


Regards,
Sean

Sean Blanton, Ph.D.

Connect: http://www.linkedin.com/in/seanblanton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20100412/e8a6d500/attachment.html>


More information about the Chicago-talk mailing list