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

Re: [ID 20000316.015] Problem in pod2text

Thread Previous | Thread Next
Russ Allbery
March 16, 2000 08:40
Re: [ID 20000316.015] Problem in pod2text
Message ID:
Moore, Paul <> writes:

>> pod2text -?
> Ignoring '!' modifier for short option t
> Unknown option: ?

This sounds like it could be a bug in Getopt::Long; pod2text specified a
linkage of "termcap|t!", which should have allowed --notermcap.  Not sure
why that didn't work right.

>> pod2text Event.pod
> Ignoring '!' modifier for short option t
> POSIX::termios not implemented on this architecture at
> C:/Applications/DevPerl/lib/Pod/Text/ line 47.

> Huh? I'm not surprised Win32 hasn't got POSIX::termios. But I'd like
> some output...

I had the bright idea of defaulting to using termcap information if stdout
was a tty.  Not a good idea unless someone wants to do the work to make
sure it works on VMS, Win32, etc., which I can't as I don't have access to
anything that isn't a Unix.

Let's back out of this for the release.  We can always revisit it later.

diff -u -r0.4 pod2text.PL
--- pod2text.PL	1999/09/20 11:39:05	0.4
+++ pod2text.PL	2000/03/16 16:38:04
@@ -67,11 +67,10 @@
 # Parse our options.  Use the same names as Pod::Text for simplicity, and
 # default to sentence boundaries turned off for compatibility.
 my %options;
-$options{termcap} = -t STDOUT;
 $options{sentence} = 0;
 Getopt::Long::config ('bundling');
 GetOptions (\%options, 'alt|a', 'color|c', 'help|h', 'indent|i=i',
-            'loose|l', 'sentence|s', 'termcap|t!', 'width|w=i') or exit 1;
+            'loose|l', 'sentence|s', 'termcap|t', 'width|w=i') or exit 1;
 pod2usage (1) if $options{help};
 # Figure out what formatter we're going to use.  -c overrides -t.
@@ -114,10 +113,6 @@
 is the file to which to write the formatted output.  If I<output> isn't
 given, the formatted output is written to STDOUT.
-B<pod2text> defaults to trying to use Pod::Text::Termcap if STDOUT is a tty.
-To explicitly say not to attempt termcap escape sequences, use
 =head1 OPTIONS
 =over 4
@@ -160,9 +155,9 @@
 sequences for the terminal from termcap, and use that information in
 formatting the output.  Output will be wrapped at two columns less than the
 width of your terminal device.  Using this option requires that your system
-have a termcap file somewhere where Term::Cap can find it.  With this
-option, the output of B<pod2text> will contain terminal control sequences
-for your current terminal type.
+have a termcap file somewhere where Term::Cap can find it and requires that
+your system support termios.  With this option, the output of B<pod2text>
+will contain terminal control sequences for your current terminal type.
 =item B<-w>, B<--width=>I<width>, B<->I<width>

Russ Allbery (             <>

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