Subject: | Respect MANWIDTH |
Hi,
perldoc renders POD with the width of the terminal. When the terminal is
too wide, this is not very readable to me. So respect MANWIDTH like
man(1) does, to override the behavior.
Regards,
Danijel
Subject: | Perldoc.patch |
--- /home/danielt/perl5/perlbrew/perls/perl-5.12.1/lib/5.12.1/Pod/Perldoc/ToMan.pm 2010-07-23 23:54:15.000000000 +0200
+++ /home/danielt/perl5/perlbrew/perls/perl-5.12.1t/lib/5.12.1/Pod/Perldoc/ToMan.pm 2010-09-05 17:55:38.000000000 +0200
@@ -67,6 +67,8 @@
if(Pod::Perldoc::IS_Linux and -t STDOUT
and my ($cols) = `stty -a` =~ m/\bcolumns\s+(\d+)/
) {
+ $cols = $ENV{MANWIDTH}
+ if defined $ENV{MANWIDTH} and $ENV{MANWIDTH} < $cols;
my $c = $cols * 39 / 40;
$cols = $c > $cols - 2 ? $c : $cols -2;
$command .= ' -rLL=' . (int $c) . 'n' if $cols > 80;