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

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

added use Apache::AntiSpam?

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