Subject: | Type parsing is naive |
Try setting an attribute type to:
:type(ArrayRef[ArrayRef[Int,1,2]])
Consider using Type::Tiny in Hades. It is capable of generating strings of Perl code that you should be able to inject into the generated classes without those generated classes requiring Type::Tiny.
use Types::Standard -types;
use feature 'say';
local $Type::Tiny::AvoidCallbacks = 1;
say ArrayRef->of(Int)->inline_check( q|$value| );
In current versions of Type::Tiny there are still one or two places where the generated code might wrongly create extra dependencies, but those should be addressed in the next release.
This would no only give you a bigger library of built-in types with less code, but would also give you Type::Parser which might be useful parsing complex type expressions like:
:type(Int|ArrayRef[Int])
:type(Enum[ "(" , ")" , "," ])