POD (Plain Old Documentation) documents can be embedded in a module or script in Perl.
POD is a simple and easy-to-use markup language.
Rules for the use of POD documents:
POD documents to
=head1
start,
=cut
end,
=head1
front vs.
=cut
add a blank line after.
Perl ignores Execute the above program, and the output is as follows: We can also use Execute the above program, and the output is as follows: The following example does not read the POD document: Example Execute the above program, and the output is as follows: Pod (Plain Old Documentation), a simple and easy-to-use markup language (markup language), is often used for document writing in perl programs and modules. The converter of Pod can convert Pod into various formats, such as Pod markup language consists of three basic types: plain, original, and command. Ordinary paragraphs: you can use formatting code in ordinary paragraphs, such as boldface, italics, or code style, underlining, etc. Original paragraph: the original paragraph, used for code blocks or other parts that do not need to be processed by the converter, and does not require paragraph rearrangement. Command paragraph: the command paragraph acts on the entire document and is usually used for title setting or list markup. All command paragraphs (he isonly one line in length) are used In perl, you can use the Consider the following POD instance: Use Open in a browser The following example is written directly in the POD document Use Open in a browser
POD
. The document in the. Examples are as follows: 5.47.1. Example #
#/ Usr/bin/perlprint "Hello, World n"= Head1Hello, World instance, this is a
A simple example of Perl= Cutprint "Hello, Runoob n";
Hello, World
Hello, Runoob
"__END__"
or
"__DATA__"
“comment” everythingafter the line: 5.47.2. Example #
#/ Usr/bin/perlprint "Hello,
World n "; while (<DATA>) {print $ _;} __END_ _=head1Hello, World instance
This is a simple example of Perl. Print "Hello, Runoob n";
Hello, World
=Head1 Hello, World instance
This is a simple example of Perl.
Print "Hello, Runoob n";
#/ Usr/bin/perlprint "Hello, World n"\__ END_\_= Head1Hello, World instance
This is a simple example of Perl. Print "Hello, Runoob n";
Hello, World
What is POD? #
text
,
html
,
man
, and so on.
"="
first, then an identifier. Subsequent text will be affected by this command. Commands that are now widely used include=Pod (Start Document)
=Head1 Title Text
=Head2 Title Text
=Head3 Title Text
=Head4 Title Text
=Number of indented spaces over
=Item prefix
=Back (End List)
=Begin Document Format
=End Document Format
=For formatted text
=Encoding encoding type
=Cut (end of document)
pod2html.pod
>.html
to generate pod documents in html format. 5.47.3. Example #
=beginhtml =encoding utf-8 =head1 Novice Tutorial=cut
pod2html
will be copied in the original text.
pod2html
command execution, converting it to
HTML
code:$ pod2html test.pod > test.html
test.html
, the link section is the index, which is shown as follows:
HTML
:=begin html
=encoding utf-8
<h1>Novice Tutorial</h1>
<p> www.runoob.com </p>
=end html
pod2html
will be copied in the original text.
pod2html
command execution, converting it to HTML code:$ pod2html test.pod > test.html
test.html
, the link section is the index, which is shown as follows: