Coercion problem

2009-09-01 Thread Emmanuel Quevillon
Hi Moosers, I am quite new to Moose, at least I don't use all the power of it. Anyway, I tried to create a subtype called 'ArrayRefOrHashRef' to be able to have an attribute that could accept and array ref or a hash ref. My idea is to : 1) If the parameter passed to my attribute is an array ref,

Re: Coercion problem

2009-09-01 Thread Hans Dieter Pearcey
Excerpts from Emmanuel Quevillon's message of Tue Sep 01 08:29:06 -0400 2009: I am quite new to Moose, at least I don't use all the power of it. Anyway, I tried to create a subtype called 'ArrayRefOrHashRef' to be able to have an attribute that could accept and array ref or a hash ref. My idea

Moose roles : naming conventions, best practices

2009-09-01 Thread Jarrod Overson
If there's a better place to ask this, please point me in the right direction. I've been a lurker and have searched the archive and docs but haven't found all that much regarding naming conventions for moose roles. For this example, say i want to provide functionality to do Drawing. I've seen

Re: Moose roles : naming conventions, best practices

2009-09-01 Thread Stevan Little
I tend to use a couple patterns each with their own rationale. However I do not think there is any one convention for naming of roles, just as with naming your classes, you need to use a name that is most meaningful in the context. So, for instance, I would call a role that serializes an

Outstanding Branches

2009-09-01 Thread Chris Prather
Okay since I started beating people about the head and shoulders that we're an open process (http://chris.prather.org/perl/take-arms-against-a-sea-of-troubles/) what do we need to get the current outstanding branches in Moose.git (and one on a external Git repo mentioned in a different thread on

Re: Method aliasing and AttributeHelpers

2009-09-01 Thread Chris Prather
On Wed, Sep 2, 2009 at 12:11 AM, Jesse Luehrsd...@tozt.net wrote: On Tue, Sep 01, 2009 at 10:58:58PM -0500, Chris Fields wrote: All, Not sure if this is addressed in some way with the merge of MXAH to core, but I ran into a small issue with roles and aliasing methods.  Not sure if I'm

Re: Method aliasing and AttributeHelpers

2009-09-01 Thread Chris Prather
On Wed, Sep 2, 2009 at 12:25 AM, Chris Fieldscjfie...@illinois.edu wrote: Also (and apologetically unrelated to the above), any idea if/when MooseX::Aliases would (as the MX::Aliases docs state) subsume MX::MultiInitArgs?  I have considered playing around with merging the two and submitting a

Method aliasing and AttributeHelpers

2009-09-01 Thread Chris Fields
All, Not sure if this is addressed in some way with the merge of MXAH to core, but I ran into a small issue with roles and aliasing methods. Not sure if I'm approaching this right though, so please let me know if I'm not. I already have the workaround (e.g. explicitly define the methods