• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

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

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

=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`);即可


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap