blib/lib/Template/Plugin/TextToHtml.pm

filter: Statementstmt 62.0% 18 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 55.5% 5 / 9 Podpod 33.3% 1 / 3 totaltotal 58.5% 24 / 41 CC 1 SCAR 3.7
CC
1
Cov
62%
new
2.0
tt_text2html
2.0
text2html_filter_factory
2.0
CRAP 1.4
↑ Summary
1 package Template::Plugin::TextToHtml;
2  
3 1 require 5.004;
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use vars qw( @ISA $VERSION );
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use base qw( Template::Plugin );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Template::Plugin;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use HTML::FromText;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 $VERSION = '0.02';
12  
13 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
14 0 my ($class, $context, $format) = @_;;
15 0 $context->define_filter('text2html', [ \&text2html_filter_factory => 1 ]);
16 0 return \&tt_wrap;
17 }
18  
19 0 ▶sub tt_text2html {
Subroutine tt_text2html: not called CC=1 SCAR=6.9
Pod undocumented
20 0 my $text = shift;
21 0 my $args = shift;
22 0 text2html($text, %{$args});
23 }
24  
25 0 ▶sub text2html_filter_factory {
Subroutine text2html_filter_factory: not called CC=1 SCAR=6.9
Pod undocumented
26 0 my ($context, $args) = @_;
27 0 ▶ return sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
28 0 my $text = shift;
29 0 tt_text2html($text, $args);
30 }
31 0 }
32  
33  
34 1 1;
35  
36 __END__
↑ Summary