develooper Front page | perl.moose | Postings from December 2015

Re: Distributing Roles

Thread Previous
From:
Karen Etheridge
Date:
December 2, 2015 03:20
Subject:
Re: Distributing Roles
Message ID:
CAPJsHfCu8Bg7gtdAzhgCw5ytWC6DFqR-Cw_KAmqWDm9Ba8wsmg@mail.gmail.com
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 <kentfredric@gmail.com> wrote:

> On 2 December 2015 at 10:00, Demian Riccardi <demianriccardi@gmail.com>
> 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
>

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About