line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::Abstract::Filter::number_sections; |
2
|
1
|
|
|
1
|
|
1053
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use base qw( Pod::Abstract::Filter ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
76
|
|
6
|
1
|
|
|
1
|
|
6
|
use Pod::Abstract::BuildNode qw(node); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
450
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.20'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Pod::Abstract::Filter::number_sections - paf command for basic multipart |
13
|
|
|
|
|
|
|
section numbering. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=cut |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub filter { |
18
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
19
|
0
|
|
|
|
|
|
my $pa = shift; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $h1 = 0; |
22
|
0
|
|
|
|
|
|
my @h1 = $pa->select('/head1'); |
23
|
0
|
|
|
|
|
|
foreach my $hn1 (@h1) { |
24
|
0
|
|
|
|
|
|
$h1 ++; |
25
|
0
|
|
|
|
|
|
$hn1->param('heading')->unshift(node->text("$h1. ")); |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
my @h2 = $hn1->select('/head2'); |
28
|
0
|
|
|
|
|
|
my $h2 = 0; |
29
|
0
|
|
|
|
|
|
foreach my $hn2 (@h2) { |
30
|
0
|
|
|
|
|
|
$h2 ++; |
31
|
0
|
|
|
|
|
|
$hn2->param('heading')->unshift(node->text("$h1.$h2 ")); |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
my @h3 = $hn2->select('/head3'); |
34
|
0
|
|
|
|
|
|
my $h3 = 0; |
35
|
0
|
|
|
|
|
|
foreach my $hn3 (@h3) { |
36
|
0
|
|
|
|
|
|
$h3 ++; |
37
|
0
|
|
|
|
|
|
$hn3->param('heading')->unshift(node->text("$h1.$h2.$h3 ")); |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my @h4 = $hn3->select('/head4'); |
40
|
0
|
|
|
|
|
|
my $h4 = 0; |
41
|
0
|
|
|
|
|
|
foreach my $hn4 (@h4) { |
42
|
0
|
|
|
|
|
|
$h4 ++; |
43
|
0
|
|
|
|
|
|
$hn4->param('heading')-> |
44
|
|
|
|
|
|
|
unshift(node->text("$h1.$h2.$h3.$h4 ")); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
return $pa; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 AUTHOR |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Ben Lilburne |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Copyright (C) 2009 Ben Lilburne |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify |
62
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |