X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FUtil%2FTypeConstraints.pm;h=993e8e0661f3a5cfebe2a3407173eb4f617f92f5;hb=9c85e9dc1fea8af52dde98b81ad345eb44e79242;hp=4f77130b4b090b189d90d4a010855c898cc5bad2;hpb=29607c0291634fac077d6e1c75e1491ba455c010;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Util/TypeConstraints.pm b/lib/Mouse/Util/TypeConstraints.pm index 4f77130..993e8e0 100644 --- a/lib/Mouse/Util/TypeConstraints.pm +++ b/lib/Mouse/Util/TypeConstraints.pm @@ -308,6 +308,13 @@ sub find_type_constraint { sub find_or_create_isa_type_constraint { my $type_constraint = shift; + Carp::confess("Got isa => type_constraints, but Mouse does not yet support parameterized types for containers other than ArrayRef and HashRef and Maybe (rt.cpan.org #39795)") + if $type_constraint =~ /\A ( [^\[]+ ) \[\.+\] \z/xms && + $1 ne 'ArrayRef' && + $1 ne 'HashRef' && + $1 ne 'Maybe' + ; + my $code; $type_constraint =~ s/\s+//g;