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';
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);
}
}
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;