From: Jim Freeze Date: 2005-06-28T12:47:03+09:00 Subject: Re: [ANN] Application-0.6.0 * Mark Probert [2005-06-25 12:52:31 +0900]: > Hi .. > > On Friday 24 June 2005 15:46, Jim Freeze wrote: > > > > For an application that takes arguments, when it sees > > none, it takes that as a que to print the usage. > > > > Many of my scripts have just optional arguments, like > > $ foo > $ foo -g # debugging, rather than -d > $ foo -f bar.txt > > Perhaps having a global switch like > > CommandLine::Application::NO_ARGS_OK > > or a different base class where no arguments is ok, > > CommandLine::BasicApp > > might work. I think that NO_ARGS_OK may be misleading since 'no args' is always ok. Maybe something like: EXPECT_NO_ARGS But, it may be simpler than that. How about when no call to #args is made (that is, no args are listed as expected by the app), that the usage statement is not printed when no args are passed? -- Jim Freeze