Coercion problem

2010-10-06 Thread Grzegorz Dzięgielewski
Hi everyone! Since I'm new here i just want to say hello to everyone :-) ...and the question is: Do you have any ideas why abspath attribute is not coercing in the code below (via code block in Path subtype is never used)? package Test; use Cwd qw/abs_path/; use Moose; use

Re: Coercion problem

2009-09-04 Thread Emmanuel Quevillon
Hans Dieter Pearcey wrote: Excerpts from Emmanuel Quevillon's message of Wed Sep 02 10:47:06 -0400 2009: Attribute (cut_types) does not pass the type constraint because: Validation failed for 'ValidCutTypes' failed with value { blunt = [ blunt ] } at

Re: Coercion problem

2009-09-02 Thread Emmanuel Quevillon
Hans Dieter Pearcey wrote: Hi Hans, Thanks for your quick reply. I followed your recommendations and used MX::Types::Structured and 'Dict'. However, I get an error when I am calling my constructor -new() : Attribute (cut_types) does not pass the type constraint because: Validation failed for

Re: Coercion problem

2009-09-02 Thread Hans Dieter Pearcey
Excerpts from Emmanuel Quevillon's message of Wed Sep 02 10:47:06 -0400 2009: Attribute (cut_types) does not pass the type constraint because: Validation failed for 'ValidCutTypes' failed with value { blunt = [ blunt ] } at lib/Bio/Restriction/Analysis/FrameCutters.pm line 315 where as it is

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