diff options
author | Jan Dubois <jand@activestate.com> | 2003-10-22 13:17:07 -0700 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2003-10-23 19:11:24 +0000 |
commit | 537c2f987ed483c982453e444458d32d44670a22 (patch) | |
tree | 716febd005215790a824e610c28e6ff2e12098bf /lib/Pod | |
parent | 2c21a326619911d05e8626e425f90895ef6d740e (diff) | |
download | perl-537c2f987ed483c982453e444458d32d44670a22.tar.gz |
[PATCH] Update Pod::Perldoc from 3.10 to 3.11
Date: Wed, 22 Oct 2003 20:17:07 -0700
Message-ID: <mjhepvgtnifdlgrvp20urtuu058e1jrav2@4ax.com>
From: Jan Dubois <jand@ActiveState.com>
Subject: [PATCH] Update I18N::LangTags from 0.28 to 0.29
Date: Wed, 22 Oct 2003 20:26:56 -0700
Message-ID: <jgiepv0a8fp8ffq3lpc5ujl7j25hoo1rdt@4ax.com>
p4raw-id: //depot/perl@21526
Diffstat (limited to 'lib/Pod')
-rw-r--r-- | lib/Pod/Perldoc.pm | 4 | ||||
-rw-r--r-- | lib/Pod/Perldoc/ToMan.pm | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/Pod/Perldoc.pm b/lib/Pod/Perldoc.pm index 1701a3a272..8f1bb0cb55 100644 --- a/lib/Pod/Perldoc.pm +++ b/lib/Pod/Perldoc.pm @@ -12,7 +12,7 @@ use File::Spec::Functions qw(catfile catdir splitdir); use vars qw($VERSION @Pagers $Bindir $Pod2man $Temp_Files_Created $Temp_File_Lifetime ); -$VERSION = '3.10'; +$VERSION = '3.11'; #.......................................................................... BEGIN { # Make a DEBUG constant very first thing... @@ -39,6 +39,8 @@ BEGIN { *IS_Dos = $^O eq 'dos' ? \&TRUE : \&FALSE unless defined &IS_Dos; *IS_OS2 = $^O eq 'os2' ? \&TRUE : \&FALSE unless defined &IS_OS2; *IS_Cygwin = $^O eq 'cygwin' ? \&TRUE : \&FALSE unless defined &IS_Cygwin; + *IS_Linux = $^O eq 'linux' ? \&TRUE : \&FALSE unless defined &IS_Linux; + *IS_HPUX = $^O =~ m/hpux/ ? \&TRUE : \&FALSE unless defined &IS_HPUX; } $Temp_File_Lifetime ||= 60 * 60 * 24 * 5; diff --git a/lib/Pod/Perldoc/ToMan.pm b/lib/Pod/Perldoc/ToMan.pm index f9061b86b7..12c2a68fba 100644 --- a/lib/Pod/Perldoc/ToMan.pm +++ b/lib/Pod/Perldoc/ToMan.pm @@ -55,12 +55,21 @@ sub parse_from_file { . " $switches --lax $file | $render -man" ; # no temp file, just a pipe! + # Thanks to Brendan O'Dea for contributing the following block + if(Pod::Perldoc::IS_Linux and -t STDOUT + and my ($cols) = `stty -a` =~ m/\bcolumns\s+(\d+)/ + ) { + my $c = $cols * 39 / 40; + $cols = $c > $cols - 2 ? $c : $cols -2; + $command .= ' -rLL=' . (int $c) . 'n' if $cols > 80; + } + # 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 adding it here would presumably # be a Bad Thing -- sburke@cpan.org - $command .= " | col -x" if $^O =~ /hpux/; + $command .= " | col -x" if Pod::Perldoc::IS_HPUX; defined(&Pod::Perldoc::DEBUG) and Pod::Perldoc::DEBUG() |