root/Apache-AntiSpam/trunk/lib/Apache/AntiSpam/Heuristic.pm

Revision 90 (checked in by miyagawa, 19 years ago)

make subclassing possible
added FilterTest?

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 package Apache::AntiSpam::Heuristic;
2
3 use strict;
4 use vars qw($VERSION);
5 $VERSION = '0.01';
6
7 use base qw(Apache::AntiSpam);
8
9 sub antispamize {
10     my($class, $email, $orig) = @_;
11     $orig =~ s/\@/ at /g;
12     $orig =~ s/\./ dot /g;
13     $orig =~ s/  */ /g;
14     return $orig;
15 }   
16
17 1;
18 __END__
19
20 =head1 NAME
21
22 Apache::AntiSpam::Heuristic - Filters E-mail address to heuristic one
23
24 =head1 SYNOPSIS
25
26   # in httpd.conf
27   <Location /antispam>
28   SetHandler perl-script
29   PerlHandler Apache::AntiSpam::Heuristic
30   </Location>
31
32   # filter aware
33   PerlModule Apache::Filter
34   SetHandler perl-script
35   PerlSetVar Filter On
36   PerlHandler Apache::RegistryFilter Apache::AntiSpam::Heuristic Apache::Compress
37
38 =head1 DESCRIPTION
39
40 Apache::AntiSpam::Heurisitc is a subclass of Apache::AntiSpam, filter
41 module to prevent e-mail addresses exposed as is on web pages. This
42 module filters e-mail addresses to heuristic ones.
43
44 For example, C<miyagawa@cpan.org> will be filtered to C<miyagawa at
45 cpan dot org>.
46
47 This module is Filter aware, meaning that it can work within
48 Apache::Filter framework without modification.
49
50 =head1 AUTHOR
51
52 Tatsuhiko Miyagawa <miyagawa@bulknews.net>
53
54 This library is free software; you can redistribute it and/or modify
55 it under the same terms as Perl itself.
56
57 =head1 SEE ALSO
58
59 L<Apache::AntiSpam>
60
61 =cut
Note: See TracBrowser for help on using the browser.