From: john napiorkowski Date: Sat, 23 May 2009 21:58:30 +0000 (-0400) Subject: more docs updates and updates to the makefile X-Git-Tag: 0.01~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=019d00e6528ae09ee74a7f8eb3b99fecebed02c2;p=gitmo%2FMooseX-Dependent.git more docs updates and updates to the makefile --- diff --git a/Makefile.PL b/Makefile.PL index e8a38dc..d7537bd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,8 +13,8 @@ requires 'Moose' => '0.79'; requires 'MooseX::Types' => '0.10'; requires 'Scalar::Util' => '1.19'; requires 'Devel::PartialDump' => '0.07'; -requires 'Data::Dump' => ''; -requires 'Digest::MD5' => ''; +requires 'Data::Dump' => '1.14'; +requires 'Digest::MD5' => '2.38'; build_requires 'Test::More' => '0.86'; build_requires 'Test::Exception' => '0.27'; diff --git a/lib/MooseX/Dependent/Meta/TypeConstraint/Dependent.pm b/lib/MooseX/Dependent/Meta/TypeConstraint/Dependent.pm index 1b68da6..efb11a5 100644 --- a/lib/MooseX/Dependent/Meta/TypeConstraint/Dependent.pm +++ b/lib/MooseX/Dependent/Meta/TypeConstraint/Dependent.pm @@ -345,22 +345,17 @@ around 'coerce' => sub { if($self->has_constraining_value) { push @args, $self->constraining_value; - ##Checking the type_coercion_map is probably evil if(@{$self->coercion->type_coercion_map}) { my $coercion = $self->coercion; - warn "coercion map found in $coercion found for $self"; my $coerced = $self->$coerce(@args); if(defined $coerced) { - warn "got coerced args of ", $coerced; return $coerced; } else { my $parent = $self->parent; - warn "no coercion for $self, using $parent"; return $parent->coerce(@args); } } else { my $parent = $self->parent; - #warn "no coercion for $self, using $parent"; return $parent->coerce(@args); } } diff --git a/t/03-coercions.t b/t/03-coercions.t index 5fc8262..792afac 100644 --- a/t/03-coercions.t +++ b/t/03-coercions.t @@ -53,11 +53,11 @@ use Test::More tests=>15; { is OlderThanAge([older_than=>5])->coerce([1..10]), 55, 'Coerce works'; is OlderThanAge([older_than=>5])->coerce({a=>1,b=>2,c=>3,d=>4}), 4, - 'inherit Coerce works'; + 'Coerce works'; like OlderThanAge([older_than=>2])->name, qr/main::OlderThanAge\[/, 'Got correct name for OlderThanAge([older_than=>2])'; is OlderThanAge([older_than=>2])->coerce({a=>5,b=>6,c=>7,d=>8}), 4, - 'inherited Coerce works'; + 'Coerce works'; SKIP: { skip 'Type Coercions on defined types not supported yet', 1;