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
最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。 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 () {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 Tutorialh1> <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: