Subject: | check and coerce arguments not being passed to parameterized types |
Date: | Tue, 4 Nov 2014 20:21:54 +1100 |
To: | bug-Type-Tiny [...] rt.cpan.org |
From: | Lloyd Fournier <lloyd.fourn [...] gmail.com> |
my $context = {day => 'Tuesday'};
MyType->check($x,$context); #MyType's constraint gets passed the second
argument
(ArrayRef[MyType])->check([$x],$context) # MyType's constraint doesn't get
passed the second argument
I realise I am not using types in the conventional way here but it was
working really well until I used an ArrayRef. Being able to pass arguments
to checks and coercions is really useful to me though I don't know whether
it's an intended feature!
thanks