[Mono-dev] Program Option Parsing Library

Jay Logue jay-MonoDev at toaster.com
Thu Jan 10 17:46:41 EST 2008


Jonathan Pryor wrote:
> As for what Getopt::Long does...  "--foo --bar" sets "--bar" as the
> value of the --foo argument.  "--bar --foo" (i.e. no argument for --foo)
> generates the output:
>
> 	Option foo requires an argument
>
> I'm conflicted as to which is the better behavior.
Yeah, that's a tough one.  I probably lean towards the Getopt behavior 
as its easier to explain, e.g. "if --foo takes a value, then whatever 
comes after it will be treated as a value, regardless of what it looks 
like".

-- Jay



More information about the Mono-devel-list mailing list