develooper Front page | perl.perl5.porters | Postings from March 2000

Re: [ID 20000316.015] Problem in pod2text

Thread Previous | Thread Next
From:
Wolfgang Laun
Date:
March 16, 2000 22:38
Subject:
Re: [ID 20000316.015] Problem in pod2text
Message ID:
38D1D25E.1ACCD264@alcatel.at
Russ Allbery wrote:

> Johan Vromans <jvromans@squirrel.nl> writes:
>
> > Nope. You're negating all of them.
> > Shall I ignore it silently?
> > Or couple the warning to the setting of $^W?
>
> Probably better to do what you're doing, I think.  What I seem to really
> be wanting is negation tied to a particular one of the alternates, but
> nothing else in Getopt::Long is tied to just one of the alternates.  So
> that probably doesn't make sense.
>
> I'll use the method you suggested of handling notermcap directly when I
> run into something like this again.
>

For the situation in pod2text, the workaround you might consider is:

   GetOptions (\%options, 'alt|a', 'color|c', 'help|h', 'indent|i=i',
               'loose|l', 'sentence|s', 'termcap!', 't', 'width|w=i') or exit
1;
   $options{termcap} ||= $options{t};

This permits bundling and --notermcap, and elicits no warning noises.

(It would not handle pod2text -t --notermcap in the usual way but it might
not be worth the extra effort of covering that, too.)

Cheers,
-Wolfgang


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About