-
-
03 May 2002 13:45:55 UTC
- Distribution: Apache-AntiSpam
- Module version: 0.05
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues
- Testers (12 / 0 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: unknown
- Activity
24 month- Tools
- Download (4.36KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Apache::AntiSpam - AntiSpam filter for web pages
SYNOPSIS
# You can't use this class directry # see Apache::AntiSpam::* # or ... if you want your own AntiSpam Filter, package Your::AntiSpamFilter; use base qw(Apache::AntiSpam); sub antispamize { my($class, $email, $orig) = @_; # do some filtering with $orig, and return $orig; } # in httpd.conf <Location /antispam> SetHandler perl-script PerlHandler Your::AntiSpamFilter </Location> # filter aware PerlModule Apache::Filter SetHandler perl-script PerlSetVar Filter On PerlHandler Apache::RegistryFilter Your::AntiSpamFilter Apache::Compress
DESCRIPTION
Apache::AntiSpam is a filter module to prevent e-mail addresses exposed as is on web pages. The way to hide addresses from spammers are implemented in each of Apache::Antispam::* subclasses.
This module is Filter aware, meaning that it can work within Apache::Filter framework without modification.
SUBCLASSING
Here is how to make your own filter.
Declare your class
Inherit from Apache::AntiSpam
define antispamize() method
That's all. Template of antispamize() method will be like this:
sub antispamize { my($class, $email, $orig) = @_; # do some stuff.. return $orig; }
where
$class
is your class,$email
is an instance of Mail::Address, and$orig
is an original e-mail address string. See Email::Find for details.TODO
remove mailto: tags using HTML::Parser.
ACKNOWLEDGEMENTS
The idea of this module is stolen from Apache::AddrMunge by Mark J Dominus. See http://perl.plover.com/AddrMunge/ for details.
Many thanks to Michael G. Schwern for kindly improving the matching speed of Email::Find.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Email::Find, Apache::Filter, Apache::AntiSpam::NoSpam, Apache::AntiSpam::Heuristic, Apache::AntiSpam::HTMLEncode.
Module Install Instructions
To install Apache::AntiSpam, copy and paste the appropriate command in to your terminal.
cpanm Apache::AntiSpam
perl -MCPAN -e shell install Apache::AntiSpam
For more information on module installation, please visit the detailed CPAN module installation guide.