summaryrefslogtreecommitdiff
path: root/lib/Pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-12-09 15:49:07 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-12-09 15:49:07 +0000
commit363fa2a924dc3ff31819de4e72022b9173ad9e17 (patch)
tree9a24f338f44fd03291a1bc8a3d164dee35a5ecda /lib/Pod
parent3c92c9627796cd16c5fbd7af8565ba482fc80938 (diff)
downloadperl-363fa2a924dc3ff31819de4e72022b9173ad9e17.tar.gz
Upgrade to perldoc 3.14
p4raw-id: //depot/perl@23630
Diffstat (limited to 'lib/Pod')
-rw-r--r--lib/Pod/Perldoc.pm17
-rw-r--r--lib/Pod/Perldoc/ToMan.pm8
2 files changed, 21 insertions, 4 deletions
diff --git a/lib/Pod/Perldoc.pm b/lib/Pod/Perldoc.pm
index 0a4381fc1f..06ac86b99e 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.13';
+$VERSION = '3.14';
#..........................................................................
BEGIN { # Make a DEBUG constant very first thing...
@@ -1079,7 +1079,7 @@ sub MSWin_perldoc_tempfile {
my $spec;
do {
- $spec = sprintf "%s/perldoc_%s_T%x_%x%02x.%s", # used also in MSWin_temp_cleanup
+ $spec = sprintf "%s\\perldoc_%s_T%x_%x%02x.%s", # used also in MSWin_temp_cleanup
# Yes, we embed the create-time in the filename!
$tempdir,
$infix || 'x',
@@ -1232,6 +1232,13 @@ sub pagers_guessing {
push @pagers, qw( more less pg view cat );
unshift @pagers, $ENV{PAGER} if $ENV{PAGER};
}
+
+ if (IS_Cygwin) {
+ if (($pagers[0] eq 'less') || ($pagers[0] eq '/usr/bin/less')) {
+ unshift @pagers, '/usr/bin/less -isrR';
+ }
+ }
+
unshift @pagers, $ENV{PERLDOC_PAGER} if $ENV{PERLDOC_PAGER};
return;
@@ -1494,6 +1501,12 @@ sub page { # apply a pager to the output file
# extension get the wrong default extension (such as .LIS for TYPE)
$output = VMS::Filespec::rmsexpand($output, '.') if IS_VMS;
+
+ $output =~ s{/}{\\}g if IS_MSWin32 || IS_Dos;
+ # Altho "/" under MSWin is in theory good as a pathsep,
+ # many many corners of the OS don't like it. So we
+ # have to force it to be "\" to make everyone happy.
+
foreach my $pager (@pagers) {
$self->aside("About to try calling $pager $output\n");
if (IS_VMS) {
diff --git a/lib/Pod/Perldoc/ToMan.pm b/lib/Pod/Perldoc/ToMan.pm
index 83b714207b..4319122237 100644
--- a/lib/Pod/Perldoc/ToMan.pm
+++ b/lib/Pod/Perldoc/ToMan.pm
@@ -72,10 +72,14 @@ sub parse_from_file {
$command .= ' -rLL=' . (int $c) . 'n' if $cols > 80;
}
+ if(Pod::Perldoc::IS_Cygwin) {
+ $command .= ' -c';
+ }
+
# 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
+ # don't have a -c switch, so that unconditionally adding it here
+ # would presumably be a Bad Thing -- sburke@cpan.org
$command .= " | col -x" if Pod::Perldoc::IS_HPUX;