From: John Napiorkowski Date: Fri, 24 Oct 2008 20:31:39 +0000 (+0000) Subject: restored test for subtyping paramterized types with a parameterized type X-Git-Tag: 0.07~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=af976fb2fcd78e7728ea17669c5304bd33f6a61f;hp=48a2379be806b65d1a0e348e7ba7ca6a9aa00dea;p=gitmo%2FMooseX-Types.git restored test for subtyping paramterized types with a parameterized type --- diff --git a/t/lib/DecoratorLibrary.pm b/t/lib/DecoratorLibrary.pm index 8361866..374f2b9 100644 --- a/t/lib/DecoratorLibrary.pm +++ b/t/lib/DecoratorLibrary.pm @@ -28,23 +28,9 @@ subtype MyArrayRefInt01, subtype BiggerInt, as Int, where {$_>10}; - -## We can change this when the .61 Moose comes out. When that happens we will -## have the correct patch to Moose::Meta::TypeConstraint::Parameterized to let -## us support parameterizing parameterized subtypes. When we get this we can -## then replace the where clause with: - - ##as MyArrayRefInt01[BiggerInt]; - + subtype SubOfMyArrayRefInt01, - as MyArrayRefInt01, - where { - my $ok_or_not = 1; - foreach my $int (@$_) { - $ok_or_not = $int>10 ? 1:0 - if $ok_or_not; - } $ok_or_not; - }; + as MyArrayRefInt01[BiggerInt]; coerce MyArrayRefInt01, from Str,