diff options
author | 2019-05-05 22:26:32 +0000 | |
---|---|---|
committer | 2019-05-05 22:26:32 +0000 | |
commit | 73264f3b90fd47cc44867487c4f4556d0615212a (patch) | |
tree | 1cb1b1a402474772d63d6f9e399019fddc1fa78b /gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm | |
parent | Like we already do for pod2man(1), always let perldoc(1) produce man(7) (diff) | |
download | wireguard-openbsd-73264f3b90fd47cc44867487c4f4556d0615212a.tar.xz wireguard-openbsd-73264f3b90fd47cc44867487c4f4556d0615212a.zip |
The perldoc(1) program wants to support the MANWIDTH environment
variable and fall back to what stty(1) reports, and it does so with
nroff(1), but it didn't with mandoc(1) because it didn't know how
to pass the desired width to mandoc. Teach it to use "-O width=".
OK afresh1@.
I noticed the unimplemented feature when Andrew Daugherity asked
on tech@ what the point of a certain patch in FreeBSD is (which it
turns out we don't need).
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm')
-rw-r--r-- | gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm index 6f1e56f92f0..696c9dd2c31 100644 --- a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm +++ b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm @@ -229,6 +229,10 @@ sub _collect_nroff_switches { push @render_switches, '-rLL=' . (int $c) . 'n' if $cols > 80; } + if( $self->_is_mandoc ) { + push @render_switches, '-Owidth=' . $self->_get_columns; + } + # I hear persistent reports that adding a -c switch to $render # solves many people's problems. But I also hear that some mans # don't have a -c switch, so that unconditionally adding it here |