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