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