Re: confused about POD
- From: "jl_post@xxxxxxxxxxx" <jl_post@xxxxxxxxxxx>
- Date: Fri, 25 May 2012 14:26:38 -0700 (PDT)
On May 25, 8:47 am, ccc31807 <carte...@xxxxxxxxx> wrote:
If I document my Perl code (either an executable or a PM) using POD
formatted text, what command do I run to produce a series of HTML
pages?
You can use "pd2html" to accomplish that. For example, let's say
you want to read the perldocs for the Math::BigInt module. You can
read them straight up with the command:
perldoc Math::BigInt
but if you'd rather read them with a web browser, you can use
"pod2html" like this:
pod2html Math::BigInt > math_bigint_documentation.html
then open the file "math_bigint_documentation.html" in your favorite
web browser, and enjoy!
There are more formats you can read the perldocs in. For example,
if you prefer to read a LaTeX-formatted documentation, you can create
one with the command:
pod2latex Math::BigInt > latex_file
Incidentally, I can't always remember the proper formatting codes
to use, and instead of looking them up with "perldoc perlpod",
sometimes I prefer to pick apart an already written POD and learn by
example. (If you haven't figured it out by now, I often use the
Math::BigInt module to see how some POD formatting was done.)
If I want to see how some formatting was done in the Math::BigInt
module, I type:
perldoc -l Math::BigInt
(that's the letter "ell", not the number 1)
That shows me where the module's file is literally located, then I can
read it with any text viewer/editor I have available.
I can also skip a step just by typing:
perldoc -m Math::BigInt
and then I'll be immediately shown the module file's exact contents
(code, POD, and all).
I hope this helps!
-- Jean-Luc
.
- References:
- confused about POD
- From: ccc31807
- confused about POD
- Prev by Date: Re: coding question
- Next by Date: Re: confused about POD
- Previous by thread: Re: confused about POD
- Next by thread: How does a script language work in a server
- Index(es):
Relevant Pages
|