package Local::MyPlugin; use base qw(Template::Plugin); use strict; use warnings FATAL => 'all'; sub new { my($self, $context) = @_; $context->define_filter( 'make_red', \&make_red, 0 ); return $self; } sub make_red { my $input = shift; return '' . $input . ''; } 1;