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

  • Perl 6 Deep Dive
  • Andrew Shitov
  • 105字
  • 2021-07-03 00:05:44

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!"
主站蜘蛛池模板: 二连浩特市| 百色市| 青河县| 阜宁县| 凤冈县| 武义县| 海南省| 靖江市| 建瓯市| 宁城县| 酒泉市| 马关县| 渝北区| 定陶县| 濉溪县| 顺义区| 马龙县| 灌阳县| 灌阳县| 屏南县| 文化| 庄浪县| 原阳县| 拜泉县| 康乐县| 阳谷县| 顺平县| 屏山县| 巴彦淖尔市| 吴旗县| 浦城县| 米泉市| 衡东县| 保定市| 汝阳县| 阜阳市| 双流县| 图们市| 中卫市| 阿图什市| 鲜城|