line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyrights 2003-2015 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.01. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package OODoc::Parser; |
7
|
1
|
|
|
1
|
|
6
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
8
|
|
|
|
|
|
|
$VERSION = '2.01'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
4
|
use base 'OODoc::Object'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
67
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
13
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
|
5
|
use Log::Report 'oodoc'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
16
|
1
|
|
|
1
|
|
250
|
use List::Util 'first'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
408
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#------------------------------------------- |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub init($) |
23
|
0
|
|
|
0
|
0
|
|
{ my ($self, $args) = @_; |
24
|
0
|
0
|
|
|
|
|
$self->SUPER::init($args) or return; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
0
|
|
|
|
my $skip = delete $args->{skip_links} || []; |
27
|
0
|
0
|
|
|
|
|
my @skip = map { ref $_ eq 'Regexp' ? $_ : qr/^\Q$_\E(?:\:\:|$)/ } |
|
0
|
0
|
|
|
|
|
|
28
|
|
|
|
|
|
|
ref $skip eq 'ARRAY' ? @$skip : $skip; |
29
|
0
|
|
|
|
|
|
$self->{skip_links} = \@skip; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
$self; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
#------------------------------------------- |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
0
|
1
|
|
sub parse(@) {panic} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#------------------------------------------- |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub skipManualLink($) |
43
|
0
|
|
|
0
|
1
|
|
{ my ($self, $package) = @_; |
44
|
0
|
0
|
|
0
|
|
|
(first { $package =~ $_ } @{$self->{skip_links}}) ? 1 : 0; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub cleanup($$$) |
49
|
0
|
|
|
0
|
1
|
|
{ my ($self, $formatter, $manual, $string) = @_; |
50
|
|
|
|
|
|
|
|
51
|
0
|
0
|
|
|
|
|
return $self->cleanupPod($formatter, $manual, $string) |
52
|
|
|
|
|
|
|
if $formatter->isa('OODoc::Format::Pod'); |
53
|
|
|
|
|
|
|
|
54
|
0
|
0
|
0
|
|
|
|
return $self->cleanupHtml($formatter, $manual, $string) |
55
|
|
|
|
|
|
|
if $formatter->isa('OODoc::Format::Html') |
56
|
|
|
|
|
|
|
|| $formatter->isa('OODoc::Format::Html2'); |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
error __x"the formatter type {type} is not known for cleanup" |
59
|
|
|
|
|
|
|
, type => ref $formatter; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
$string; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
66
|
|
|
|
|
|
|
|