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

Negation and strict processing are confusing #13

Open
ilsd opened this issue Aug 30, 2017 · 0 comments
Open

Negation and strict processing are confusing #13

ilsd opened this issue Aug 30, 2017 · 0 comments

Comments

@ilsd
Copy link

ilsd commented Aug 30, 2017

The negation of switches (and other types) is confusing if argv is strictly parsed.

Switch('--rawdump')->default(1),

and on the command-line: --no-rawdump results in $opt->get_rawdump to be still 1. (--no---rawdump would work but is a bit bizarre imho.)

Workaround

Switch('--rawdump|rawdump')->default(1),

Than the negation switch --no-rawdump works as expected.

TODO

Should be documented at least or throw an error for the not working negation switch --no-rawdump.

Just my 2 cents to an otherwise great module.

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

No branches or pull requests

1 participant