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

Re: [ID 20000316.015] Problem in pod2text

Thread Previous | Thread Next
Wolfgang Laun
March 16, 2000 22:38
Re: [ID 20000316.015] Problem in pod2text
Message ID:
Russ Allbery wrote:

> Johan Vromans <> 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
   $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.)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About