| Vote documentation | Contained in the Vote distribution. |
Vote::Template::Plugin::Mail - Template Filter for email
This filter replace '.' by 'dot' and '@' by 'at' to make email harder to find by spam bot.
Olivier Thauvin
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself or CeCILL.
| Vote documentation | Contained in the Vote distribution. |
# $Id: Mail.pm 155 2009-04-03 14:07:02Z nanardon $ package Vote::Template::Plugin::Mail;
use strict; use warnings; use base qw( Template::Plugin::Filter ); sub init { my $self = shift; my $name = $self->{ _ARGS }->[0] || 'mail'; $self->install_filter($name); return $self; } sub filter { my ($self, $text) = @_; $text ||= ''; $text =~ s/\@/ at /g; $text =~ s/\./ dot /g; $text }
1;