官术网_书友最值得收藏!

The --doc command

The --doc (notice the double hyphen) command-line extracts the documentation from the program and prints it. Here, the so-called Pod documentation is meant. We will cover the Pod syntax in Chapter 2, Writing Code.

Let's see the small program that includes the documentation inside itself:

=begin pod
=head1 Hello, World program
=item This program prints "Hello, World!"
=end pod

say "Hello, World!";

Run it with the --doc command-line option as follows:

$ perl6 --doc pod.pl

It will print only parts of the documentation. The code itself will not be executed:

 Hello, World program
 
   * This program prints "Hello, World!"
主站蜘蛛池模板: 临城县| 武陟县| 周至县| 米泉市| 鲜城| 黔西| 鹿泉市| 拜泉县| 昆山市| 富裕县| 绥芬河市| 夏津县| 屯门区| 广西| 大理市| 新龙县| 当阳市| 长宁县| 资阳市| 大渡口区| 洛扎县| 灌阳县| 寿阳县| 从化市| 双鸭山市| 马关县| 汤原县| 安远县| 油尖旺区| 新乡县| 伊宁市| 靖江市| 玛多县| 宜城市| 雅安市| 化德县| 石首市| 临西县| 佳木斯市| 杭州市| 垣曲县|