POD(Plain Old Documentation)
直接嵌入在代碼中,方便添加,同時方便查看。程序員要養成良好的文檔習慣。
語法
=pod
=head1 NAME 不同的標題號代表著不同的縮進
PodTest
=head2 SYNOPSIS
It is used for test for perl POD module
=head3 DESCRIPTION
This is only a test, and it does not do anything,
I will show you how to use the POD in perl script.
=over 用于列表
=item Foo()
This function is used for Foo
=item Bar()
This function is used for Bar
=back
=begin text 用于標記一段有特殊格式的文檔,可以不遵循POD的語法
---------------
| aaa |
| bbb |
---------------
^^^^ smile ^^^^
=end text
=encoding utf8 編碼格式
=cut
查看
perldoc podtest.pl
導出
pod2html podtest.pl > podtest.html