NAME

Template::Flute::Filter::Replace - Substitutes literal text in a string.

SYNOPSIS

$replace_filter = Template::Flute::Filter::Replace->new(options => {
                      from => 'foo',
                      to => 'bar',
                  });

$barbar = $replace->filter('foobar');

DESCRIPTION

The replace filter locates a substring within a string and substitutes each occurrence with another string.

METHODS

init

Initializes object with replace options.

filter

Carries out the actual substitution and returns the filtered value.

AUTHOR

Stefan Hornburg (Racke), <racke@linuxia.de>

LICENSE AND COPYRIGHT

Copyright 2012-2021 Stefan Hornburg (Racke) <racke@linuxia.de>.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.