From: Eric Mahurin Date: 2005-06-25T06:14:49+09:00 Subject: Re: [ANN] Application-0.6.0 --- Jim Weirich wrote: > On Friday 24 June 2005 04:04 pm, Jim Freeze wrote: > > > * make a certain set of options enabled by default: man > page, > > > version, usage, etc. That way all applications written > in this > > > framework will immediately have this commonality. And > then > > > have a way for the application class to delete this > > > functionality if it isn't wanted for some strange reason. > > > > Hmm, haven't thought about that, but sounds reasonable. > > One way to handle this is to provide a > CommandLine::BasicApplication with no > defaults and also CommandLine::Application with the mentioned > goodies. This > allows people to fall back to a bare bones version with > little effort. > > Another approach is to provide additional functionality in > modules (or > something module-like). Include a module and get several > related features. That sounds like the right way to do it. CommandLine::Application would be a derived class of CommandLine::BasicApplication and most applications would be derived from CommandLine::Application to get the goodies. The reason I ask for this is that it is sometimes frustrating to simply get usage. It varies from -u, -usage, -h, -help, --help, etc. If an app has required options/args, it usually is not a problem, but when nothing is required, it may take a while to figure out how the get the usage. Having a standard for these goodies would be a good thing. ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com