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