File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ / /2019, 12/28, Queenie Chen
2
+ //Pod
3
+ //PodSpec || Perldoc
4
+ //pod cmd paragraph
5
+ / /list
6
+ //format code
7
+
8
+ //當 perl 直譯器在新的陳述句列開頭處發現 = 時,就會轉到 Pod 處理模式
9
+ //透過編譯器編譯程式碼時,perl 直譯器會跳過 = 這些說明文件,
10
+ //(1) perldoc 則僅解析 Pod 部分,略過程式碼。
11
+ //利用 % perldoc lib/PQK.pm
12
+ //利用 % pod2html lib/PQK.pm 可以將程式碼轉html
13
+
14
+ //pod cmd paragraph 稱為命令列段落
15
+
16
+ =head1 Name
17
+
18
+ =head1 Description
19
+
20
+ =head2 Functions
21
+
22
+ =cut #說明文件結束,回到程式碼
23
+
24
+ / /(2)串列 list 的建立
25
+ //以 =over n 開始
26
+ //每個項目都以 =item 開頭
27
+ // 以 =back 結尾
28
+
29
+ =over 4
30
+
31
+ =item 1. PPP
32
+
33
+ =item 2. QQQ
34
+
35
+ =item 3.KKK
36
+
37
+ =back
38
+
39
+ //以上為數字分項,當然也可以用 * 代替(將顯示圓點分項符號)
40
+
41
+ //(3)說明文字內容直接加入,無須任何標記。
42
+ //(4)倘若想將說明文字變成程式碼,則直接空白鍵開頭的段落即可。
43
+
44
+ //(5)格式控制碼 formatting code
45
+ //也被稱為內部序列 interior sequence
46
+ //格式控制碼需要大寫
47
+ //被格式化的文字內容放在角括號 < > 內
48
+
49
+ B<bold text >
50
+ C<code text >
51
+ E<named entity>
52
+ I<italic text >
53
+ L<linked text>
54
+
55
+ //倘若要格式化的內容正好有<>則用""雙引號包覆即可
56
+ //特殊字符使用 E<>
57
+
58
+ //(6)編碼則可以直接被宣告
59
+
60
+ =encoding utf8
61
+
62
+ // (7)把Pod內容加入模組後,可用 podchecker 檢查。
63
+
64
+ % podchecker lib/PQK.pm
You can’t perform that action at this time.
0 commit comments