diff options
| author | fukachan <fukachan> | 2001-02-25 00:25:50 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-25 00:25:50 +0000 |
| commit | 041869e4451d0dbc35b0bbf783e57eef1dcd7b9f (patch) | |
| tree | 4d0016faae6ed70a3ed32fb1af8de5dd874b97ad /fml | |
| parent | cd4e4bbb0e776ad653629914463192fe610cb1b2 (diff) | |
| download | fml8-041869e4451d0dbc35b0bbf783e57eef1dcd7b9f.tar.gz fml8-041869e4451d0dbc35b0bbf783e57eef1dcd7b9f.tar.bz2 fml8-041869e4451d0dbc35b0bbf783e57eef1dcd7b9f.zip | |
cleanup doc
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/doc/menubar.ja.html | 5 | ||||
| -rw-r--r-- | fml/lib/FML/MIME.pm | 78 | ||||
| -rw-r--r-- | fml/lib/FML/PCB.pm | 170 |
3 files changed, 116 insertions, 137 deletions
diff --git a/fml/doc/menubar.ja.html b/fml/doc/menubar.ja.html index 6edea541..d45b1e5d 100644 --- a/fml/doc/menubar.ja.html +++ b/fml/doc/menubar.ja.html @@ -16,6 +16,11 @@ fml5 homepage menubar <UL> <LI> + <A HREF="ftp://ftp.fml.org/" TARGET="right"> + ダウンロード (not ready) + </A> + + <LI> <A HREF="../../00_README.ja.txt" TARGET="right"> インストールについて </A> diff --git a/fml/lib/FML/MIME.pm b/fml/lib/FML/MIME.pm index 9d1d7d12..1468e3b7 100644 --- a/fml/lib/FML/MIME.pm +++ b/fml/lib/FML/MIME.pm @@ -14,11 +14,39 @@ use vars qw(@ISA @EXPORT @EXPORT_OK); use Carp; +=head1 NAME + +FML::MIME - utilities to handle MIME encoded string + +=head1 SYNOPSIS + + use FML::MIME qw(decode_mime_string encode_mime_string); + $decoded = decode_mime_string( $message ); + +=head1 DESCRIPTION + +MIME utilities to encode and decode string. + +=head1 METHODS + +=cut + + require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(decode_mime_string encode_mime_string); +=head2 C<decode_mime_string(string, [options])> + +decode an base64/quoted-printable encoded string to a plain message. +The encoding method is automatically detected. + +C<options> is a HASH REFERENCE. +You can specify the charset of string to return as C<options->{ charset }>. + +=cut + sub decode_mime_string { my ($str, $options) = @_; @@ -42,6 +70,17 @@ sub decode_mime_string } +=head2 C<decode_mime_string(string, [options])> + +encode the C<string> by the encoder C<options->{ encode }>. +The encode is base64 by default. + +C<options> is a HASH REFERENCE. +You can specify the charset of string to return as C<options->{ charset }>. + +=cut + + sub encode_mime_string { my ($str, $options) = @_; @@ -68,43 +107,16 @@ sub encode_mime_string } -# 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 SEE ALSO +L<Jcode>, +L<MIME::Base64>, +L<MIME::QuotedPrint>. =head1 AUTHOR +Ken'ichi Fukamachi + =head1 COPYRIGHT Copyright (C) 2001 Ken'ichi Fukamachi diff --git a/fml/lib/FML/PCB.pm b/fml/lib/FML/PCB.pm index d4e02389..e059ca61 100644 --- a/fml/lib/FML/PCB.pm +++ b/fml/lib/FML/PCB.pm @@ -9,9 +9,48 @@ package FML::PCB; use strict; use Carp; +use vars qw(%_fml_PCB); # PCB: Process Control Block (malloc it here) -# PCB: Process Control Block -use vars qw(%_fml_PCB); + +=head1 NAME + +FML::PCB -- manipulate Process Control Block + +=head1 SYNOPSIS + + $pcb = new FML::PCB; + $pcb->set('lock', 'object', $lockobj); + $lockobj = $pcb->get('lock', 'object'); + +=head1 DESCRIPTION + +=head2 DATA STRUCTURE + +C<$CurProc->{ pcb }> area holds the CURrent PROCess information. +The hash holds several references to other data structures, +which are mainly hashes. + + $CurProc = { + pcb => { + key => value, + }, + + incoming_message => $r_msg, + article => $r_msg, + + ... snip ... + + }; + +=head1 METHODS + +=head2 C<new( $args )> + +initialize the C<pcb> memory area. +If $args HASH REFERENCE is specified, +copy the hash content in it to C<pcb> area. + +=cut sub new @@ -31,6 +70,21 @@ sub new } +=head2 C<dump_variables()> + +show all {key => value} for debug. + +=head2 C<get( category, key )> + +You must specify C<category> and C<key>. + +=head2 C<set( category, key, value)> + +You must specify C<category>, C<key> and the C<value>. + +=cut + + sub dump_variables { my ($k, $v); @@ -54,115 +108,23 @@ sub set } -sub FETCH -{ - my ($self, $key) = @_; - return $_fml_PCB{$key}; -} - - -sub STORE -{ - my ($self, $key, $value) = @_; - $_fml_PCB{$key} = $value; -} - - -sub DELETE -{ - my ($self, $key) = @_; - delete $_fml_PCB{$key}; -} - - -sub CLEAR -{ - my ($self) = @_; - undef %_fml_PCB; -} - - -=head1 NAME - -FML::PCB -- fml5 PCBuration holding object - -=head1 SYNOPSIS - - $PCB = new FML::PCB; - - # get the current value - $PCB->{recipient_maps}; - - # set the new value - $PCB->{recipient_maps} = 'mysql:toymodel'; - - # function style to get/set the value for the key "recipient_maps" - $PCB->get('recipient_maps'); - $PCB->set('recipient_maps', 'mysql:toymodel'); - - -=head1 DESCRIPTION - - -=head1 METHOD +=head1 AUTHOR -=item Init( ref_to_curproc ) +Ken'ichi Fukamachi -special method only used in the initialization phase. -This method binds $curproc and the %_fml_PCB memory area. +=head1 COPYRIGHT -=item load_file( filename ) +Copyright (C) 2001 Ken'ichi Fukamachi -read the PCBuration file, split key and value and set them to -%_fml_PCB. +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. -=item get( key ) +=head1 HISTORY -=item set( key, value ) - -=item dump_variables() - -show all {key => value} for debug. - -=head1 DATA STRUCTURE - -C<%CurProc> holds the CURrent PROCess information. -The hash holds several references to other data structures, -which are mainly hashes. - - $CurProc = { - # PCBurations - PCB => { - key => value, - }, - - # emulator mode though fml mode in fact - emulator => $emulator, - - # struct incoming_message holds the mail input from STDIN. - incoming_message => $r_msg, - article => $r_msg, - }; - -We use r_variable_name syntax where "r_" implies "reference to" here. -C<$r_msg> is the reference to "struct message". - - $r_msg = { - r_header => \$header, - r_body => \$body, - info => { - mime-version => 1.0, - content-type => { - charset => ISO-2022-JP, - }, - size => $size, - }, - }; - -where $header is the object returned by Mail::Header class (CPAN -module) and the $body is the reference to the mail body region on -memory which locates within FML::Parse name space. +FML::PCB appeared in fml5 mailing list driver package. +See C<http://www.fml.org/> for more details. =cut + 1; |
