line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::Headings; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
64
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
20
|
use v5.20; |
|
2
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
1116
|
use Pod::Simple; |
|
2
|
|
|
|
|
52988
|
|
|
2
|
|
|
|
|
111
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Pod::Simple); |
10
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
16
|
use feature 'signatures'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
224
|
|
13
|
2
|
|
|
2
|
|
12
|
no warnings 'experimental::signatures'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
1040
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
# Can pass a list of handlers to new() |
17
|
|
|
|
|
|
|
# |
18
|
2
|
|
|
2
|
1
|
3
|
sub new ($class, @args) { |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
2
|
|
19
|
2
|
|
|
|
|
12
|
my $self = $class->SUPER::new(); |
20
|
2
|
|
|
|
|
59
|
$self->{handlers} = {@args}; # if scalar @args; |
21
|
2
|
|
|
|
|
3
|
$self->{_elements} = []; |
22
|
2
|
|
|
|
|
4
|
$self->{_sequence} = 0; |
23
|
2
|
|
|
|
|
10
|
return $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
62
|
|
|
62
|
|
16860
|
sub _handle_element_start ($parser, $element_name, $attr_hash_r) { |
|
62
|
|
|
|
|
67
|
|
|
62
|
|
|
|
|
62
|
|
|
62
|
|
|
|
|
50
|
|
|
62
|
|
|
|
|
50
|
|
27
|
|
|
|
|
|
|
|
28
|
62
|
100
|
|
|
|
114
|
return unless defined $parser->{handlers}{$element_name}; |
29
|
52
|
|
|
|
|
185
|
push @{$parser->{_elements}}, { element => $element_name, |
30
|
|
|
|
|
|
|
text => '', |
31
|
|
|
|
|
|
|
attrs=> $attr_hash_r, |
32
|
52
|
|
|
|
|
46
|
sequence => $parser->{_sequence}++, |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
62
|
|
|
62
|
|
308
|
sub _handle_element_end ($parser, $element_name, $attr_hash_r = undef) { |
|
62
|
|
|
|
|
56
|
|
|
62
|
|
|
|
|
54
|
|
|
62
|
|
|
|
|
65
|
|
|
62
|
|
|
|
|
48
|
|
37
|
|
|
|
|
|
|
|
38
|
62
|
100
|
66
|
|
|
55
|
return unless scalar @{$parser->{_elements}} && ($element_name eq ${$parser->{_elements}}[-1]->{element}); |
|
62
|
|
|
|
|
119
|
|
|
52
|
|
|
|
|
122
|
|
39
|
|
|
|
|
|
|
|
40
|
52
|
|
|
|
|
53
|
my $propagate_text = 0; |
41
|
52
|
|
|
|
|
43
|
my $this_element = pop @{$parser->{_elements}}; |
|
52
|
|
|
|
|
56
|
|
42
|
52
|
100
|
|
|
|
85
|
if (ref $parser->{handlers}{$element_name} eq 'CODE') { |
43
|
44
|
|
|
|
|
87
|
$propagate_text = $parser->{handlers}{$element_name}->($parser, $element_name, $this_element, $this_element->{text}); |
44
|
|
|
|
|
|
|
} else { |
45
|
8
|
|
|
|
|
9
|
$propagate_text = $parser->{handlers}{$element_name}; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
52
|
50
|
|
|
|
77
|
if ($propagate_text) { |
49
|
52
|
100
|
|
|
|
37
|
if (scalar @{$parser->{_elements}}) { |
|
52
|
|
|
|
|
116
|
|
50
|
8
|
|
|
|
|
6
|
${$parser->{_elements}}[-1]->{text} .= $this_element->{text}; |
|
8
|
|
|
|
|
23
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
63
|
|
|
63
|
|
421
|
sub _handle_text ($parser, $text) { |
|
63
|
|
|
|
|
55
|
|
|
63
|
|
|
|
|
67
|
|
|
63
|
|
|
|
|
45
|
|
57
|
|
|
|
|
|
|
|
58
|
63
|
100
|
|
|
|
53
|
${$parser->{_elements}}[-1]->{text} .= $text if scalar @{$parser->{_elements}}; |
|
56
|
|
|
|
|
116
|
|
|
63
|
|
|
|
|
104
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
__END__ |