perl pod文档使用 =head =cut =pod pod2text 实现程序usage说明

=head1 NAME

The name of your program or module.

 

=head1 SYNOPSIS

A one-line description of what your program or module does (purportedly).

 

=head1 DESCRIPTION

The bulk of your documentation. (Bulk is good in this context.)

 

=head1 AUTHOR

Who you are. (Or an alias, if you are ashamed of your program.)

 

=head1 BUGS

What you did wrong (and why it wasn’t really your fault).

 

=head1 SEE ALSO

Where people can find related information (so they can work around your bugs).

 

=head1 COPYRIGHT

The copyright statement. If you wish to assert an explicit copyright, you should say something like:

Copyright 2013, Randy Waterhouse.  All Rights Reserved.

 

注意:每个=标签上下必须隔一行,否则就会错误解析。

=for html   或者 =for text

是把下面的单行注视当作html或者text来处理,与其功能类似的是 =begin html  / =end html    ;   =begin text /  =end text   两对。begin和end之间可以处理多行。

 

=over  4

=item  SOMEWORD

 

  *************

 

=item somewordelse

 

******

 

=back

以上写法是写一个列表,以over开头,后面的数字是列表中每行的缩进量。最后以=back 结尾。

=cut    是结束pod块的标志,与程序分开。

 

在perl中,可以使用 pod2html  **.pm  >**.html 来生成html格式的pod文档。

 

=pod =cut既可以作为程序多行注释,又可以实现程序usage说明,利用pod2text命令。die (`pod2text $0`);即可

转载于:https://www.cnblogs.com/xianghang123/archive/2011/09/27/2193428.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值