blib/lib/Template/Plugin/Emoticon.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 2 totaltotal 94.5% 35 / 37 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package Template::Plugin::Emoticon;
2  
3 2 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use parent qw( Template::Plugin::Filter );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use Text::Emoticon;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = '0.01';
10  
11 2 ▶use constant FILTER_NAME => 'emoticon';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 2 ▶sub init {
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
14 2 my ($self) = @_;
15 2 my $driver = $self->{_ARGS}[0];
16 2 my $args = $self->{_CONFIG};
17  
18 2 $self->{_emoticon} = Text::Emoticon->new($driver, $args);
19 2 $self->install_filter(FILTER_NAME);
20  
21 2 return $self;
22 }
23  
24 3 ▶sub filter {
Subroutine filter: called CC=1 SCAR=0.0
Pod undocumented
25 3 my ($self, $text) = @_;
26  
27 3 return $self->{_emoticon}->filter($text);
28 }
29  
30 2 1;
31  
32 __END__
↑ Summary