diff options
| author | fukachan <fukachan> | 2001-01-22 17:03:00 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-01-22 17:03:00 +0000 |
| commit | e44974c0c662eaee8c905270fc4de12bb09e1aca (patch) | |
| tree | 7ca96884d80c9cebb6f6b62e58773f7d92f46639 /fml/lib | |
| parent | fb233579d2f5fb04507a8be3dc85b7de09f29e01 (diff) | |
| download | fml8-e44974c0c662eaee8c905270fc4de12bb09e1aca.tar.gz fml8-e44974c0c662eaee8c905270fc4de12bb09e1aca.tar.bz2 fml8-e44974c0c662eaee8c905270fc4de12bb09e1aca.zip | |
prepare subject_tag_rewrite()
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Header.pm | 10 | ||||
| -rw-r--r-- | fml/lib/FML/Header/Subject.pm | 7 | ||||
| -rw-r--r-- | fml/lib/FML/MIME.pm | 97 |
3 files changed, 111 insertions, 3 deletions
diff --git a/fml/lib/FML/Header.pm b/fml/lib/FML/Header.pm index fbbdcc6d..0b38310a 100644 --- a/fml/lib/FML/Header.pm +++ b/fml/lib/FML/Header.pm @@ -108,13 +108,17 @@ sub add_x_sequence } - sub rewrite_subject { my ($header, $config, $args) = @_; - use FML::Header::Subject; - my $subject = new FML::Header::Subject; + my $pkg = "FML::Header::Subject"; + require $pkg; $pkg->import(); + + # subject tag + if ($config->has_attribute( header_rewrite_rules , add_subject_tag )) { + $pkg->rewrite_subject_tag($header, $config, $args); + } } diff --git a/fml/lib/FML/Header/Subject.pm b/fml/lib/FML/Header/Subject.pm index e24c8a08..ba6890c0 100644 --- a/fml/lib/FML/Header/Subject.pm +++ b/fml/lib/FML/Header/Subject.pm @@ -26,6 +26,13 @@ sub new } +sub rewrite_subject_tag +{ + my ($header, $config, $args) = @_; + +} + + =head1 NAME FML::Header::Subject.pm - what is this diff --git a/fml/lib/FML/MIME.pm b/fml/lib/FML/MIME.pm new file mode 100644 index 00000000..3f6d5627 --- /dev/null +++ b/fml/lib/FML/MIME.pm @@ -0,0 +1,97 @@ +#-*- perl -*- +# +# Copyright (C) 2001 Ken'ichi Fukamachi +# All rights reserved. This program is free software; you can +# redistribute it and/or modify it under the same terms as Perl itself. +# +# $Id$ +# $FML$ +# + +package FML::MIME; +use strict; +use vars qw(@ISA @EXPORT @EXPORT_OK); +use Carp; + +require Exporter; +@ISA = qw(Exporter); + + +sub new +{ +my ($self) = @_; +my ($type) = ref($self) || $self; +my $me = {}; +return bless $me, $type; +} + + +sub mime_decode_string +{ + my ($str, $type) = @_; + +} + + +sub mime_encode_string +{ + my ($str, $type) = @_; + +} + + +# original idea comes from +# import fml-support: 02651 (hirono@torii.nuie.nagoya-u.ac.jp) +# import fml-support: 03440, Masaaki Hirono <hirono@highway.or.jp> +my $MimeBEncPat = + '=\?[Ii][Ss][Oo]-2022-[Jj][Pp]\?[Bb]\?([A-Za-z0-9\+\/]+)=*\?='; + +my $MimeQEncPat = + '=\?[Ii][Ss][Oo]-2022-[Jj][Pp]\?[Qq]\?([\011\040-\176]+)=*\?='; + +# s/$MimeBEncPat/&kconv(&base64decode($1))/geo; +# s/$MimeQEncPat/&kconv(&MimeQDecode($1))/geo; +# sub MimeQDecode +# { +# local($_) = @_; +# s/=*$//; +# s/=(..)/pack("H2", $1)/ge; +# $_; +#} + + + +=head1 NAME + +FML::MIME.pm - what is this + + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=head2 new + +=item Function() + + +=head1 AUTHOR + +=head1 COPYRIGHT + +Copyright (C) 2001 __YOUR_NAME__ + +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. + +=head1 HISTORY + +FML::__MODULE_NAME__.pm appeared in fml5. + +=cut + + +1; + + +1; |
