- 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!"
推薦閱讀
- Cocos2d Cross-Platform Game Development Cookbook(Second Edition)
- Learn Type:Driven Development
- Effective C#:改善C#代碼的50個有效方法(原書第3版)
- Python進階編程:編寫更高效、優雅的Python代碼
- 零基礎學Python網絡爬蟲案例實戰全流程詳解(高級進階篇)
- Visual Basic程序設計實驗指導(第二版)
- 區塊鏈技術與應用
- Natural Language Processing with Java and LingPipe Cookbook
- Visualforce Developer’s guide
- Node學習指南(第2版)
- SQL Server 2008 R2數據庫技術及應用(第3版)
- Building Serverless Architectures
- Unity Character Animation with Mecanim
- 從Power BI到Analysis Services:企業級數據分析實戰
- Java EE Web應用開發基礎