1Pod::Elemental::TransfoUrsmeerr:C:oGnattrhiebruetre(d3P)Poedr:l:EDloecmuemnetnatla:t:iTornansformer::Gatherer(3)
2
3
4

NAME

6       Pod::Elemental::Transformer::Gatherer - gather related paragraphs under
7       a shared header
8

VERSION

10       version 0.103005
11

OVERVIEW

13       Like the Nester transformer, this Gatherer produces structure and
14       containment in a Pod document.  Unlike that Nester, it does not find
15       top-level elements, but instead produces them.
16
17       It looks for all elements matching the "gather_selector".  They are
18       removed from the node.  In the place of the first found element, the
19       "container" node is placed into the transformed node, and all the
20       gathered elements are made children of the container.
21
22       So, given this document:
23
24         Document
25           =head1 Foo
26           =over 4
27           =item * xyzzy
28           =item * abcdef
29           =back
30           =head1 Bar
31           =over 4
32           =item * 1234
33           =item * 8765
34           =back
35
36       ...and this nester...
37
38         my $gatherer = Pod::Elemental::Transformer::Gatherer->new({
39           gather_selector => s_command( [ qw(over item back) ] ),
40           container       => Pod::Elemental::Element::Pod5::Command->new({
41             command => 'head1',
42             content => "LISTS\n",
43           }),
44         });
45
46       Then this:
47
48         $nester->transform_node($document);
49
50       Will result in this document:
51
52         Document
53           =head1 Foo
54           =head1 LISTS
55             =over 4
56             =item * xyzzy
57             =item * abcdef
58             =back
59             =over 4
60             =item * 1234
61             =item * 8765
62             =back
63           =head1 Bar
64

ATTRIBUTES

66   gather_selector
67       This is a coderef (a predicate) used to find the paragraphs to gather
68       up.
69
70   container
71       This is a Pod::Elemental::Node that will be inserted into the node,
72       containing all gathered elements.
73

AUTHOR

75       Ricardo SIGNES <rjbs@cpan.org>
76
78       This software is copyright (c) 2020 by Ricardo SIGNES.
79
80       This is free software; you can redistribute it and/or modify it under
81       the same terms as the Perl 5 programming language system itself.
82
83
84
85perl v5.30.1                      2020-P0o1d-:3:0Elemental::Transformer::Gatherer(3)
Impressum