summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-09-30 11:00:53 +0000
committerfukachan <fukachan>2002-09-30 11:00:53 +0000
commit9ec4f4745ead4e8b4862f4839ca4587686a77031 (patch)
tree72134b45544848f94267f7250615480d55a30927 /fml/lib
parentb62d3d1ba49e3361b91fdb34e13a75d035f5d2ce (diff)
downloadfml8-9ec4f4745ead4e8b4862f4839ca4587686a77031.tar.gz
fml8-9ec4f4745ead4e8b4862f4839ca4587686a77031.tar.bz2
fml8-9ec4f4745ead4e8b4862f4839ca4587686a77031.zip
FNF-ify
rename: _load_function() -> _apply_function() module name renamed: o ContentCheck -> MimeComponent o HeaderCheck -> Header o BodyCheck -> TextPlain
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Filter.pm40
-rw-r--r--fml/lib/FML/Filter/Header.pm (renamed from fml/lib/FML/Filter/HeaderCheck.pm)14
-rw-r--r--fml/lib/FML/Filter/MimeComponent.pm (renamed from fml/lib/FML/Filter/ContentCheck.pm)16
-rw-r--r--fml/lib/FML/Filter/TextPlain.pm (renamed from fml/lib/FML/Filter/BodyCheck.pm)14
4 files changed, 43 insertions, 41 deletions
diff --git a/fml/lib/FML/Filter.pm b/fml/lib/FML/Filter.pm
index 17850ec4..aae8f112 100644
--- a/fml/lib/FML/Filter.pm
+++ b/fml/lib/FML/Filter.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Filter.pm,v 1.11 2002/09/22 14:56:40 fukachan Exp $
+# $FML: Filter.pm,v 1.12 2002/09/29 12:43:23 fukachan Exp $
#
package FML::Filter;
@@ -71,7 +71,7 @@ sub article_filter
for my $function (@$functions) {
if ($config->yes( "use_${function}" )) {
Log("filter(debug): check by $function");
- my $fp = "_load_$function";
+ my $fp = "_apply_$function";
$status = $self->$fp($curproc, $args, $message);
}
else {
@@ -86,17 +86,17 @@ sub article_filter
}
-# Descriptions:
+# Descriptions: header based filter
# Arguments: OBJ($self) OBJ($curproc) HASH_REF($args) OBJ($mesg)
-# Side Effects:
+# Side Effects: none
# Return Value: STR(reason) or 0 (not trapped, ok)
-sub _load_article_header_filter
+sub _apply_article_header_filter
{
my ($self, $curproc, $args, $mesg) = @_;
my $config = $curproc->config();
- use FML::Filter::HeaderCheck;
- my $obj = new FML::Filter::HeaderCheck;
+ use FML::Filter::Header;
+ my $obj = new FML::Filter::Header;
if (defined $obj) {
# overwrite filter rules based on FML::Config
@@ -121,11 +121,11 @@ sub _load_article_header_filter
}
-# Descriptions:
+# Descriptions: filter non MIME format message
# Arguments: OBJ($self) HASH_REF($args)
-# Side Effects:
+# Side Effects: none
# Return Value: 0 (always ok, anyway)
-sub _load_article_non_mime_filter
+sub _apply_article_non_mime_filter
{
my ($self, $curproc, $args, $mesg) = @_;
my $config = $curproc->config();
@@ -134,18 +134,18 @@ sub _load_article_non_mime_filter
}
-# Descriptions:
+# Descriptions: syntax check for text(/plain)
# Arguments: OBJ($self) HASH_REF($args)
-# Side Effects:
+# Side Effects: none
# Return Value: none
-sub _load_article_text_plain_filter
+sub _apply_article_text_plain_filter
{
my ($self, $curproc, $args, $mesg) = @_;
my $config = $curproc->config();
if ($config->yes( 'use_article_text_plain_filter' )) {
- use FML::Filter::BodyCheck;
- my $obj = new FML::Filter::BodyCheck;
+ use FML::Filter::TextPlain;
+ my $obj = new FML::Filter::TextPlain;
# overwrite filter rules based on FML::Config
my $rules =
@@ -169,18 +169,18 @@ sub _load_article_text_plain_filter
}
-# Descriptions:
+# Descriptions: analyze MIME structure and filter it if matched.
# Arguments: OBJ($self) HASH_REF($args)
-# Side Effects:
+# Side Effects: none
# Return Value: none
-sub _load_article_mime_component_filter
+sub _apply_article_mime_component_filter
{
my ($self, $curproc, $args, $mesg) = @_;
my $config = $curproc->config();
if ($config->yes( 'use_article_mime_component_filter' )) {
- use FML::Filter::ContentCheck;
- my $obj = new FML::Filter::ContentCheck;
+ use FML::Filter::MimeComponent;
+ my $obj = new FML::Filter::MimeComponent;
# XXX DISABLED NOW ANYWAY
return 0;
diff --git a/fml/lib/FML/Filter/HeaderCheck.pm b/fml/lib/FML/Filter/Header.pm
index 469d0305..6e28349a 100644
--- a/fml/lib/FML/Filter/HeaderCheck.pm
+++ b/fml/lib/FML/Filter/Header.pm
@@ -4,10 +4,10 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: HeaderCheck.pm,v 1.19 2002/09/22 14:56:50 fukachan Exp $
+# $FML: Header.pm,v 1.20 2002/09/24 15:02:29 fukachan Exp $
#
-package FML::Filter::HeaderCheck;
+package FML::Filter::Header;
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
@@ -16,13 +16,13 @@ use ErrorStatus qw(error_set error error_clear);
=head1 NAME
-FML::Filter::HeaderCheck - filter based on mail header content
+FML::Filter::Header - filter based on mail header content
=head1 SYNOPSIS
=head1 DESCRIPTION
-C<FML::Filter::HeaderCheck> is a collectoin of filter rules based on
+C<FML::Filter::Header> is a collectoin of filter rules based on
mail header content.
=head1 METHODS
@@ -82,8 +82,8 @@ C<$msg> is C<Mail::Message> object.
C<Usage>:
- use FML::Filter::HeaderCheck;
- my $obj = new FML::Filter::HeaderCheck;
+ use FML::Filter::Header;
+ my $obj = new FML::Filter::Header;
my $msg = $curproc->{'incoming_message'};
$obj->header_check($msg, $args);
@@ -160,7 +160,7 @@ redistribute it and/or modify it under the same terms as Perl itself.
=head1 HISTORY
-FML::Filter::HeaderCheck first appeared in fml8 mailing list driver package.
+FML::Filter::Header first appeared in fml8 mailing list driver package.
See C<http://www.fml.org/> for more details.
=cut
diff --git a/fml/lib/FML/Filter/ContentCheck.pm b/fml/lib/FML/Filter/MimeComponent.pm
index e5c74938..d2532361 100644
--- a/fml/lib/FML/Filter/ContentCheck.pm
+++ b/fml/lib/FML/Filter/MimeComponent.pm
@@ -4,10 +4,10 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: ContentCheck.pm,v 1.10 2002/09/11 23:18:12 fukachan Exp $
+# $FML: MimeComponent.pm,v 1.11 2002/09/22 14:56:50 fukachan Exp $
#
-package FML::Filter::ContentCheck;
+package FML::Filter::MimeComponent;
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
@@ -16,13 +16,13 @@ use FML::Log qw(Log LogWarn LogError);
=head1 NAME
-FML::Filter::ContentCheck - filter based on mail MIME content
+FML::Filter::MimeComponent - filter based on mail MIME content
=head1 SYNOPSIS
=head1 DESCRIPTION
-C<FML::Filter::ContentCheck> is a MIME content filter
+C<FML::Filter::MimeComponent> is a MIME content filter
=head1 METHODS
@@ -119,8 +119,8 @@ C<$msg> is C<Mail::Message> object.
C<Usage>:
- use FML::Filter::ContentCheck;
- my $obj = new FML::Filter::ContentCheck;
+ use FML::Filter::MimeComponent;
+ my $obj = new FML::Filter::MimeComponent;
my $msg = $curproc->{'incoming_message'};
$obj->content_check($msg, $args);
@@ -276,9 +276,11 @@ redistribute it and/or modify it under the same terms as Perl itself.
=head1 HISTORY
-FML::Filter::ContentCheck first appeared in fml8 mailing list driver package.
+FML::Filter::MimeComponent first appeared in fml8 mailing list driver package.
See C<http://www.fml.org/> for more details.
+2002/09/30: rename ContentCheck to MimeComponent.
+
=cut
diff --git a/fml/lib/FML/Filter/BodyCheck.pm b/fml/lib/FML/Filter/TextPlain.pm
index 38017f4c..f5c8494a 100644
--- a/fml/lib/FML/Filter/BodyCheck.pm
+++ b/fml/lib/FML/Filter/TextPlain.pm
@@ -4,10 +4,10 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: BodyCheck.pm,v 1.26 2002/09/23 02:02:05 fukachan Exp $
+# $FML: TextPlain.pm,v 1.27 2002/09/24 14:24:35 fukachan Exp $
#
-package FML::Filter::BodyCheck;
+package FML::Filter::TextPlain;
use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
@@ -16,13 +16,13 @@ use ErrorStatus qw(error_set error error_clear);
=head1 NAME
-FML::Filter::BodyCheck - filter by mail body content
+FML::Filter::TextPlain - filter by mail body content
=head1 SYNOPSIS
=head1 DESCRIPTION
-C<FML::Filter::BodyCheck> is a collectoin of filter rules based on
+C<FML::Filter::TextPlain> is a collectoin of filter rules based on
mail body content.
=head1 METHODS
@@ -85,8 +85,8 @@ C<$msg> is C<Mail::Message> object.
C<Usage>:
- use FML::Filter::BodyCheck;
- my $obj = new FML::Filter::BodyCheck;
+ use FML::Filter::TextPlain;
+ my $obj = new FML::Filter::TextPlain;
my $msg = $curproc->incoming_message_body();
$obj->body_check($msg, $args);
@@ -561,7 +561,7 @@ redistribute it and/or modify it under the same terms as Perl itself.
=head1 HISTORY
-FML::Filter::BodyCheck first appeared in fml8 mailing list driver package.
+FML::Filter::TextPlain first appeared in fml8 mailing list driver package.
See C<http://www.fml.org/> for more details.
=cut