line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Markup::Pod; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
40054
|
use 5.8.1; |
|
2
|
|
|
|
|
7
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
61
|
|
5
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
94
|
|
6
|
2
|
|
|
2
|
|
595
|
use Pod::Simple::XHTML 3.15; |
|
2
|
|
|
|
|
36560
|
|
|
2
|
|
|
|
|
508
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# Disable the use of HTML::Entities. |
9
|
|
|
|
|
|
|
$Pod::Simple::XHTML::HAS_HTML_ENTITIES = 0; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '0.30'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub parser { |
14
|
4
|
|
|
4
|
0
|
12
|
my ($file, $encoding, $opts) = @_; |
15
|
4
|
|
|
|
|
22
|
my $p = Pod::Simple::XHTML->new; |
16
|
|
|
|
|
|
|
# Output everything as UTF-8. |
17
|
4
|
|
|
|
|
419
|
$p->html_header_tags(''); |
18
|
4
|
|
|
3
|
|
41
|
$p->strip_verbatim_indent(sub { (sort map { /^(\s+)/ } @{$_[0]})[0] }); |
|
3
|
|
|
|
|
13142
|
|
|
15
|
|
|
|
|
51
|
|
|
3
|
|
|
|
|
8
|
|
19
|
4
|
|
|
|
|
34
|
$p->output_string(\my $html); |
20
|
|
|
|
|
|
|
# Want user supplied options to override even these default behaviors, |
21
|
|
|
|
|
|
|
# if necessary |
22
|
4
|
100
|
|
|
|
2471
|
my $opt = $opts ? { @$opts } : {}; |
23
|
4
|
|
|
|
|
48
|
foreach my $method ( keys %$opt ) { |
24
|
3
|
|
|
|
|
9
|
my $v = $opt->{$method}; |
25
|
3
|
|
|
|
|
9
|
$p->$method($v); |
26
|
|
|
|
|
|
|
} |
27
|
4
|
|
|
|
|
35
|
$p->parse_file($file); |
28
|
4
|
100
|
|
|
|
1927
|
return unless $p->content_seen; |
29
|
3
|
|
|
|
|
64
|
utf8::encode($html); |
30
|
3
|
|
|
|
|
105
|
return $html; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |