Skip Menu |

This queue is for tickets about the MooseX-Getopt CPAN distribution.

Report information
The Basics
Id: 85030
Status: open
Priority: 0/
Queue: MooseX-Getopt

People
Owner: Nobody in particular
Requestors: TIMB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: isa => 'Maybe[Int]' doesn't work
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.
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...