root/Apache-AntiSpam/trunk/lib/Apache/AntiSpam/NoSpam.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::NoSpam;
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/\@/-nospam\@/;
12     return $orig;
13 }   
14
15 1;
16 __END__
17
18 =head1 NAME
19
20 Apache::AntiSpam::NoSpam - Add suffix to local-part in Email
21
22 =head1 SYNOPSIS
23
24   # in httpd.conf
25   <Location /antispam>
26   SetHandler perl-script
27   PerlHandler Apache::AntiSpam::NoSpam
28   </Location>
29
30   # filter aware
31   PerlModule Apache::Filter
32   SetHandler perl-script
33   PerlSetVar Filter On
34   PerlHandler Apache::RegistryFilter Apache::AntiSpam::NoSpam Apache::Compress
35
36 =head1 DESCRIPTION
37
38 Apache::AntiSpam::NoSpam is a subclass of Apache::AntiSpam, filter
39 module to prevent e-mail addresses exposed as is on web pages. This
40 module adds B<-nospam> suffix to local-part of e-mail addresses.
41
42 For example, C<miyagawa@cpan.org> will be filtered to
43 C<miyagawa-nospam@cpan.org>.
44
45 This module is Filter aware, meaning that it can work within
46 Apache::Filter framework without modification.
47
48 =head1 TODO
49
50 =over 4
51
52 =item *
53
54 should make -nospam suffix be configured.
55
56 =back
57
58 =head1 AUTHOR
59
60 Tatsuhiko Miyagawa <miyagawa@bulknews.net>
61
62 This library is free software; you can redistribute it and/or modify
63 it under the same terms as Perl itself.
64
65 =head1 SEE ALSO
66
67 L<Apache::AntiSpam>
68
69 =cut
Note: See TracBrowser for help on using the browser.