diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Pod/Perldoc.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Pod/Perldoc.pm | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm b/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm index 969019d89ad..787353ba588 100644 --- a/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm +++ b/Master/tlpkg/tlperl/lib/Pod/Perldoc.pm @@ -12,7 +12,8 @@ use File::Spec::Functions qw(catfile catdir splitdir); use vars qw($VERSION @Pagers $Bindir $Pod2man $Temp_Files_Created $Temp_File_Lifetime ); -$VERSION = '3.25'; +$VERSION = '3.25_03'; # patched in perl5.git +$VERSION =~ s/_//; #.......................................................................... @@ -69,6 +70,7 @@ BEGIN { *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; + *is_amigaos = $^O eq 'amigaos' ? \&TRUE : \&FALSE unless defined &is_amigaos; } $Temp_File_Lifetime ||= 60 * 60 * 24 * 5; @@ -484,7 +486,7 @@ 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->opt_o_with('term') unless $self->is_mswin32 || $self->is_dos || $self->is_amigaos || !($ENV{TERM} && ( ($ENV{TERM} || '') !~ /dumb|emacs|none|unknown/i )); @@ -573,6 +575,9 @@ sub find_good_formatter_class { my @class_list = @{ $self->{'formatter_classes'} || [] }; $self->die( "WHAT? Nothing in the formatter class list!?" ) unless @class_list; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; + my $good_class_found; foreach my $c (@class_list) { DEBUG > 4 and print "Trying to load $c...\n"; @@ -1004,6 +1009,8 @@ sub new_translator { # $tr = $self->new_translator($lang); my $self = shift; my $lang = shift; + local @INC = @INC; + pop @INC if $INC[-1] eq '.'; my $pack = 'POD2::' . uc($lang); eval "require $pack"; if ( !$@ && $pack->can('new') ) { @@ -1662,6 +1669,10 @@ 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}; + } else { if ($self->is_os2) { unshift @pagers, 'less', 'cmd /c more <'; @@ -1912,10 +1923,15 @@ 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; + 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) { + last if system($pager, $output) == 0; } else { # fix visible escape codes in ToTerm output # https://bugs.debian.org/758689 |