Auto-numbering in perlpod

Auto-numbering in perlpod

am 17.04.2011 08:07:13 von Parag Kalra

--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--

Re: Auto-numbering in perlpod

am 17.04.2011 10:54:33 von Shlomi Fish

Hi Parag,

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

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


=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.


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

Regards,

Shlomi Fish

=2D-=20
=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@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/