Parameters not ordered fix #11

Merged
merged 4 commits into from Apr 5, 2013

Projects

None yet

2 participants

@yanick
Contributor
yanick commented Apr 5, 2013

I have two commits in this pull that take care of the two problems of issue #10.

The position of parameters is now recorded and taken into consideration as the parameters are munged.

More contentiously, I removed the @extras to be able to have parameters set after options. So that we can have:

foo bar --option X my-param-1 my-param-2

Please have a look and let me know what you think.

yanick added some commits Apr 2, 2013
@yanick yanick parameters are ordered alphabetically
... which is not what one would expect. I would rather think that
parameters should be taken in the order in which they are
declared, or following a 'position' attribute.
7073ef7
@yanick yanick typo 'inavlid' 6920c3b
@yanick yanick parameter positions are recorded 32b09e9
@yanick yanick parameters can be after --options
To make that one happen, I had to remove the
extras in the parser. Which I don't think is
too horrible: they are nothing but trailing
parameters. We might want to do something smart
with a parameter that is an array and slurp them all.
421d34b
@maros maros merged commit 421d34b into maros:master Apr 5, 2013
@maros
Owner
maros commented Apr 5, 2013

Thank you for this patch! I have just merged it with and made some minor amendments (eg. parameters defined in roles didn't work). The fixes will make it to CPAN soon.

@yanick
Contributor
yanick commented Apr 6, 2013

Excellent. Thanks a bunch!

@maros
Owner
maros commented Apr 8, 2013

Just released MooseX::App 1.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment