POD 允許你在 Perl 代碼中使用標(biāo)記來創(chuàng)建文檔。如果你見過 Javadoc 或 PHPdoc, 它跟它們很相像。
POD 是語言的一部分,并非額外的規(guī)范。
=head1
?和?=head2
?創(chuàng)建標(biāo)題=head1 MOST IMPORTANT
Blah blah
=head2 Subheading
blah blah
=head2 Subhading
blah blah
要創(chuàng)建這樣的列表:
使用:
=over
=item * Wango
=item * Tango
=item * Fandango
=back
要創(chuàng)建下面的列表:
使用:
=over
=item 1 Visit perl101.org
=item 2 ???
=item 3 Profit!
=back
POD 用?B<>
、I<>
?及?C<>
?分別表示粗體、斜體、代碼。
B<This is bolded>
I<This is italics>
C<This is code>
標(biāo)記格式能夠嵌套。
L<>
?超鏈接L<>
?既可以鏈接文檔中的關(guān)鍵字,如?L<Methods>
;也可以鏈接 URL,如L<http://search.cpan.org
。
段落會自動換行,并由至少一個空行分隔。
A literal block is indented at least one space
and does not
get
wrapped.
這來自于:
Everything in a paragraph word-wraps automatically. A paragraph
is separated by at least one blank line.
A literal block is indented at least one space
and does not
get
wrapped.
它將在編譯時被去除。
更多建議: