0

有人知道为项目标题动态增加整数的方法吗?这主要是为了避免在需要在大量步骤中间的某处添加/删除新步骤时必须更改每个步骤编号。下面是一个小三步过程,让您大致了解模板结构:

=step_wash 1. Wash

<p>Add washing steps here</p>

=cut

# Throw some perl code here to wash stuff

=step_dry 2. Dry

<p>Add drying steps here</p>

=cut

# Throw some perl code here to dry things

=step_fold 3. Fold

<p>Add folding steps here</p>

=cut

# Fold all of the things Perl!

忽略项目名称和结构,目标是尝试消除对每个项目的标题进行静态编号的使用。我想知道是否有一种可能的方法来生成一个递增的整数;很像用类似的东西替换 1、2、3 等{ print $i++ }。但是在 POD 中。

4

2 回答 2

0
于 2013-10-06T21:37:17.913 回答
0

POD is pretty Plain and doesn't do that sort of thing.

An extension of POD called PseudoPod in theory does (see https://metacpan.org/pod/distribution/Pod-PseudoPod/lib/Pod/PseudoPod/Tutorial.pod#Lists) but when I tried it it gave an error.

于 2013-10-06T21:57:36.423 回答