- 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!"
推薦閱讀
- GAE編程指南
- Spring 5.0 Microservices(Second Edition)
- 跟“龍哥”學C語言編程
- 程序員考試案例梳理、真題透解與強化訓練
- Unity 3D腳本編程:使用C#語言開發跨平臺游戲
- JavaScript機器人編程指南
- Unity Character Animation with Mecanim
- 從零開始學Android開發
- MyBatis 3源碼深度解析
- Learning Image Processing with OpenCV
- Selenium WebDriver Practical Guide
- 金融商業數據分析:基于Python和SAS
- VMware vSphere Design Essentials
- Three.js Essentials
- JavaScript程序設計實例教程(第2版)