use vars qw($VERSION @Pagers $Bindir $Pod2man
$Temp_Files_Created $Temp_File_Lifetime
);
-$VERSION = '3.17';
+$VERSION = '3.19';
#..........................................................................
if( $self->opt_f or $self->opt_q ) {
$self->usage("Only one of -f -or -q") if $self->opt_f and $self->opt_q;
$self->warn(
- "Perldoc is only really meant for reading one word at a time.\n",
+ "Perldoc is meant for reading one file at a time.\n",
"So these parameters are being ignored: ",
join(' ', @{$self->{'args'}}),
"\n" )
if(!$self->opt_i
or $self->is_vms or $self->is_mswin32
- or $self->Is_dos or $self->is_os2
+ or $self->is_dos or $self->is_os2
) {
# On a case-forgiving file system, or if case is important,
# that is it, all we can do.
}
}
- unshift @pagers, $ENV{PERLDOC_PAGER} if $ENV{PERLDOC_PAGER};
+ unshift @pagers, "$ENV{PERLDOC_PAGER} <" if $ENV{PERLDOC_PAGER};
return;
}
use parent qw(Pod::Perldoc::BaseTo);
use vars qw($VERSION);
-$VERSION = '3.17';
+$VERSION = '3.19';
use File::Spec::Functions qw(catfile);
use Pod::Man 2.18;
my @switches = grep !m/^_/s, keys %$self;
- push @switches, 'utf8' => 1;
+ # There needs to be a cleaner way to handle setting
+ # the UTF-8 flag, but for now, comment out this
+ # line because it often does the wrong thing.
+ #
+ # See RT #77465
+ #
+ #push @switches, 'utf8' => 1;
+
$self->debug( "Pod::Man switches are [@switches]\n" );
return @switches;
# Maybe someone set rendering switches as part of the opt_n value
# Deal with that here.
- my ($render, $switches) = $self->__nroffer() =~ /\A([\/a-zA-Z0-9_-]+)\b(.+)?\z/;
+ my ($render, $switches) = $self->__nroffer() =~ /\A([\/a-zA-Z0-9_\.-]+)\b(.+)?\z/;
$self->die("no nroffer!?") unless $render;
my @render_switches = $self->_collect_nroff_switches;
=head1 SYNOPSIS
- B<perldoc> [B<-h>] [B<-D>] [B<-t>] [B<-u>] [B<-m>] [B<-l>] [B<-F>]
- [B<-i>] [B<-V>] [B<-T>] [B<-r>]
- [B<-dI<destination_file>>]
- [B<-oI<formatname>>]
- [B<-MI<FormatterClassName>>]
- [B<-wI<formatteroption:value>>]
- [B<-n>I<nroff-replacement>]
- [B<-X>]
- [B<-L> I<language_code>]
+ perldoc [-h] [-D] [-t] [-u] [-m] [-l] [-F]
+ [-i] [-V] [-T] [-r]
+ [-d destination_file]
+ [-o formatname]
+ [-M FormatterClassName]
+ [-w formatteroption:value]
+ [-n nroff-replacement]
+ [-X]
+ [-L language_code]
PageName|ModuleName|ProgramName|URL
Examples:
- B<perldoc> B<-f> BuiltinFunction
+ perldoc -f BuiltinFunction
- B<perldoc> B<-L> it B<-f> BuiltinFunction
+ perldoc -L it -f BuiltinFunction
- B<perldoc> B<-q> FAQ Keyword
+ perldoc -q FAQ Keyword
- B<perldoc> B<-L> fr B<-q> FAQ Keyword
+ perldoc -L fr -q FAQ Keyword
- B<perldoc> B<-v> PerlVariable
+ perldoc -v PerlVariable
See below for more description of the switches.
=item B<-T>
This specifies that the output is not to be sent to a pager, but is to
-be sent right to STDOUT.
+be sent directly to STDOUT.
=item B<-d> I<destination-filename>
or nouser's account, or -2 if unavailable. If it cannot relinquish
its privileges, it will not run.
-
=head1 ENVIRONMENT
Any switches in the C<PERLDOC> environment variable will be used before the
command line arguments.
-Useful values for C<PERLDOC> include C<-oman>, C<-otext>, C<-otk>, C<-ortf>,
+Useful values for C<PERLDOC> include C<-oterm>, C<-otext>, C<-ortf>,
C<-oxml>, and so on, depending on what modules you have on hand; or
-the formatter class may be specified exactly with C<-MPod::Perldoc::ToMan>
+the formatter class may be specified exactly with C<-MPod::Perldoc::ToTerm>
or the like.
C<perldoc> also searches directories
(The latter is so that embedded pods for executables, such as
C<perldoc> itself, are available.)
+In directories where either C<Makefile.PL> or C<Build.PL> exist, C<perldoc>
+will add C<.> and C<lib> first to its search path, and as long as you're not
+the superuser will add C<blib> too. This is really helpful if you're working
+inside of a build directory and want to read through the docs even if you
+have a version of a module previously installed.
+
C<perldoc> will use, in order of preference, the pager defined in
C<PERLDOC_PAGER>, C<MANPAGER>, or C<PAGER> before trying to find a pager
on its own. (C<MANPAGER> is not used if C<perldoc> was told to display
One useful value for C<PERLDOC_PAGER> is C<less -+C -E>.
Having PERLDOCDEBUG set to a positive integer will make perldoc emit
-even more descriptive output than the C<-v> switch does; the higher the
+even more descriptive output than the C<-D> switch does; the higher the
number, the more it emits.