Rajith Attapattu wrote:
On Fri, Feb 20, 2009 at 4:17 AM, Gordon Sim <[email protected]> wrote:
Alan Conway wrote:
Gordon Sim wrote:
We have two forms in use for boolean options to qpidd. The first form
is where the presence of an option implies that its value is true. E.g.
--no-module-dir
--no-data-dir
--tcp-nodelay
--require-encryption
-t --trace
-d --daemon
-c --check
-q --quit
-h --help
The second is where the value for the boolean follows the option. E.g.
-m --mgmt-enable yes|no
--auth yes|no
Does anyone have a strong view on the desirability of making this more
consistent? I myself have a slight preference for --no-auth over
--auth no; I'm less bothered about the --mgmt-enable option but that
could be --no-mgmt.
I prefer the --auth yes/no style, as the "presence" style is a bit awkward
for config files and environment variables. E.g. it's not obvious that
QPID_TRACE= ./qpidd
is *enabling* trace. Similarly having entries in a config file with no
value or an empty value is a bit strange.
Actually you can specify QPID_TRACE=yes, QPID_TRACE=true (or QPID_TRACE=no,
QPID_TRACE=false) and that is interpreted as you would expect. I.e.
QPID_TRACE=false does not turn tracing on. Likewise in a conf file you can
have trace=false. (Smart people those boost developers!).
Well that reverses my opinion :) If only one style is allowed I think I prefer
the presence style. Where we have an args flag for the non-default state and no
flag for the default state. So that would be --no-auth to disable auth and in
config/env vars it would be no-auth=true or NO_AUTH=false. (no-auth=yes is odd
looking but not obligatory!)
That said I don't feel strongly. So if someone things its urgent to be
consistent let the start a vote, otherwise we can leave it where it is.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]