| 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__ | ||