Re: MooseX::FSA::Simple

[email protected] (Stevan Little)
Newsgroups perl.moose
Message-ID <[email protected]>
> On Wed, Sep 21, 2011 at 5:28 AM,  <[email protected]> wrote:
>> Does FSA::MooseRole satisfy everyone (or no-one)?

So I am wondering, why have 'Role' in the name at all?

On Sep 21, 2011, at 7:18 AM, Hans Dieter Pearcey wrote:
> If the distinguishing feature of this code is that it is a role, then ...

I suspect that actually, that the distinguishing feature of this code is that it is an FSA and not a Role. The fact it is a Role only means you can not instantiate it directly and must compose it into a class. This actually strikes me as a drawback more then a benefit. 

Why not call it Something::FSA (or something similar, your choice) and slap a simple concrete class that consumes the role into it. THe result might look something like this:

lib/Something/FSA.pm # simple concrete class
lib/Something/FSA/Role.pm # your role

This (IMO) solves two problems:

1) Your module is more usable because people can jump right in with a fully functioning class.
2) You don't need to worry about naming it Something::FSA::Role and all the complexity that goes with it (and people still can just use the role if they want).

Thoughts?

- Stevan

Disclaimer: I didn't really look too closely at your code yet, so if this idea make no sense, feel free to ignore it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.