Skip to content

Clarify modes of operation #146

@mattias-p

Description

@mattias-p

zonemaster-cli has many modes of operation. This issue does not concern itself with the --help, --version, --dump_config and --dump_policy pseudo-modes, each of which only prints a static message before terminating.

This issue regards the four options --dump_profile, --json_stream, --json and --raw options which are used to specify one out of five modes. It should to be clear from the usage documentation that there are five modes, what they are and how you activate them.

As a solution to this problem I suggest that a new --mode option is introduced with one valid value for each of the five modes, normal being the default. The four existing options should be deprecated (and marked as such) but remain in place for the time being. When specified on the command line they should print deprecation warnings and update the value of the --mode option.

In the current implementation of Zonemaster::CLI is inferred from a hodgepodge of individual mode-options, complex boolean expressions over mode-options and the local variable $translator. This is needlessly complex. Instead the mode should be solely inferred from the value of the --mode option.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions