On Mon, Jul 26, 2010 at 03:36:30PM -0400, Ricardo Signes wrote:
> * Ovid <[email protected]> [2010-07-26T15:32:41]
> > 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 already use Role:: for some things, fwiw.
I don't see any compelling reason to put roles into their own namespace --
e.g. we don't name CPAN modules differently whether they are classes that
instantiate objects, vs. packages of library functions that export
things. Wouldn't it be enough to just be clear in the Synopsis that the
correct way to use this module is via:
use Moose;
with 'Module';
vs. other common ways to use a CPAN module:
use Module qw(:feature_set function1 function2);
or
use Module;
my $obj = Module->new(%options);
--
"Reserve your right to think, for even to think wrongly is
better than not to think at all." - Hypatia of Alexandria
. . . . .
Karen Etheridge, [email protected] GCS C+++$ USL+++$ P+++$ w--- M++
http://etheridge.ca/ PS++ PE-- b++ DI++++ e++ h(-)