| 1 | package Template::Plugin::FillInForm; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 2 | ▶ | use vars qw($VERSION); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 2 | $VERSION = 0.04; | |||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 2 | require Template::Plugin; | |||||||||||||||||||
| 8 | 2 | ▶ | use base qw(Template::Plugin); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 2 | ▶ | use vars qw($FILTER_NAME); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | 2 | $FILTER_NAME = 'fillinform'; | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 2 | ▶ | use HTML::FillInForm; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 2 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.4
Pod
documented
| |||||||||||||||||||||
| 16 | 2 | my($class, $context, @args) = @_; | |||||||||||||||||||
| 17 | 2 | ▶ | my $name = $args[0] || $FILTER_NAME; | ||||||||||||||||||
|
Condition33%1/3
$args[0] || $Template::Plugin::FillInForm::FILTER_NAME
MC/DC0%0/2
$args[0] || $Template::Plugin::FillInForm::FILTER_NAME
$args[0]
$Template::Plugin::FillInForm::FILTER_NAME
Truth table33%1/3
A || B
A= $args[0]B= $Template::Plugin::FillInForm::FILTER_NAME
| |||||||||||||||||||||
| 18 | 2 | $context->define_filter($name, $class->filter_factory()); | |||||||||||||||||||
| 19 | 2 | bless {}, $class; | |||||||||||||||||||
| 20 | } | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 2 | ▶ | sub filter_factory { | ||||||||||||||||||
|
Subroutine
filter_factory: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 23 | 2 | my $class = shift; | |||||||||||||||||||
| 24 | 2 | ▶ | my $sub = sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||||||||||||
| 25 | 2 | my($context, @args) = @_; | |||||||||||||||||||
| 26 | 2 | ▶ | my $config = ref $args[-1] eq 'HASH' ? pop(@args) : { }; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 27 | 2 | ▶ | return sub { | ||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 28 | 2 | my $text = shift; | |||||||||||||||||||
| 29 | 2 | my $fif = HTML::FillInForm->new; | |||||||||||||||||||
| 30 | 2 | return $fif->fill(scalarref => \$text, %$config); | |||||||||||||||||||
| 31 | 2 | }; | |||||||||||||||||||
| 32 | 2 | }; | |||||||||||||||||||
| 33 | 2 | return [ $sub, 1 ]; | |||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | 2 | 1; | |||||||||||||||||||
| 37 | __END__ | ||||||||||||||||||||