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

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!"
主站蜘蛛池模板: 海盐县| 渝北区| 永春县| 平塘县| 德昌县| 彭阳县| 博野县| 景泰县| 逊克县| 古交市| 永年县| 康定县| 盐城市| 佛教| 略阳县| 丽江市| 景泰县| 韶关市| 阜城县| 利津县| 崇信县| 合肥市| 阿拉善盟| 巍山| 开化县| 兴山县| 五华县| 荥经县| 庆阳市| 德钦县| 伊宁市| 垣曲县| 桐柏县| 枣庄市| 南通市| 高唐县| 上高县| 错那县| 隆林| 玉龙| 英吉沙县|