jimw54321 has asked for the wisdom of the Perl Monks concerning the following question:

Hi. Just created a private installation of Perl 5.18.2 on a Solaris 10 box. When I use the perldoc command, I get several blank lines before I see any output. Are there others seeing the same thing? Doing a bing search and searching here have yielded nothing I understand.

Using the option "-otext" does make the problem go away, but I do miss the manpage like text highlighting. I have tried setting TERM to various values, setting PERLDOC_PAGER to less and more. What did work was:

perl -S -I/usr/perl5/lib/5.8.4/lib perldoc perldoc

But I am sure that the newer modules have wanted bug fixes. My perl is not built with anything more exotic than threads enabled. Not sure how much more information I can provide other than my stty settings. Thanks people.

Update: Just noticed the variable PERLDOCDEBUG. This might help someone understand how to help me.

The file /our_perl/lib/5.18.2/pod/perldoc.pod indeed looks promising +! Found /our_perl/lib/5.18.2/pod/perldoc.pod 'grand_search_init: Found as /our_perl/lib/5.18.2/pod/perldoc.pod Found: /our_perl/lib/5.18.2/pod/perldoc.pod] That's a non-dynamic pod search. Formatter switches now: [[DEBUG Pod::Man switches are [] DEBUG Parsing /our_perl/lib/5.18.2/pod/perldoc.pod DEBUG Done parsing /our_perl/lib/5.18.2/pod/perldoc.pod DEBUG Writing podman.out.29852.txt with Pod::Man output DEBUG Filtering through /usr/bin/nroff DEBUG render is /usr/bin/nroff DEBUG render options are -man __bindir /our_perl/bin] [__pod2man pod2man]] DEBUG Writing to pipe to /usr/bin/nroff DEBUG Writing chunk 3.531982421875 DEBUG Checking read DEBUG Writing chunk 4.531982421875 DEBUG Checking read DEBUG Reading DEBUG Read 4096 bytes DEBUG Output is 4096 bytes DEBUG Writing chunk 5.531982421875 DEBUG Checking read DEBUG Reading DEBUG Read 4096 bytes DEBUG Output is 8192 bytes DEBUG Writing chunk 6.531982421875 DEBUG Checking read DEBUG Done writing DEBUG Done reading. Output is 11470 bytes DEBUG Output: ----
speed 38400 baud; rows = 46; columns = 150; ypixels = 0; xpixels = 0; csdata ? eucw 1:0:0:0, scrw 1:0:0:0 intr = ^c; quit = ^\; erase = ^?; kill = ^u; eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^q; stop = ^s; susp = ^z; dsusp = ^y; rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v; -parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crts +xoff -parext -ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuc +lc ixon -ixany -ixoff imaxbel isig icanon -xcase echo echoe echok -echonl -noflsh -tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel

Replies are listed 'Best First'.
Re: Trouble using perldoc
by kcott (Archbishop) on Apr 26, 2014 at 05:09 UTC

    G'day jimw54321,

    I have Perl v5.18.1 (I can't see any mention of changes to "perldoc" or "POD" in the latest, v5.18.2, perldelta). I have version 3.19 of Pod::Perldoc ("The guts of perldoc utility."). I'm on a completely different platform to you (Mac OS X): keep this in mind when reading the following.

    I used to have a variety of problems with perldoc output which I fixed, after much trial and error, simply by adding this to my ~/.bash_profile (the equivalent on your OS may be ~/.profile [it's been quite a few years since I last worked on Solaris]):

    PAGER="/usr/bin/less -R"

    This version of less seems to have the same options as me, check that -R means the same on your platform. Other options that may be worth trying are -r (which is similar to -R) and -s (to squeeze multiple, consecutive blank lines into one) which seems directly applicable to the problem you describe.

    I don't have PERLDOC_PAGER or MANPAGER set. See perldoc - ENVIRONMENT for more information on pager settings and other less options.

    In case it helps, here's my terminal characteristics (in the spoiler):

    -- Ken

      Thanks Ken for the help. Using "-s" to the less command worked. My best guess is that the bug is actually in Solaris's nroff.