Pod::E...r::List(3pm)
β¨ Pod::Elemental::Transformer::List β¨
okay bestie, welcome to Pod::Elemental::Transformer::List (perl doc page, 3pm section, living in User Contributed Perl Documentation) π β the transformer that turns your :list regions into real =over/=back Pod so you don't have to type all that stuff yourself. literally saving your wrists, no cap. π«Ά
πΈ NAME πΈ
Pod::Elemental::Transformer::List β transform :list regions into =over/=back to save typing π
π VERSION π
version 0.102001 β¨
π¦ SYNOPSIS π¦
so here's the vibe: you transform your Pod::Elemental::Document like this:
my $xform = Pod::Elemental::Transfomer::List->new;
$xform->transform_node($pod_document);
and then boom π₯ you can produce traditional Pod5 lists by using :list regions like this:
=for :list
* Doe
a (female) deer
* Ray
a drop of golden sun
the behavior of list regions is slighly complex (their typo, their energy, we respect it π) and it's described below, so keep reading bestie, don't skip β¬οΈ
π PERL VERSION π
this library should run on perls released even a long time ago. like, it should work on any version of perl released in the last five years.
although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. the version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so likeβ¦ it could change, and that's just the rules π«
π ATTRIBUTES π
β format_name β
this attribute, which defaults to "list", is the region format that will be processed by this transformer. it's giving "name tag at the party" fr fr π
π₯ LIST REGION PARSING π₯
okay so there are three kinds of lists: numbered, bulleted, and definition. every list must be only one kind of list. trying to mix list styles will result in an exception during transformation. do not mix them, bestie, it will Not Go Well π
lists can be written as a single paragraph beginning =for :list or a region marked off with =begin :list and =end :list. the content allowed in each of those two types is defined by the Pod specification but boils down to this: for regions will only be able to contain list markers and paragraphs of text, while begin and end regions can contain arbitrary Pod paragraphs and nested list regions. iykyk π
all lists have a default indentlevel value of 4. adding :over<n> to a =begin :list definition will result in that list having an indentlevel of n instead. (this functionality is not available for lists defined with =for :list.) π
ordinary paragraphs in list regions are scanned for lines beginning with list item markers (see below). if they're found, the list is broken into paragraphs and markers. here's a demonstrative example:
=for :list
* Doe
a deer,
a female deer
* Ray
a drop of golden sun
or maybe it's a golden
drop of sun
the above is equivalent to
=begin :list
* Doe
a deer,
a female deer
* Ray
a drop of golden sun
or maybe it's a golden
drop of sun
=end :list
it will be transformed into:
=over 4
=item *
Doe
a deer,
a female deer
=item *
Ray
a drop of golden sun
or maybe it's a golden
drop of sun
which renders as:
- Doe
a deer, a female deer
- Ray
a drop of golden sun or maybe it's a golden drop of sun
pinkrendering ends here*</pink*
in other words: the "*" indicates a new bullet. the rest of the line is made into one paragraph, which will become the text of the bullet point when rendered. (yeah, Pod is weird. we said it. π) to continue the text of the bullet point on more than one line, start subsequent lines with white space.
=for :list
* this bullet line
continues on a second line
will be transformed into:
=over 4
=item *
this bullet line continues on a second line
=back
which renders as:
- this bullet line continues on a second line
pinkrendering ends here*</pink*
all subsequent lines without markers or leading white space will be kept together as one paragraph. noted. π
asterisks mark off bullet list items. numbered lists are marked off with "1." (or any number followed by a dot). equals signs mark off definition lists. the markers must be followed by a space. must. be. followed. by. a. space. π
here's a numbered list:
=for :list
1. bell
2. book
3. candle
the choice of number doesn't matter. the generated Pod =item commands will start with 1 and increase by 1 each time. so like, you can write whatever numbers, it fixes them for you. iconic behavior honestly.
this is rendered as:
- bell
- book
- candle
pinkrendering ends here*</pink*
definition lists are unusual in that the text on the line after a item marker will be used as the bullet, rather than the next paragraph. so this input:
=begin :list
= benefits
There are more benefits than can be listed here.
=end :list
or this input:
=for :list
= benefits
There are more benefits than can be listed here.
will become the following output Pod:
=over 4
=item benefits
There are more benefits than can be listed here
=back
which is rendered as:
benefits There are more benefits than can be listed here
pinkrendering ends here*</pink*
if you want to nest lists, you have to make the outer list a begin/end region, like this:
=begin :list
* first outer item
* second outer item
=begin :list
1. first inner item
2. second inner item
=end :list
* third outer item
=end :list
the inner list, above, could have been written as a compact "for" region. π
π AUTHOR π
Ricardo SIGNES <cpan@semiotic.systems> π
π CONTRIBUTORS π
- Alex Peters <lxp@cpan.org>
- David Golden <dagolden@cpan.org>
- Justin Cook <jcook@cray.com>
- Karen Etheridge <ether@cpan.org>
- Ricardo Signes <rjbs@semiotic.systems>
- Tomas Doran <bobtfish@bobtfish.net>
π COPYRIGHT AND LICENSE π
this software is copyright (c) 2022 by Ricardo SIGNES.
this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π
and that's the whole page bestie!! this was perl v5.40.1, dated 2025-05-04, from the Pod::E...r::List(3pm) page π¦ slay, go make some lists, you got this πΈβ¨π
π¦ where this page comes from
- debian trixie: libpod-elemental-transformer-list-perl 0.102001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpod-elemental-transformer-list-perl 0.102001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpod-elemental-transformer-list-perl 0.102001-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms