Re: Distributing Roles
[email protected] (Karen Etheridge) Tue, 1 Dec 2015 19:19:57 -0800
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <CAPJsHfCu8Bg7gtdAzhgCw5ytWC6DFqR-Cw_KAmqWDm9Ba8wsmg@mail.gmail.com> |
--001a1134f1d8ab5a930525e1bf7b Content-Type: text/plain; charset=UTF-8 The MooseX::* namespace should not be used for roles -- it is for things that extend Moose itself (meta-traits etc). On Tue, Dec 1, 2015 at 1:30 PM, Kent Fredric <[email protected]> wrote: > On 2 December 2015 at 10:00, Demian Riccardi <[email protected]> > wrote: > > that are shared between modules? how are they distributed. > > Recommendation is to use a package naming scheme like simply > `Role::Serializable` or similar, taking a nod to Role::HasMessage and > similar. > > If you can see it being possibly ported to Moose-free code one day, > say, maybe using Role::Tiny or Moo::Role, I'd certainly recommend the > Role:: namespace. > > ( Or use some other top-level prefix if suitable ). > > If the role however is only considered useful in a Moose context, then > naming it MooseX:: might be more appropriate. > > You want to maximise how usable a thing is, and the naming should be > appropriate to how usable it is. > > But you don't want a name to over-advertise its usefulness and under > deliver. > > I hope that answers your questions. > > > -- > Kent > > KENTNL - https://metacpan.org/author/KENTNL > --001a1134f1d8ab5a930525e1bf7b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">The MooseX::* namespace should not be used for roles -- it= is for things that extend Moose itself (meta-traits etc).<br></div><div cl= ass=3D"gmail_extra"><br><div class=3D"gmail_quote">On Tue, Dec 1, 2015 at 1= :30 PM, Kent Fredric <span dir=3D"ltr"><<a href=3D"mailto:kentfredric@gm= ail.com" target=3D"_blank">[email protected]</a>></span> wrote:<br><= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex"><span class=3D"">On 2 December 2015 at 10:00,= Demian Riccardi <<a href=3D"mailto:[email protected]">demianricc= [email protected]</a>> wrote:<br> > that are shared between modules? how are they distributed.<br> <br> </span>Recommendation is to use a package naming scheme like simply<br> `Role::Serializable` or similar, taking a nod to Role::HasMessage and<br> similar.<br> <br> If you can see it being possibly ported to Moose-free code one day,<br> say, maybe using Role::Tiny or Moo::Role,=C2=A0 I'd certainly recommend= the<br> Role:: namespace.<br> <br> ( Or use some other top-level prefix if suitable ).<br> <br> If the role however is only considered useful in a Moose context, then<br> naming it MooseX:: might be more appropriate.<br> <br> You want to maximise how usable a thing is, and the naming should be<br> appropriate to how usable it is.<br> <br> But you don't want a name to over-advertise its usefulness and under de= liver.<br> <br> I hope that answers your questions.<br> <span class=3D"HOEnZb"><font color=3D"#888888"><br> <br> --<br> Kent<br> <br> KENTNL - <a href=3D"https://metacpan.org/author/KENTNL" rel=3D"noreferrer" = target=3D"_blank">https://metacpan.org/author/KENTNL</a><br> </font></span></blockquote></div><br></div> --001a1134f1d8ab5a930525e1bf7b--