From: Rafael Garcia-Suarez Date: Thu, 9 Dec 2004 15:49:07 +0000 (+0000) Subject: Upgrade to perldoc 3.14 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=363fa2a924dc3ff31819de4e72022b9173ad9e17;p=p5sagit%2Fp5-mst-13.2.git Upgrade to perldoc 3.14 p4raw-id: //depot/perl@23630 --- diff --git a/lib/Pod/Perldoc.pm b/lib/Pod/Perldoc.pm index 0a4381f..06ac86b 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 83b7142..4319122 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;