line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Emoticon; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
104495
|
use 5.006; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
89
|
|
4
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
133
|
|
5
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
73
|
|
6
|
2
|
|
|
2
|
|
1558
|
use parent qw( Template::Plugin::Filter ); |
|
2
|
|
|
|
|
565
|
|
|
2
|
|
|
|
|
11
|
|
7
|
2
|
|
|
2
|
|
14355
|
use Text::Emoticon; |
|
2
|
|
|
|
|
6061
|
|
|
2
|
|
|
|
|
21
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
91
|
use constant FILTER_NAME => 'emoticon'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
421
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init { |
14
|
2
|
|
|
2
|
0
|
2932
|
my ($self) = @_; |
15
|
2
|
|
|
|
|
15
|
my $driver = $self->{_ARGS}[0]; |
16
|
2
|
|
|
|
|
5
|
my $args = $self->{_CONFIG}; |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
11
|
$self->{_emoticon} = Text::Emoticon->new($driver, $args); |
19
|
2
|
|
|
|
|
1793
|
$self->install_filter(FILTER_NAME); |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
80
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub filter { |
25
|
3
|
|
|
3
|
0
|
4938
|
my ($self, $text) = @_; |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
19
|
return $self->{_emoticon}->filter($text); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |