Skip to content

Verbose option argument #9

@Leont

Description

@Leont

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions