diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Pod/Perldoc.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc.pm | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm index 787353ba588..8d695b2b4b6 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm @@ -12,8 +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.25_03'; # patched in perl5.git -$VERSION =~ s/_//; +$VERSION = '3.28'; #.......................................................................... @@ -285,7 +284,8 @@ Options: -m Display module's file in its entirety -n Specify replacement for groff -l Display the module's file name - -F Arguments are file names, not modules + -U Don't attempt to drop privs for security + -F Arguments are file names, not modules (implies -U) -D Verbosely describe what's going on -T Send output to STDOUT without any pager -d output_filename_to_send_to @@ -393,7 +393,7 @@ sub usage_brief { my $program_name = $self->program_name; CORE::die( <<"EOUSAGE" ); -Usage: $program_name [-hVriDtumFXlT] [-n nroffer_program] +Usage: $program_name [-hVriDtumUFXlT] [-n nroffer_program] [-d output_filename] [-o output_format] [-M FormatterModule] [-w formatter_option:option_value] [-L translation_code] PageName|ModuleName|ProgramName @@ -486,7 +486,8 @@ sub init_formatter_class_list { $self->opt_M_with('Pod::Perldoc::ToPod'); # the always-there fallthru $self->opt_o_with('text'); - $self->opt_o_with('term') unless $self->is_mswin32 || $self->is_dos || $self->is_amigaos + $self->opt_o_with('term') + unless $self->is_mswin32 || $self->is_dos || $self->is_amigaos || !($ENV{TERM} && ( ($ENV{TERM} || '') !~ /dumb|emacs|none|unknown/i )); @@ -521,7 +522,7 @@ sub process { $self->options_reading; $self->pagers_guessing; $self->aside(sprintf "$0 => %s v%s\n", ref($self), $self->VERSION); - $self->drop_privs_maybe unless $self->opt_U; + $self->drop_privs_maybe unless ($self->opt_U || $self->opt_F); $self->options_processing; # Hm, we have @pages and @found, but we only really act on one @@ -850,8 +851,11 @@ sub grand_search_init { =~ s/\.P(?:[ML]|OD)\z//; } else { - print STDERR "No " . + print STDERR "No " . ($self->opt_m ? "module" : "documentation") . " found for \"$_\".\n"; + if ( /^https/ ) { + print STDERR "You may need an SSL library (such as IO::Socket::SSL) for that URL.\n"; + } } next; } @@ -1326,7 +1330,7 @@ sub search_perlfunc { local $_; while (<$fh>) { /^=encoding\s+(\S+)/ && $self->set_encoding($fh, $1); - last if /^=head2 $re/; + last if /^=head2 (?:$re|Alphabetical Listing of Perl Functions)/; } # Look for our function @@ -1360,7 +1364,7 @@ sub search_perlfunc { last if $found > 1 and $inlist < 2; } } - elsif (/^=item/) { + elsif (/^=item|^=back/) { last if $found > 1 and $inlist < 2; } elsif ($found and /^X<[^>]+>/) { @@ -1669,9 +1673,9 @@ sub pagers_guessing { push @pagers, qw( less.exe more.com< ); unshift @pagers, $ENV{PAGER} if $ENV{PAGER}; } - elsif ( $self->is_amigaos) { - push @pagers, qw( /SYS/Utilities/MultiView /SYS/Utilities/More /C/TYPE ); - unshift @pagers, "$ENV{PAGER}" if $ENV{PAGER}; + elsif ( $self->is_amigaos) { + push @pagers, qw( /SYS/Utilities/MultiView /SYS/Utilities/More /C/TYPE ); + unshift @pagers, "$ENV{PAGER}" if $ENV{PAGER}; } else { if ($self->is_os2) { @@ -1696,7 +1700,7 @@ sub pagers_guessing { unshift @pagers, "$ENV{PERLDOC_PAGER} <" if $ENV{PERLDOC_PAGER}; } - $self->aside("Pagers: ", @pagers); + $self->aside("Pagers: ", (join ", ", @pagers)); return; } @@ -1923,19 +1927,21 @@ sub page { # apply a pager to the output file # many many corners of the OS don't like it. So we # have to force it to be "\" to make everyone happy. - # if we are on an amiga convert unix path to an amiga one - $output =~ s/^\/(.*)\/(.*)/$1:$2/ if $self->is_amigaos; + # if we are on an amiga convert unix path to an amiga one + $output =~ s/^\/(.*)\/(.*)/$1:$2/ if $self->is_amigaos; foreach my $pager (@pagers) { $self->aside("About to try calling $pager $output\n"); if ($self->is_vms) { last if system("$pager $output") == 0; - } elsif($self->is_amigaos) { + } elsif($self->is_amigaos) { last if system($pager, $output) == 0; } else { - # fix visible escape codes in ToTerm output - # https://bugs.debian.org/758689 - local $ENV{LESS} = defined $ENV{LESS} ? "$ENV{LESS} -R" : "-R"; + my $formatter = $self->{'formatter_class'}; + if ( $formatter->can('pager_configuration') ) { + $self->aside("About to call $formatter" . "->pager_configuration(\"$pager\")\n"); + $formatter->pager_configuration($pager, $self); + } last if system("$pager \"$output\"") == 0; } } |