POD is a markup language used for writing documentation for Perl, Perl programs, and Perl modules. It is simple to use.
There are various translators available for converting Pod to different formats such as plain text, HTML, man pages, and more. Pod markup comprises of three kinds of paragraphs :
- Ordinary Paragraph: For bold, italic, code-style, hyperlinks, and more use formatting code in ordinary graph
- Verbatim Paragraph: Code block or other text which does not require any special parsing or formatting are implemented using, and these should not be wrapped too.
- Command Paragraph: A command paragraph is used for chunks of text, usually used as headings or parts of lists. Command paragraphs start with =, followed by an identifier and an arbitrary text
To embed Pod (Plain Old Text) documentation in Perl modules and scripts , use embedded documentation in your Perl Code by using following rules:
- Start your documentation with an empty line
- Place a ‘=head1′ command at the beginning
- Place a ‘=cut’ command at end
Note : Perl will ignore the Pod (Plain Old Text) text you entered in the code
=head1 SYNOPSIS [GEEKSFORGEEKS]. =cut
Following mentioned is a simple example of using embedded documentation inside your Perl code
Hello, World Hello, geeksforgeeks
If Pod is put at the end of the file, and you are using an __END__ or __DATA__ cut mark, then make sure that you put an empty line before the first Pod command, otherwise without an empty line before the =head1, many translators will not recognize the =head1 as starting a Pod block.
Hello, World =head1 Hello, World Example This example demonstrate very basic syntax of Perl. print "Hello, geeksforgeeks\n";
- Perl | split() Function
- Perl | chomp() Function
- Perl | Backtracking in Regular Expression
- Perl | Searching in a File using regex
- Perl | Operators | Set - 1
- Perl | lt operator
- Perl | chop() Function
- Perl | rename() Function
- Perl | Subroutines or Functions
- Perl | Decision Making (if, if-else, Nested–if, if-elsif ladder, unless, unless-else, unless-elsif)
- Perl | Scalars
- Perl | Loops (for, foreach, while, do...while, until, Nested loops)
- Number Guessing Game using Perl
- Perl | Comparing Scalars
- Perl | Removing leading and trailing white spaces (trim)
- Perl | String functions (length, lc, uc, index, rindex)
- Perl | Arrays
- Perl | Data Types
- Perl | undef and the defined function
- Perl | Automatic String to Number Conversion or Casting
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.