| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Pod::Weaver::Plugin::H1Nester 4.018; |
|
2
|
|
|
|
|
|
|
# ABSTRACT: structure the input pod document into head1-grouped sections |
|
3
|
|
|
|
|
|
|
|
|
4
|
9
|
|
|
9
|
|
63
|
use Moose; |
|
|
9
|
|
|
|
|
19
|
|
|
|
9
|
|
|
|
|
84
|
|
|
5
|
|
|
|
|
|
|
with 'Pod::Weaver::Role::Transformer'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# BEGIN BOILERPLATE |
|
8
|
9
|
|
|
9
|
|
64459
|
use v5.20.0; |
|
|
9
|
|
|
|
|
31
|
|
|
9
|
9
|
|
|
9
|
|
54
|
use warnings; |
|
|
9
|
|
|
|
|
20
|
|
|
|
9
|
|
|
|
|
301
|
|
|
10
|
9
|
|
|
9
|
|
48
|
use utf8; |
|
|
9
|
|
|
|
|
21
|
|
|
|
9
|
|
|
|
|
63
|
|
|
11
|
9
|
|
|
9
|
|
328
|
no feature 'switch'; |
|
|
9
|
|
|
|
|
28
|
|
|
|
9
|
|
|
|
|
786
|
|
|
12
|
9
|
|
|
9
|
|
58
|
use experimental qw(postderef postderef_qq); # This experiment gets mainlined. |
|
|
9
|
|
|
|
|
27
|
|
|
|
9
|
|
|
|
|
53
|
|
|
13
|
|
|
|
|
|
|
# END BOILERPLATE |
|
14
|
|
|
|
|
|
|
|
|
15
|
9
|
|
|
9
|
|
855
|
use namespace::autoclean; |
|
|
9
|
|
|
|
|
28
|
|
|
|
9
|
|
|
|
|
85
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
9
|
|
|
9
|
|
779
|
use Pod::Elemental::Selectors -all; |
|
|
9
|
|
|
|
|
20
|
|
|
|
9
|
|
|
|
|
107
|
|
|
18
|
9
|
|
|
9
|
|
8827
|
use Pod::Elemental::Transformer::Nester; |
|
|
9
|
|
|
|
|
687158
|
|
|
|
9
|
|
|
|
|
1604
|
|
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
#pod =head1 OVERVIEW |
|
21
|
|
|
|
|
|
|
#pod |
|
22
|
|
|
|
|
|
|
#pod This plugin is very, very simple: it uses the |
|
23
|
|
|
|
|
|
|
#pod L<Pod::Elemental::Transformer::Nester> to restructure the document under its |
|
24
|
|
|
|
|
|
|
#pod C<=head1> elements. |
|
25
|
|
|
|
|
|
|
#pod |
|
26
|
|
|
|
|
|
|
#pod =cut |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub transform_document { |
|
29
|
29
|
|
|
29
|
0
|
118
|
my ($self, $document) = @_; |
|
30
|
|
|
|
|
|
|
|
|
31
|
29
|
|
|
|
|
163
|
my $nester = Pod::Elemental::Transformer::Nester->new({ |
|
32
|
|
|
|
|
|
|
top_selector => s_command([ qw(head1) ]), |
|
33
|
|
|
|
|
|
|
content_selectors => [ |
|
34
|
|
|
|
|
|
|
s_flat, |
|
35
|
|
|
|
|
|
|
s_command( [ qw(head2 head3 head4 over item back) ]), |
|
36
|
|
|
|
|
|
|
], |
|
37
|
|
|
|
|
|
|
}); |
|
38
|
|
|
|
|
|
|
|
|
39
|
29
|
|
|
|
|
4636
|
$nester->transform_node($document); |
|
40
|
|
|
|
|
|
|
|
|
41
|
29
|
|
|
|
|
139393
|
return; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
|
45
|
|
|
|
|
|
|
1; |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding UTF-8 |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Pod::Weaver::Plugin::H1Nester - structure the input pod document into head1-grouped sections |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
version 4.018 |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 OVERVIEW |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This plugin is very, very simple: it uses the |
|
64
|
|
|
|
|
|
|
L<Pod::Elemental::Transformer::Nester> to restructure the document under its |
|
65
|
|
|
|
|
|
|
C<=head1> elements. |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 PERL VERSION SUPPORT |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This module has the same support period as perl itself: it supports the two |
|
70
|
|
|
|
|
|
|
most recent versions of perl. (That is, if the most recently released version |
|
71
|
|
|
|
|
|
|
is v5.40, then this module should work on both v5.40 and v5.38.) |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Although it may work on older versions of perl, no guarantee is made that the |
|
74
|
|
|
|
|
|
|
minimum required version will not be increased. The version may be increased |
|
75
|
|
|
|
|
|
|
for any reason, and there is no promise that patches will be accepted to lower |
|
76
|
|
|
|
|
|
|
the minimum required perl. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Ricardo SIGNES <rjbs@semiotic.systems> |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This software is copyright (c) 2021 by Ricardo SIGNES. |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
87
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |