I've put POD documentation into my Perl script but when I do 'perldoc file.pl' I get a blank page in some type of pager. The pager file says '/tmp/(random letters and numbers)'. I checked several pages viaGoogle and my documentation looks right, as I put a blank line before and after every '=' command. What could I be doing wrong here? Here is a small test.pl file which doesn't even work.


#!/usr/bin/perl # Update date: # Purpose: blah blah blah # # VARIABLES # blah = # foo = # =pod =head1 NAME =head1 SYNOPSIS This is a normal paragraph of text. A second line to test if the paragraph wraps with the previous one. =cut use warnings; use strict; print "Hi\n"; exit;

These also don't work and just give me a blank page in a pager.
  1. perldoc -t test.pl
  2. perldoc -u test.pl
  3. perldoc -v test.pl

and I noticed

  1. $PAGER env var is not defined.
  2. $LESS env var also not defined.
  3. perldoc -T test.pl works as plain text sent to the terminal. So I have a possible problem with something else?
  4. I have groff 1.18.1.1
  5. Bottom of man page for pod2man says "2013-04-17". I didn't see a way to show the version of it.

Thank you.


EDIT: I had to edit my .cshrc, and add a line 'setenv PERLDOC_PAGER /bin/more', save the .cshrc, and source it to make it work. Doing 'setenv PAGER /bin/more' was not enough. I now have both anyway.

Perl 5.8.8 on Redhat Linux RHEL 5.5.56 (64-bit)

In reply to perldoc POD documentation not working by bulrush

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.