perl 5.003_06: utils/h2xs.PL
[p5sagit/p5-mst-13.2.git] / utils / perldoc.PL
index e53d542..46a89d0 100644 (file)
@@ -222,8 +222,9 @@ unless($Is_VMS) {
        @pagers = qw( more less pg view cat );
        unshift(@pagers,$ENV{PAGER}) if $ENV{PAGER};
 } else {
+       require Config;
        $tmp = 'Sys$Scratch:perldoc.tmp1_'.$$;
-       @pagers = qw( most more less type/page );
+       @pagers = ($Config::Config{'pager'},qw( most more less type/page ));
        unshift(@pagers,$ENV{PERLDOC_PAGER}) if $ENV{PERLDOC_PAGER};
        $goodresult = 1;
 }
@@ -244,7 +245,11 @@ foreach (@found) {
                close(TMP);
        } elsif(not $opt_u) {
                open(TMP,">>$tmp");
-               $rslt = `pod2man $_ | nroff -man`;
+               if($^O =~ /hpux/) {
+                       $rslt = `pod2man $_ | nroff -man | col -x`;
+               } else {
+                       $rslt = `pod2man $_ | nroff -man`;
+               }
                if ($Is_VMS) { $err = !($? % 2) || $rslt =~ /IVVERB/; }
                else      { $err = $?; }
                print TMP $rslt unless $err;
@@ -293,10 +298,11 @@ B<perldoc> [B<-h>] [B<-v>] [B<-t>] [B<-u>] PageName|ModuleName|ProgramName
 
 =head1 DESCRIPTION
 
-I<perldoc> looks up a piece of documentation in .pod format that is
-embedded in the perl installation tree or in a perl script, and displays
-it via pod2man | nroff -man | $PAGER.  This is primarily used for the
-documentation for the perl library modules. 
+I<perldoc> looks up a piece of documentation in .pod format that is embedded
+in the perl installation tree or in a perl script, and displays it via
+C<pod2man | nroff -man | $PAGER>. (In addition, if running under HP-UX,
+C<col -x> will be used.) This is primarily used for the documentation for
+the perl library modules.
 
 Your system may also have man pages installed for those modules, in
 which case you can probably just use the man(1) command.