line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Md2Inao::Director; |
2
|
29
|
|
|
29
|
|
192
|
use strict; |
|
29
|
|
|
|
|
64
|
|
|
29
|
|
|
|
|
1263
|
|
3
|
29
|
|
|
29
|
|
159
|
use warnings; |
|
29
|
|
|
|
|
56
|
|
|
29
|
|
|
|
|
7088
|
|
4
|
|
|
|
|
|
|
|
5
|
29
|
|
|
29
|
|
183
|
use Carp; |
|
29
|
|
|
|
|
64
|
|
|
29
|
|
|
|
|
2380
|
|
6
|
29
|
|
|
29
|
|
220
|
use Class::Accessor::Fast qw/antlers/; |
|
29
|
|
|
|
|
66
|
|
|
29
|
|
|
|
|
314
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has builder => ( is => 'rw', isa => 'Text::Md2Inao::Builder' ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
202
|
|
|
202
|
1
|
385
|
my ($class, $builder) = @_; |
12
|
202
|
|
|
|
|
1352
|
return $class->SUPER::new({ builder => $builder }); |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub process { |
16
|
943
|
|
|
943
|
0
|
5395
|
my ($self, $c, $h) = @_; |
17
|
943
|
100
|
|
|
|
2881
|
my $select = ref $h eq '' ? 'text' : $h->tag; |
18
|
943
|
50
|
|
|
|
4814
|
my $proc = $self->builder->dispatch($select) or croak("Missing case: $select"); |
19
|
943
|
|
|
|
|
19565
|
$proc->($c, $h); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub process_before_filter { |
23
|
202
|
|
|
202
|
0
|
1317
|
my ($self, $c, $in) = @_; |
24
|
202
|
|
|
|
|
757
|
return $self->builder->before_filter($c, $in); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub process_after_filter { |
28
|
202
|
|
|
202
|
0
|
1783
|
my ($self, $c, $out) = @_; |
29
|
202
|
|
|
|
|
630
|
return $self->builder->after_filter($c, $out); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|