Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: megamic [...] cpan.org
Cc: bobtfish [...] bobtfish.net
rafl [...] debian.org
AdminCc:

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



CC: rafl [...] debian.org, bobtfish [...] bobtfish.net
Subject: feature request: positional arguments
Hi It would be cool if this module supported positional (required) arguments. E.g. ./foo -f arg -d 10 pos1 pos2 pos3 I have made some attempt at this, see my commits on this fork: http://github.com/megamic/moosex-getopt It introduces a new trait, Getopt::Positional, and supports both explicit ordering (with the attr option 'extra_arg'), and inferred ordering through the ordering of the attribute declarations. Cheers
Am Di 17. Aug 2010, 04:59:53, MEGAMIC schrieb: Show quoted text
> Hi > > It would be cool if this module supported positional (required) > arguments. E.g. > > ./foo -f arg -d 10 pos1 pos2 pos3 > > I have made some attempt at this, see my commits on this fork: > http://github.com/megamic/moosex-getopt > > It introduces a new trait, Getopt::Positional, and supports both > explicit ordering (with the attr option 'extra_arg'), and inferred > ordering through the ordering of the attribute declarations. > > Cheers
Because the gitbub link is not accessible anymore could somebody give a hint at least how this could be implemented. I have searched for information about how Moose could cope with positional arguments without success. To be able to declare typed non-option arguments seems to be an important feature to me too.