[PREVIOUS CHAPTER] [______TOC_______]
4 Command Line Options


"Command Line Options" here is that of fml.pl which is used in include
file such as

	"|/usr/libexec/fml/fml.pl $DIR $LIBDIR -option" 


Command line options enable you to debug fml.pl on your shell. For
unified maintenance you should configure $DIR/cf (for makefml) or
$DIR/config.ph (not use makefml) since "makefml" reconfigures "cf" and
recreate "config.ph" from "cf". Command line options are useful to
debug FML.


I will recommend not to configure fml.pl with command line options but
to use them only for debug. 


	*** Attention! ***


In the file "include-ctl", FML calls "fml.pl --ctladdr" style. PLEASE
DO NOT REMOVE --ctladdr option. This options tells fml.pl to be a
command server which is not written in config.ph since config.ph is
common for all programs.

4.1	syntaxes of command line options

SYNOPSIS:
   fml.pl   [ options ] $DIR [ options ]  [ $LIBDIR [ options ] ]


fml.pl and msend.pl option styles are the same but fml_local.pl is
different from them since fml_local.pl is similar to MH.
If options and arguments co-exist, we regard a string beginning with
"-" as an option, others as arguments.


[DESCRIPTION]

	-d2		debug mode level 2
			debug message is logged to $DEBUG_LOGFILE
			(== $DIR/log.debug in default).


	-d		debug mode (FML does not distribute)
	-d2		debug mode level 2
			debug message is logged to $DEBUG_LOGFILE
			(== $DIR/log.debug in default).


	-bt		debug mode (address test mode)
			now the same as -d :)


	-bd		become daemon, detach the control tty.


	-sOPT 		set "$OPT = 1;"
	-uOPT 		set "$OPT = 0;"
	-lfile		set "$LOAD_LIBRARY = file;"
	e.g.
	-sdebug		the same as $debug = 1;
	-sUSE_MIME	the same as $USE_MIME = 1;
	-uUSE_MIME	the same as $USE_MIME = 0;
	-llibftpmail.pl	$LOAD_LIBRARY = libftpmail.pl


*** Attention!: -bt follows an option string without spaces
***             since the code is easier :D


	-sdebug		debug mode


Example: enable a debug mode and $USE_MIME, in addition dumps
variables.

"|/usr/local/fml/fml.pl /Baycity /Baycity/lib -d -sUSE_MIME --DUMPVAR"


4.2	Long line option style --\S+=\S+

Example: eval( $MAINTAINER = "fukachan@sapporo.iij.ad.jp" ); essentially

	--MAINTAINER=fukachan@sapporo.iij.ad.jp


4.3	configuration files and command line options


The evaluation order of configurations are

	set defaults in fml.pl (function InitConfig)
	load $DIR/site_init.ph
   	load $DIR/config.ph
   	load $DIR/sitedef.ph
	evaluate command line options

The latter overwrites former configurations.


4.4	simple mode setting option --\S+

		--mode


is to set the current mode as "mode". This is the same as
&DEFINE_MODE('mode'); in config.ph. For unified maintenance, we do not
recommend this style. It may be useful when debug.

		--mode
		&DEFINE_MODE('mode');


		fml.pl --ctladdr

4.5	--ctladdr 


Today you can configure FML by "makefml" interface. Makefml configures
$DIR/cf for each ML and re-generates config.ph from cf.  makefml does
not control command line options e.g. in $DIR/include and
$DIR/include-ctl. For unified maintenance, you should not edit
$DIR/include* directly and command line options. $DIR/include-ctl is
exceptional. In it, we use --ctladdr to declare fml.pl runs as a
command server mode since config.ph is common over programs. Please do
not remove --ctladdr in include-ctl.


		--ctladdr


To use --ctladddr is same as to use a distributor program and another
command server program.  For source maintenance and compatibility my
choice is not to make plural programs but maintain only fml.pl as a
kernel library for FML and options change fml.pl behavior.