Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbose option argument #9

Open
Leont opened this issue Jan 31, 2014 · 0 comments
Open

Verbose option argument #9

Leont opened this issue Jan 31, 2014 · 0 comments

Comments

@Leont
Copy link
Member

Leont commented Jan 31, 2014

Module::Build accepts just about any argument convention under the rainbow in an unpleasantly heuristic and opportunistic manner. To be more precise it will accept any of:

  1. verbose=1
  2. --verbose
  3. --verbose 1
  4. --verbose=1
  5. --no-verbose
  6. --noverbose
  7. --no_verbose

Getopt::Long (and other parsers AFAIK) can only parse some of those, in three different ways but never more than half at the same time.

  1. As a boolean option (verbose!) it can parse 2, 5 and 6
  2. As an integer option with mandatory argument (verbose=i) it can parse 3 and 4
  3. As an integer option with an optional argument (verbose:1) it can parse 2, 3 and 4

Module::Build::Tiny does the last possibility currently, which I consider the most backwards compatible option as it makes the common styles 2 and 3 DWIM. Other than style 1 (which we don't support anyway), I don't think I've seen any of the others in the wild (5-7 would be silly anyway).

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

No branches or pull requests

1 participant