Eric Wilhelm <[EMAIL PROTECTED]> writes:

> Ok, and maybe I showing my age here, but is *this* where the 
> negated-options thing comes from?  I.E. is this the historic (and 
> entire) reason for having the 'foo!' syntax in Getopt::Long?

No, it's because of a) defaults. Sometimes a flag is enabled by
default, sometimes its disabled by default. Having both the --foo and
--no-foo options it is always possible to exactly define what you want
the current invokation of the command to do, regardless of any default
settings. It's user-friendly redundancy.

And b) mixing options and arguments, where "--foo arg1 --no-foo arg2"
means that arg1 is processed with --foo and arg2 with --no-foo.

-- Johan

Reply via email to