line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package PPI::Transform::Doxygen::POD; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
36
|
use 5.010001; |
|
2
|
|
|
|
|
4
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
33
|
|
5
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
48
|
|
6
|
2
|
|
|
2
|
|
17
|
use parent qw(Pod::POM::View::HTML); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.1'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $PREFIX = ''; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub view_pod { |
13
|
18
|
|
|
18
|
1
|
314
|
my ($self, $pod) = @_; |
14
|
18
|
|
|
|
|
61
|
return $pod->content->present($self); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub view_head1 { |
18
|
3
|
|
|
3
|
1
|
10034
|
my ($self, $head1) = @_; |
19
|
3
|
|
|
|
|
21
|
my $title = $head1->title->present($self); |
20
|
3
|
|
|
|
|
382
|
my $name = $title; |
21
|
3
|
|
|
|
|
9
|
$name =~ s/\s/_/g; |
22
|
3
|
|
|
|
|
22
|
return "\n\@section ${PREFIX}_$name $title\n" . $head1->content->present($self); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub view_head2 { |
26
|
1
|
|
|
1
|
1
|
27
|
my ($self, $head2) = @_; |
27
|
1
|
|
|
|
|
4
|
my $title = $head2->title->present($self); |
28
|
1
|
|
|
|
|
36
|
my $name = $title; |
29
|
1
|
|
|
|
|
5
|
$name =~ s/\s/_/g; |
30
|
1
|
|
|
|
|
5
|
return "\n\@subsection $name $title\n" . $head2->content->present($self); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub view_seq_code { |
34
|
1
|
|
|
1
|
1
|
69
|
my ($self, $text) = @_; |
35
|
1
|
|
|
|
|
4
|
_unquote($text); |
36
|
1
|
|
|
|
|
5
|
return "\n\@code\n$text\n\@endcode\n"; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub view_verbatim { |
40
|
1
|
|
|
1
|
1
|
21
|
my ($self, $text) = @_; |
41
|
1
|
|
|
|
|
3
|
_unquote($text); |
42
|
1
|
|
|
|
|
6
|
return "\n\@code\n$text\n\@endcode\n"; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my %HTML = ( '&' => '&', '<' => '<', '>' => '>'); |
46
|
|
|
|
|
|
|
sub _unquote { |
47
|
2
|
|
|
2
|
|
40
|
$_[0] =~ s!\Q$_!$HTML{$_}!g for keys %HTML; |
48
|
2
|
|
|
|
|
5
|
$_[0] =~ s!\\(\@|\\|\%|#)!$1!g; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |