},
'Pod::Perldoc' => {
- 'DISTRIBUTION' => 'MALLEN/Pod-Perldoc-3.27.tar.gz',
+ 'DISTRIBUTION' => 'MALLEN/Pod-Perldoc-3.28.tar.gz',
'FILES' => q[cpan/Pod-Perldoc],
# Note that we use the CPAN-provided Makefile.PL, since it
use vars qw($VERSION @Pagers $Bindir $Pod2man
$Temp_Files_Created $Temp_File_Lifetime
);
-$VERSION = '3.27';
+$VERSION = '3.28';
#..........................................................................
=~ 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;
}
unshift @pagers, "$ENV{PERLDOC_PAGER} <" if $ENV{PERLDOC_PAGER};
}
- $self->aside("Pagers: ", @pagers);
+ $self->aside("Pagers: ", (join ", ", @pagers));
return;
}
} 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";
- # On FreeBSD, the default pager is more.
- local $ENV{MORE} = defined $ENV{MORE} ? "$ENV{MORE} -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;
}
}
use warnings;
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
use Carp qw(croak carp);
use Config qw(%Config);
use strict;
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
BEGIN { # Make a DEBUG constant ASAP
*DEBUG = defined( &Pod::Perldoc::DEBUG )
use parent qw(Pod::Perldoc::BaseTo);
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
sub is_pageable { 1 }
sub write_with_binmode { 0 }
use vars qw(@ISA);
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
# Pick our superclass...
#
use parent qw(Pod::Perldoc::BaseTo);
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
use File::Spec::Functions qw(catfile);
use Pod::Man 2.18;
use parent qw(Pod::Perldoc::BaseTo);
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
# This is unlike ToMan.pm in that it emits the raw nroff source!
use parent qw(Pod::Perldoc::BaseTo);
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
sub is_pageable { 1 }
sub write_with_binmode { 0 }
use parent qw( Pod::Simple::RTF );
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
sub is_pageable { 0 }
sub write_with_binmode { 0 }
use warnings;
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
use parent qw(Pod::Perldoc::BaseTo);
$self->_get_default_width;
}
+sub pager_configuration {
+ my($self, $pager, $perldoc) = @_;
+
+ # do not modify anything on Windows or DOS
+ return if ( $perldoc->is_mswin32 || $perldoc->is_dos );
+
+ if ( $pager =~ /less/ ) {
+ $self->_maybe_modify_environment('LESS');
+ }
+ elsif ( $pager =~ /more/ ) {
+ $self->_maybe_modify_environment('MORE');
+ }
+
+ return;
+}
+
+sub _maybe_modify_environment {
+ my($self, $name) = @_;
+
+ if ( ! defined $ENV{$name} ) {
+ $ENV{$name} = "-R";
+ }
+
+ # if the environment is set, don't modify
+ # anything
+
+}
+
sub _get_stty { `stty -a` }
sub _get_columns_from_stty {
=head1 NAME
-Pod::Perldoc::ToTerm - render Pod with terminal escapes
+Pod::Perldoc::ToTerm - render Pod with terminal escapes
=head1 SYNOPSIS
perldoc -o term -w indent:5 Some::Modulename
+=head1 PAGER FORMATTING
+
+Depending on the platform, and because this class emits terminal escapes it
+will attempt to set the C<-R> flag on your pager by injecting the flag into
+your environment variable for C<less> or C<more>.
+
+On Windows and DOS, this class will not modify any environment variables.
+
=head1 CAVEAT
This module may change to use a different text formatter class in the
=head1 COPYRIGHT AND DISCLAIMERS
-Copyright (c) 2011 Mark Allen.
+Copyright (c) 2017 Mark Allen.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
use warnings;
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
use parent qw(Pod::Perldoc::BaseTo);
use warnings;
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
use parent qw(Pod::Perldoc::BaseTo);
use parent qw( Pod::Simple::XMLOutStream );
use vars qw($VERSION);
-$VERSION = '3.27';
+$VERSION = '3.28';
sub is_pageable { 0 }
sub write_with_binmode { 0 }