summaryrefslogtreecommitdiff
path: root/fml/doc/en/tutorial/module
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-08-03 01:47:17 +0000
committerfukachan <fukachan>2003-08-03 01:47:17 +0000
commit4bb7f79191716913a922a3e5723d0f9e12c6acf7 (patch)
tree5890b7873531fda5319da35e4f7b3254ff5da7ae /fml/doc/en/tutorial/module
parent2965c40b48e1c20f221d5a171972f5cd828f5db7 (diff)
downloadfml8-4bb7f79191716913a922a3e5723d0f9e12c6acf7.tar.gz
fml8-4bb7f79191716913a922a3e5723d0f9e12c6acf7.tar.bz2
fml8-4bb7f79191716913a922a3e5723d0f9e12c6acf7.zip
clean up
Diffstat (limited to 'fml/doc/en/tutorial/module')
-rw-r--r--fml/doc/en/tutorial/module/IO.sgml64
-rw-r--r--fml/doc/en/tutorial/module/Message.sgml59
-rw-r--r--fml/doc/en/tutorial/module/create.sgml48
-rw-r--r--fml/doc/en/tutorial/module/encode.sgml10
-rw-r--r--fml/doc/en/tutorial/module/nativelanguage.sgml12
5 files changed, 102 insertions, 91 deletions
diff --git a/fml/doc/en/tutorial/module/IO.sgml b/fml/doc/en/tutorial/module/IO.sgml
index f96e3097..1db6a7bc 100644
--- a/fml/doc/en/tutorial/module/IO.sgml
+++ b/fml/doc/en/tutorial/module/IO.sgml
@@ -1,5 +1,5 @@
<!--
- $FML$
+ $FML: IO.sgml,v 1.1 2003/07/28 10:41:30 fukachan Exp $
$jaFML: IO.sgml,v 1.4 2003/04/15 14:51:42 fukachan Exp $
-->
@@ -16,7 +16,7 @@
<para>
All IO of &fmldevel; should use IO::Adapter class like vfs/vnode
-interface. For example, read/write member list, add/remove a user.
+framework. For example, read/write member list, add/remove a user.
The usage is like this:
<screen>
use IO::Adapter;
@@ -29,7 +29,7 @@ $obj->close;
<para>
$map is map:identifier. file: can be omitted.
-Currently available maps follows:
+Currently available maps follow:
<screen>
file:/var/spool/ml/elena/recipients
unix.group:root
@@ -59,7 +59,7 @@ IO::Adapter".
</title>
<para>
-Official method IO::Adapter privides currently follows:
+Official methods IO::Adapter provides currently follow:
<screen>
new()
open()
@@ -81,21 +81,21 @@ find(REGEXP, $args)
</para>
<para>
-KEY is a primary key for database access. In almost cases, the primary
-key is a mail address. REGEXP is a regular expression (regexp), this
-is usually also a mail address.
+KEY is a primary key to handle database access. In almost cases, the
+primary key is a mail address. REGEXP is a regular expression
+(regexp), this is usually also a mail address.
</para>
<para>
-Unification of all types of IO needs that we should implement leastest
+Unification of all types of IO needs that we should implement least
methods.
</para>
<para>
The currently implemented methods are selected by test and our
-operations. If could, we select SQL IO more than file IO for
-abstraction model. It introduces difference between &fml4; and &fml8;
-but it is mandatory for further abstraction.
+operations. If could, we refer SQL IO more than file IO as an
+abstraction base model of IO::Adapter. It introduces difference
+between &fml4; and &fml8; but it is mandatory for further abstraction.
</para>
</sect1>
@@ -103,18 +103,18 @@ but it is mandatory for further abstraction.
<sect1>
<title>
- argument type of methods
+ Argument type of methods
</title>
<para>
-get_next_key() is typical. It needs no argument or STR as the
-argument and the return value is STR. since this method is used to
-list up the content of files or retrieve the specific address in the
-file.
+The argument needs nothing or STR as the argument and the return value
+is STR. get_next_key() is typical as the no argument case. This method
+is used to list up the content of files or retrieve the specific
+address in the file.
</para>
<para>
-In other case, the argument may be a pair of strings.
+In other case, the return value may be a pair of strings.
<screen>
KEY_STR => [
VALUE_STR_1
@@ -124,7 +124,7 @@ KEY_STR => [
</screen>
This is used as the return value to represent ARRAY. For example,
"actives" file of &fml4; consists of lines which have plural space
-separeted entries. So it is a type of array.
+separeted entries. So it can be representated as a type of array.
<screen>
rudo@nuinui.net s=skip m=xxx.yyy.z # commnet
@@ -158,12 +158,13 @@ STR => [STR, STR, ... ]
<sect1 id="module.io.adapter.map.file">
<title>
- file map
+ File map
</title>
<para>
"file:/some/where/file/name" or file name "/some/where/file/name" map
is abstraction of IO to/from a text file.
+The format of text file is space separated.
</para>
</sect1>
@@ -171,7 +172,7 @@ is abstraction of IO to/from a text file.
<sect1 id="module.io.adapter.map.unixgroup">
<title>
- unixgroup map
+ Unixgroup map
</title>
<para>
@@ -189,7 +190,7 @@ $obj = new IO::Adapter "unixgroup:wheel";
</screen>
If you call get_next_key() method for this object,
you will get the member of wheel group sequentially.
-In other words the wheel group is regarded as the follogin file
+In other words the wheel group is regarded as the following file
by IO::Adapter.
<screen>
root
@@ -219,15 +220,16 @@ It is same as one of /etc/group but the data is retrieved from NIS/YP.
</title>
<para>
-For more eacy maintenance, we should write all mysql configurations in
-one file. For example, it is better that we have only to write SQL
+For easy maintenance, it is better to write all mysql configurations
+in one file. For example, it is good that we have only to write SQL
configuratinos in config.cf.
</para>
<para>
-But we identify plural mysql consitions. So, we use the tag
-[mysql:members] to declare the region between the tag to the next tag
-or =cut. It is similar to .ini file (M$). We use the tags like this:
+But we identify plural mysql conditions. So, we use the tag
+[mysql:members] to declare one region between a tag to the next tag or
+=cut. It is similar to .ini file format used on Microsoft OS. We use
+the tags like this:
<screen>
config.cf example
@@ -263,7 +265,7 @@ $config => {
}
}
</screen>
-FML::Config prepares this $config by readinc .cf files. Hence, we
+FML::Config prepares this $config by reading .cf files. Hence, we
usually use FML::Config object as an argument of IO::Adapter::new()
method.
</para>
@@ -283,10 +285,10 @@ We use &amp;varname syntax for such lexical scope variables.
</para>
<para>
-For example, use different member and recipient maps. In sql
-statements, the difference is a flag (fml_recipient) in a table. So
-in calling MySQL , the where statement has different value but it is
-determined lexically.
+For example, use different member and recipient maps. In SQL
+statements, the difference is a flag (fml_recipient) in a table. For
+example, consider the case that "where" statement has different value
+but it is determined lexically in calling MySQL.
<screen>
member_maps = mysql:members
diff --git a/fml/doc/en/tutorial/module/Message.sgml b/fml/doc/en/tutorial/module/Message.sgml
index a0c017e1..2d162867 100644
--- a/fml/doc/en/tutorial/module/Message.sgml
+++ b/fml/doc/en/tutorial/module/Message.sgml
@@ -1,5 +1,5 @@
<!--
- $FML$
+ $FML: Message.sgml,v 1.1 2003/07/28 10:41:30 fukachan Exp $
$jaFML: Message.sgml,v 1.2 2003/04/15 14:51:42 fukachan Exp $
-->
@@ -36,14 +36,15 @@ provides several methods to manipulate these structures.
<para>
Each part of this chain is a Mail::Message object. In other words, one
-mail message consits of a chain of plural Mail::Message objects.
+mail message consits of a chain of plural Mail::Message objects in
+&fml8; internal.
</para>
<para>
For example, "header" is a Mail::Message, which type is
-text/rfc822-headers and the data is Mail::Header object. Instead
-"part1" is a Mail::Message object, which type is text/plain and the
-data is reference to the data string.
+text/rfc822-headers and the data is stored as Mail::Header
+object. Instead "part1" is a Mail::Message object, which type is
+text/plain and the data is reference to the message string.
</para>
<para>
@@ -62,8 +63,8 @@ Mail::Message module manual.
</title>
<para>
-parse() analyzes the file which file name or the file handle for the
-file should be specified at the argument.
+parse() analyzes the file. The argument is the file name or the file
+handle for the file which should be specified at the argument.
</para>
<para>
@@ -81,8 +82,8 @@ For example, MIME/multipart consists of the following objects.
type[ 8]: multipart.close-delimiter | multipart/mixed
type[ 9]: text/plain | multipart/mixed
</screen>
-The center is the object type, the right one is the mime type of the
-whole message (content-type in the mail header).
+The center row is the object type, the right one is the mime type of
+the whole message (content-type in the mail header).
</para>
</sect1>
@@ -104,7 +105,7 @@ build_mime_multipart_chain($args)
parse_and_build_mime_multipart_chain($args)
build_mime_header($args)
</screen>
-These method is used internally now.
+These methods are used internally now.
So these will become private methods in the furure.
Please do not use these methods.
</para>
@@ -124,8 +125,9 @@ is MIME::Lite class in fact :-)
<para>
dup_header() method duplicates only header part of a chain and left
-the body part. The new chain has different head (header object) but
-the second part is the same as the original chain.
+the body part as it is. The new chain has different head (header
+object) but others begining from the second part is same as the
+original chain.
<screen>
|<--------------- mail body ------------->
header0 ----> part1 -> part2 -> ...
@@ -137,12 +139,12 @@ dup_header0 ---
<para>
-whole_message_header() returns the header object the chain. The return
-value is a Mail::Message object not string.
+whole_message_header() returns the header object of the chain. The
+return value is a Mail::Message object not string.
</para>
<para>
-header_data_type() return the type of the whole message as string.
+header_data_type() returns the type of the whole message as string.
It tells whether this message is text or multipart.
</para>
@@ -157,11 +159,11 @@ It tells whether this message is text or multipart.
<para>
Consider the following object chain.
<screen>
-If multipart
+If not multipart
header -> body
-else if not multipart
+else if multipart
header -> preamble -> part1 -> part2 -> trailor
</screen>
@@ -206,14 +208,15 @@ chain and returns the first matched object.
</title>
<para>
-print() method is useual print() functions.
-Usually specify the file descriptor as the argument.
+print() method is usual print() function. Usually specify the file
+descriptor as an argument.
</para>
<para>
print() has the concept "mode" to specify CRLF or LF. use
set_print_mode(mode) and reset_print_mode() to set the mode. By
-default, mode is raw. Specify smtp mode in SMTP codes.
+default, mode is raw. Specify smtp mode in using print() within SMTP
+codes.
</para>
</sect1>
@@ -226,13 +229,15 @@ default, mode is raw. Specify smtp mode in SMTP codes.
<sect2>
<title>
- size
+ Size
</title>
<para>
-size() returns the size of the object not the whole size.
+size() returns the size of the object not the whole message size.
+<!--
header_size() tells the size of the header.
body_size() tells the size of the body part.
+-->
</para>
<para>
@@ -243,7 +248,7 @@ is_empty() tells the object data is empty or not.
<sect2>
<title>
- general information
+ General information
</title>
<para>
@@ -271,7 +276,7 @@ encoding mechanism.
</title>
<para>
-num_paragraph() returns the number of paragraph in the data of the
+num_paragraph() returns the number of paragraphs in the data of the
object.
</para>
@@ -283,8 +288,8 @@ Caution that N starts from 1 not 0.
<para>
-header() return the header part of a multipart block.
-data() returns the data part.
+header() return the header part of a multipart block (header part of
+an object). data() returns the data part (data part of an object).
Respectively, alias of message_fields($size) and message_text($size).
</para>
@@ -295,7 +300,7 @@ Respectively, alias of message_fields($size) and message_text($size).
<sect1 id="module.mail.message.ref">
<title>
- Rerefences
+ Refernces
</title>
<para>
diff --git a/fml/doc/en/tutorial/module/create.sgml b/fml/doc/en/tutorial/module/create.sgml
index 496255ca..688b4674 100644
--- a/fml/doc/en/tutorial/module/create.sgml
+++ b/fml/doc/en/tutorial/module/create.sgml
@@ -1,5 +1,5 @@
<!--
- $FML$
+ $FML: create.sgml,v 1.1 2003/07/28 15:20:18 fukachan Exp $
$jaFML: create.sgml,v 1.2 2003/04/15 14:51:42 fukachan Exp $
-->
@@ -11,7 +11,8 @@
<para>
Consider creation of a simple scheduler listing tool in the &fml8;
-framework. Here the program name is fmlsch and the cgi is fmlsch.cgi.
+framework. Here the program name is "fmlsch" and the cgi is
+"fmlsch.cgi".
</para>
@@ -23,11 +24,11 @@ framework. Here the program name is fmlsch and the cgi is fmlsch.cgi.
<sect2>
<title>
- step 1: add fmlsch into installer configuration
+ Step 1: add fmlsch into installer configuration
</title>
<para>
-add fmlsch into $bin_programs in fml/etc/install.cf.in.
+Add fmlsch into $bin_programs in fml/etc/install.cf.in.
Run configreu to re-create fml/etc/install.cf.
</para>
@@ -36,16 +37,16 @@ Run configreu to re-create fml/etc/install.cf.
<sect2>
<title>
- step 2: build a module
+ Step 2: build a module
</title>
<para>
-Write fml/lib/Calender/Lite.pm for the main functions of fmlsch.
+Write fml/lib/Calender/Lite.pm as the main library of fmlsch.
</para>
<para>
-Import libraries if needed.
+Import other libraries if needed.
For fmlsch we import
HTML-CalendarMonthSimple-1.02.tar.gz
from CPAN.
@@ -60,24 +61,24 @@ Also, install Date-Calc if your system has not it.
<sect2>
<title>
- step 3: modify FML::Process:: class
+ Step 3: modify FML::Process:: class
</title>
<para>
Calender::Lite works mainly but we build the machanism how &fml8;
-loads and runs it. We modify FML::Process:: for &fml8; bootloader to
-call Calender::Lite.
+loads and runs it. We modify FML::Process class for &fml8; bootloader
+to call Calender::Lite.
</para>
<para>
Firstly, write mandatory methods for fmlsch process in
-fml/lib/FML/Process/Calender.pm. You need to create this module.
+fml/lib/FML/Process/Calender.pm. You need to create this file.
</para>
<para>
-Secondary, set up boot loader configuration. In the case of fmlsch,
-the bootloader loads FML::Process::Calender. Define it in
-fml/etc/modules. Set up fml/etc/command_line_options properly.
+Secondly, set up boot loader configuration. In the case of fmlsch, the
+bootloader loads FML::Process::Calender. Define it in fml/etc/modules.
+Set up fml/etc/command_line_options properly. This
"command_line_options" file has a map between a command and the
command line options parsed by Getopt::Long().
</para>
@@ -85,9 +86,10 @@ command line options parsed by Getopt::Long().
<para>
Create FML::Process::Calender module by copy-and-pasting other
-FML::Process:: modules :-) However fmlsch has least functions, you
-need to write FML::Process::Calender::run() method. For undefined
-methods, fml loads FML::Process::Kernel functions (inheritence).
+FML::Process:: modules :-) However fmlsch has only to contain least
+functions, you need to write FML::Process::Calender::run() method.
+For undefined methods, fml loads FML::Process::Kernel functions
+(inheritence).
</para>
</sect2>
@@ -97,21 +99,21 @@ methods, fml loads FML::Process::Kernel functions (inheritence).
<sect1>
<title>
- case study: fmlsch.cgi
+ Case study: fmlsch.cgi
</title>
<para>
-The hacking is similar to fmlsch. The differnce is that the target to
-modify is FML::CGI:: class. FML::CGI::Calender is a sub-class of
-FML::Process::CGI.
+The way of hacking is similar to fmlsch. The differnce is that the
+target to modify is FML::CGI:: class. FML::CGI::Calender is a
+sub-class of FML::Process::CGI.
</para>
<para>
If undefined method is called, fml loads it from FML::Process::CGI or
FML::Process::Kernel. FML::Process::CGI uses CGI.pm to create a http
-header et.al. If FML::Process::CGI functions are not enough,
-FML::CGI:: module should support the lack.
+header et.al. If FML::Process::CGI functions are not enough, FML::CGI
+class module should support the lack.
</para>
</sect1>
diff --git a/fml/doc/en/tutorial/module/encode.sgml b/fml/doc/en/tutorial/module/encode.sgml
index a609c8fe..370e48b4 100644
--- a/fml/doc/en/tutorial/module/encode.sgml
+++ b/fml/doc/en/tutorial/module/encode.sgml
@@ -1,5 +1,5 @@
<!--
- $FML$
+ $FML: encode.sgml,v 1.1 2003/07/28 10:41:31 fukachan Exp $
$jaFML: encode.sgml,v 1.2 2003/04/15 14:51:42 fukachan Exp $
-->
@@ -9,7 +9,7 @@
</title>
<para>
-[reference] fml-help ML's Count: 02012, 02013, 02016.
+[References] fml-help ML's Count: 02012, 02013, 02016.
</para>
<screen>
@@ -85,11 +85,11 @@ The main code is within _convert_str_ref() method.
sub base64 {}
sub quoted_printable {}
</screen>
-is useful for convenience.
+is implemented for convenience.
<screen>
$x = $encode->base64($s);
</screen>
-For backward compatibility, STR2XXX() functoins are prepared.
+For backward compatibility, STR2XXX() functoins are prepared, too.
<screen>
STR2EUC( $str, [$icode] )
STR2JIS( $str, [$icode] )
@@ -110,7 +110,7 @@ These wraps convert_str_ref().
In language dependent processes, convert the charset to machine
friendly one, process something and back it to the original chaset
each time. This step is widely used. So it is convenient to prepare a
-function to unify these steps in one function.
+function to pack these steps into one function.
<screen>
run_in_chcode example:
diff --git a/fml/doc/en/tutorial/module/nativelanguage.sgml b/fml/doc/en/tutorial/module/nativelanguage.sgml
index 57c3eb97..6252870c 100644
--- a/fml/doc/en/tutorial/module/nativelanguage.sgml
+++ b/fml/doc/en/tutorial/module/nativelanguage.sgml
@@ -1,5 +1,5 @@
<!--
- $FML$
+ $FML: nativelanguage.sgml,v 1.1 2003/07/28 15:20:18 fukachan Exp $
$jaFML: nativelanguage.sgml,v 1.3 2003/04/15 14:51:43 fukachan Exp $
-->
@@ -9,9 +9,10 @@
</title>
<para>
-fml needs language dependent functions internally. Especially, JIS
-to/from EUC conversion is used anywhere since. Japanese messages are
-written in JIS code but programs are easy to use string in EUC-JP.
+Fml needs language dependent functions internally. Especially, JIS
+to/from EUC-JP Janapese code conversion is used anywhere since
+Japanese mail messages are written in JIS code but programs are easy
+to use strings in EUC-JP.
</para>
<para>
@@ -25,7 +26,7 @@ for the language dependence handling in messages.
<sect1>
<title>
- Something::Language::
+ Something::Language:: class
</title>
<para>
@@ -38,6 +39,7 @@ For example, there are
FML::Language::Japanese::String
Mail::Bounce::Language::Japanese
</screen>
+,
The former provides Japanese dependent string functions.
The latter provides Japanese dependent error mail analyzer functions.
</para>