--- imacat <[EMAIL PROTECTED]> wrote: > $ a_program --foo --no-foo > 0 > > $ a_program --no-foo --foo > 1 > ============ <snip> > I'm not against new modules at all. I'm also new here. But I > really can't see the point here. I though that is the desired > behavior, > isn't it? What do you think is "right" on that example? Croak? > Return > 1 on both cases? Return 0 on both cases?
I'm sorry, while I certainly won't argue that there is necessarily a need for a new module here, I will argue that the order of arguments shouldn't matter. Asking for "foo" and then asking for "no foo" doesn't make a lick of sense to me. What does that mean? That we are in some mysterious heisenstate where the it's neither foo and not foo? In following the principle of least surprise, the user of a program should not have to worry about issues like this and I would prefer that contradictory command line arguments cause the program to halt with a loud "what the hell do you mean?" Note that my preference appears different from the preferences others have stated. Of course, this is my *preference* and certainly not something that I demand others accept. So, in short, while there are those who do not like Eric's way of handling arguments, I would argue (ha!) that it's equally valid. Cheers, Ovid -- If this message is a response to a question on a mailing list, please send follow up questions to the list. Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/