line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Markup::Trac; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
40752
|
use 5.8.1; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
6
|
1
|
|
|
1
|
|
6
|
use File::BOM qw(open_bom); |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
75
|
|
7
|
1
|
|
|
1
|
|
6
|
use Text::Trac 0.10; |
|
1
|
|
|
|
|
15
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.31'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub parser { |
12
|
2
|
|
|
2
|
0
|
5
|
my ($file, $encoding, $opts) = @_; |
13
|
2
|
|
|
|
|
4
|
my %params = @{ $opts }; |
|
2
|
|
|
|
|
5
|
|
14
|
2
|
|
|
|
|
10
|
my $trac = Text::Trac->new(%params); |
15
|
2
|
|
|
|
|
32
|
open_bom my $fh, $file, ":encoding($encoding)"; |
16
|
2
|
|
|
|
|
585
|
local $/; |
17
|
2
|
|
|
|
|
66
|
my $html = $trac->parse(<$fh>); |
18
|
2
|
100
|
|
|
|
73595
|
return unless $html =~ /\S/; |
19
|
1
|
|
|
|
|
4
|
utf8::encode($html); |
20
|
1
|
50
|
|
|
|
5
|
return $html if $params{raw}; |
21
|
1
|
|
|
|
|
38
|
return qq{ |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$html |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
__END__ |