Subject: | Pod::Text::Termcap fallback defeats module's purpose |
Date: | Mon, 2 Dec 2019 10:52:05 +0000 |
To: | bug-podlators [...] rt.cpan.org |
From: | Zefram <zefram [...] fysh.org> |
Pod::Text::Termcap is an excellent idea, in principle providing a great
deal of terminal portability. But that portability is compromised
by the module's "fallback" behaviour of using ANSI escape sequences
wherever termcap didn't supply a sequence. The ANSI escape sequences
are not sequences that work everywhere, and so are not suitable for
use as a fallback. If termcap didn't supply a sequence for (say)
bolding, then it means either the terminal doesn't have a sequence for
bolding, in which case the ANSI sequence is wrong, or termcap has no
knowledge of the terminal, in which case you have no idea whether the
ANSI sequence would work. Mangled output is likely to result, and the
caller of Pod::Text::Termcap has no opportunity to avoid this breakage.
This defeats the entire purpose of the module.
The "fallback" behaviour should be entirely removed from the module.
Where termcap doesn't supply a sequence, it must give up on using that
type of highlighting.
-zefram