So a while back, some folks on p5p were discussing how certain bugs in various different pairings of man/nroff/less can be worked around by having Pod::Perldoc call nroff with a -c switch.

And I was all ready to to add that to Pod::Perldoc::ToMan's call to "nroff -man", so that there'd usually be "pod2man --lax somefile.pod | nroff -c -man".

However, I see this post from Colin Watson on 28 Jan 2003:

> Under RedHat 8.0, the Esc chars were also not being escaped..
>
> the addition of ' -c' to this line in perldoc, solved the problem:
>
> line 584:
> my $cmd = catfile($bindir, $pod2man) . " --lax $file | $opt_n -man -c";

That's a different problem, due to changes in groff 1.18. I worked around it in the Debian groff packages by disabling colour output by default until pagers were ready for it. Note that the -c option is not portable to versions of groff earlier than 1.18.

If you're using less, I suggest putting 'LESS=-R' in your environment. In general I think fixing the pagers is probably the correct long-term approach to this class of bugs, not hacking around it in perldoc.

If I'm reading this right, he's saying that if we add the -c switch, some old versions of *roff will scream that it's an unknown switch; if true, that would be a very compelling reason not to have Pod::Perldoc::ToMan add the -c switch.


What does everyone think?

--
Sean M. Burke    http://search.cpan.org/~sburke/



Reply via email to