line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Markup::Creole; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
11029
|
use 5.8.1; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
12
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
5
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
36
|
|
6
|
1
|
|
|
1
|
|
6
|
use File::BOM qw(open_bom); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
7
|
1
|
|
|
1
|
|
5
|
use Text::WikiCreole; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
244
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.25'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub parser { |
12
|
2
|
|
|
2
|
0
|
8
|
my ($file, $encoding, $opts) = @_; |
13
|
2
|
|
|
|
|
50
|
open_bom my $fh, $file, ":encoding($encoding)"; |
14
|
2
|
|
|
|
|
555
|
local $/; |
15
|
2
|
|
|
|
|
63
|
my $html = creole_parse(<$fh>); |
16
|
2
|
100
|
|
|
|
12466
|
return unless $html =~ /\S/; |
17
|
1
|
|
|
|
|
17
|
utf8::encode($html); |
18
|
1
|
50
|
|
|
|
9
|
return $html if $opts->{raw}; |
19
|
1
|
|
|
|
|
32
|
return qq{ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$html |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |