Auto-numbering in perlpod

--20cf3054a4613ec35504a1171788
Content-Type: text/plain; charset=UTF-8

Hi,

While creating POD for modules in Perl, I often specify numbered list

1. Parameter1
2. Parameter2
3. Parameter3
...
....
etc

or

1. It does this
2. It also does that
3. But it won't do this
....
...
etc

Currently the numbered list is hard-coded (i.e numbers 1, 2, 3 etc). Can I
make it auto-increament like

[some-tag Param1 close-tag]
[some-tag Param2 close-tag]
[some-tag Param3 close-tag]
etc

TIA

~Parag

--20cf3054a4613ec35504a1171788--
Parag Kalra [ So, 17 April 2011 08:07 ] [ ID #2058267 ]

Re: Auto-numbering in perlpod

Hi Parag,

On Sunday 17 Apr 2011 09:07:13 Parag Kalra wrote:
> Hi,
>
> While creating POD for modules in Perl, I often specify numbered list
>
> 1. Parameter1
> 2. Parameter2
> 3. Parameter3
> ..
> ...
> etc
>
> or
>
> 1. It does this
> 2. It also does that
> 3. But it won't do this
> ...
> ..
> etc
>
> Currently the numbered list is hard-coded (i.e numbers 1, 2, 3 etc). Can I
> make it auto-increament like
>
> [some-tag Param1 close-tag]
> [some-tag Param2 close-tag]
> [some-tag Param3 close-tag]
> etc
>

You might wish to look at =3Ditem. Reading from perlpod:

<QUOTE>
=B7 And perhaps most importantly, keep the items consistent: e=
ither
use "=3Ditem *" for all of them, to produce bullets; or use
"=3Ditem 1.", "=3Ditem 2.", etc., to produce numbered lists;=
or use
"=3Ditem foo", "=3Ditem bar", etc.--namely, things that look
nothing like bullets or numbers.
</QUOTE>

Note however, that POD is incredibly limited (by design), and you may wish =
to
either generate it, or alternatively use a richer format such as
http://en.wikipedia.org/wiki/DocBook .

Regards,

Shlomi Fish

=2D-
=2D--------------------------------------------------------- -------
Shlomi Fish http://www.shlomifish.org/
Rethinking CPAN - http://shlom.in/rethinking-cpan

Every successful open-source project will eventually spawn a sub-project.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Shlomi Fish [ So, 17 April 2011 10:54 ] [ ID #2058270 ]
Perl » gmane.comp.lang.perl.beginners » Auto-numbering in perlpod

Vorheriges Thema: Pdf to Excel
Nächstes Thema: format output from system command