summaryrefslogtreecommitdiff
path: root/fml/doc/en/tutorial/command/internal.sgml
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-07-20 10:37:40 +0000
committerfukachan <fukachan>2005-07-20 10:37:40 +0000
commit4829badef574589c3e6fd9588a6ffc482322fa1a (patch)
treedd2ae298b39405f1a4c5a5f69775b83d3d3c97c1 /fml/doc/en/tutorial/command/internal.sgml
parent8295ed65d40f99906e12bfb945cf51be18d09ce8 (diff)
downloadfml8-4829badef574589c3e6fd9588a6ffc482322fa1a.tar.gz
fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.tar.bz2
fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.zip
translated.
Diffstat (limited to 'fml/doc/en/tutorial/command/internal.sgml')
-rw-r--r--fml/doc/en/tutorial/command/internal.sgml51
1 files changed, 39 insertions, 12 deletions
diff --git a/fml/doc/en/tutorial/command/internal.sgml b/fml/doc/en/tutorial/command/internal.sgml
index f6b4ccc9..eb17c87d 100644
--- a/fml/doc/en/tutorial/command/internal.sgml
+++ b/fml/doc/en/tutorial/command/internal.sgml
@@ -1,5 +1,5 @@
<!--
- $FML: internal.sgml,v 1.2 2003/08/02 03:05:53 fukachan Exp $
+ $FML: internal.sgml,v 1.3 2004/03/12 14:05:04 fukachan Exp $
$jaFML: internal.sgml,v 1.6 2003/04/15 14:51:36 fukachan Exp $
-->
@@ -9,19 +9,39 @@
</title>
<para>
-Consider "help" command an an example of command,
+Consider "help" command as an example of an fml command,
which sends back help message to the sender.
</para>
<para>
-In the case of &fmldevel;, the main code of help command locates at
+In the case of &fml4;,
+prepare myProcHelpFileSendBack() function and
+register it at %LocalProcedure hash to enable it.
+<screen>
+%LocalProcedure = (
+ 'help', 'myProcHelpFileSendBack',
+ );
+</screen>
+myProcHelpFileSendBack as follows:
+<screen>
+sub myProcHelpFileSendBack
+{
+ local($proc, *Fld, *e, *misc) = @_;
+ my $UJA_FILE = "/some/where/help";
+ &amp;SendFile($Envelope{'Addr2Reply:'}, "UJA $ML_FN", $UJA_FILE);
+}
+</screen>
+</para>
+
+<para>
+In the case of &fml8;, the main code of help command locates at
FML::Command::User::help class. This class is called by
FML::Process::Command via AUTOLOAD of FML::Command.
</para>
<warning>
<para>
-All commands are implemented at either of FML::Command::User
+All &fml8; commands are implemented at either of FML::Command::User or
FML::Command::Admin classes. Both CUI (makefml, fml) and GUI (CGI)
uses FML::Command::Admin class. Instead command mail users both
classes according to the context.
@@ -36,7 +56,7 @@ sub process
{
my ($self, $curproc, $optargs) = @_;
my $config = $curproc->{ config };
- my $charset = $config->{ reply_message_charset_en };
+ my $charset = $config->{ report_mail_charset_ja };
my $help_file = $config->{ help_file };
# template substitution: kanji code, $varname expansion et. al.
@@ -44,7 +64,7 @@ sub process
src => $help_file,
charset_out => $charset,
};
- my $help_template = $curproc->prepare_file_to_return( $params );
+ my $help_template = $curproc->reply_message_prepare_template( $params );
if (-f $help_template) {
$curproc->reply_message( {
@@ -66,8 +86,14 @@ For exmple, variable $config is an object holding configuration variables.
</para>
<para>
-prepare_file_to_return() converts the message language and expands the
-arguments in the message templates.
+All variables of &fml4; are global.
+Instead variables of &fml8; locates within configuration space
+accessed via $config object.
+</para>
+
+<para>
+reply_message_prepare_template() converts the message language and
+expands the arguments in the message templates.
</para>
<para>
@@ -79,18 +105,19 @@ message queue of this process on memory.
The error/log messages queued in on memory are aggergated to one
message at the last of the current process. Mail::Delivery class
handles the aggregation and send it. If needed, the aggregator handles
-text strings and multipart properly to build one message.
+text strings or multipart properly to build one message.
</para>
<para>
This mechanism is same as Notify() of &fml4; but the last aggregator
-is different.
+which handles all at the last is different.
</para>
<para>
FYI: commands such as "get" for the file manipulation uses the same
-message queuing mechanism. Notify() sends back immediately. This is
-different from &fml4;'s Notify() fundamentally.
+message queuing mechanism. &fml4;'s Notify() sends back
+immediately. Instead &fml8;'s mechanism is queuing based always. This
+&fml8; mechanism is different from &fml4;'s Notify() fundamentally.
</para>
</sect1>