On Fri May 03 07:58:02 2013, TIMB wrote:
Show quoted text> With
>
> has foo => (is => 'rw', isa => 'Maybe[Int]', traits => [ 'Getopt' ]);
>
> I get "Option foo does not take an argument"
>
> If I remove the Maybe[] it works.
Composite types / type introspection of any form doesn't work (as there just isn't any code to support it working).
Undef|Int also doesn't work similarly.
The code to reach inside Maybe to find the 'real' type wouldn't be that hard at all, however you'd also want to handle the Undef|Int case, and I've always thought that this introspection is fairly generic, to the point where there could/should be a MooseX:: module to help with it, and I've never been sure what that module should look like.
Either way - this is really just a SMOP (simple matter of programming), so if you care and have tuits, please feel free - patches to fix this would be accepted (and very welcome!), however I'm personally unlikely to add the functionality in the near (or medium term) future myself...