Indeed, the example seems to contradict the text: The behaviour shown is entirely predictable. I'd also argue that it's desirable, although I guess that it's subjective.
>-----Original Message----- >From: imacat [mailto:[EMAIL PROTECTED] >Sent: Thursday, June 16, 2005 11:01 AM >To: Perl Module Authors >Subject: Re: RFC: Getopt::Modern > >On Thu, 16 Jun 2005 11:21:04 +0200 >Johan Vromans <[EMAIL PROTECTED]> wrote: >> * lacks predictable behaviour >> I fail to see your point here. Options are handled from left to >> right, which makes perfect sense. > > I have watched the on-line slide. The slide said: > >============ >* lacks predictable behaviour > * users are too unpredictable >GetOptions( > 'foo' => \$foo, > 'no-foo' => sub {$foo = 0}, >); >print "$foo\n"; > >$ a_program --foo --no-foo >0 > >$ a_program --no-foo --foo >1 >============ > >To Eric, > > 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? > >-- >imacat ^_*' >[EMAIL PROTECTED] >PGP Key: http://www.imacat.idv.tw/me/pgpkey.txt > >Tavern IMACAT's http://www.imacat.idv.tw/ >Woman's Voice http://www.wov.idv.tw/ >TLUG List Manager http://www.linux.org.tw/mailman/listinfo/tlug >