line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2003-2021 by [Mark Overmeer]. |
2
|
|
|
|
|
|
|
# For other contributors see ChangeLog. |
3
|
|
|
|
|
|
|
# See the manual pages for details on the licensing terms. |
4
|
|
|
|
|
|
|
# Pod stripped from pm file by OODoc 2.02. |
5
|
|
|
|
|
|
|
# This code is part of perl distribution OODoc. It is licensed under the |
6
|
|
|
|
|
|
|
# same terms as Perl itself: https://spdx.org/licenses/Artistic-2.0.html |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package OODoc::Parser; |
9
|
1
|
|
|
1
|
|
8
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
10
|
|
|
|
|
|
|
$VERSION = '2.02'; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use base 'OODoc::Object'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
111
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
15
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
6
|
use Log::Report 'oodoc'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
18
|
1
|
|
|
1
|
|
255
|
use List::Util 'first'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
468
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub init($) |
25
|
0
|
|
|
0
|
0
|
|
{ my ($self, $args) = @_; |
26
|
0
|
0
|
|
|
|
|
$self->SUPER::init($args) or return; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
0
|
|
|
|
my $skip = delete $args->{skip_links} || []; |
29
|
0
|
0
|
|
|
|
|
my @skip = map { ref $_ eq 'Regexp' ? $_ : qr/^\Q$_\E(?:\:\:|$)/ } |
|
0
|
0
|
|
|
|
|
|
30
|
|
|
|
|
|
|
ref $skip eq 'ARRAY' ? @$skip : $skip; |
31
|
0
|
|
|
|
|
|
$self->{skip_links} = \@skip; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
$self; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#------------------------------------------- |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
1
|
|
sub parse(@) {panic} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
#------------------------------------------- |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub skipManualLink($) |
45
|
0
|
|
|
0
|
1
|
|
{ my ($self, $package) = @_; |
46
|
0
|
0
|
|
0
|
|
|
(first { $package =~ $_ } @{$self->{skip_links}}) ? 1 : 0; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub cleanup($$$) |
51
|
0
|
|
|
0
|
1
|
|
{ my ($self, $formatter, $manual, $string) = @_; |
52
|
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
return $self->cleanupPod($formatter, $manual, $string) |
54
|
|
|
|
|
|
|
if $formatter->isa('OODoc::Format::Pod'); |
55
|
|
|
|
|
|
|
|
56
|
0
|
0
|
0
|
|
|
|
return $self->cleanupHtml($formatter, $manual, $string) |
57
|
|
|
|
|
|
|
if $formatter->isa('OODoc::Format::Html') |
58
|
|
|
|
|
|
|
|| $formatter->isa('OODoc::Format::Html2'); |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
error __x"the formatter type {type} is not known for cleanup" |
61
|
|
|
|
|
|
|
, type => ref $formatter; |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
$string; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
|