[Zope3-checkins] CVS: ZODB3/ZConfig/doc - zconfig.tex:1.61
Fred L. Drake, Jr.
fred@zope.com
Thu, 20 Feb 2003 11:50:20 -0500
Update of /cvs-repository/ZODB3/ZConfig/doc
In directory cvs.zope.org:/tmp/cvs-serv31437
Modified Files:
zconfig.tex
Log Message:
Document the ZConfig.cmdline module.
=== ZODB3/ZConfig/doc/zconfig.tex 1.60 => 1.61 ===
--- ZODB3/ZConfig/doc/zconfig.tex:1.60 Thu Feb 20 11:19:16 2003
+++ ZODB3/ZConfig/doc/zconfig.tex Thu Feb 20 11:50:19 2003
@@ -1140,6 +1140,41 @@
\end{methoddesc}
+\section{\module{ZConfig.cmdline} --- Command-line override support}
+
+\declaremodule{}{ZConfig.cmdline}
+\modulesynopsis{Support for command-line overrides for configuration
+ settings.}
+
+This module exports an extended version of the \class{ConfigLoader}
+class from the \refmodule{ZConfig.loader} module. This provides
+support for overriding specific settings from the configuration file
+from the command line, without requiring the application to provide
+specific options for everything the configuration file can include.
+
+\begin{classdesc}{ExtendedConfigLoader}{schema}
+ Construct a \class{ConfigLoader} subclass that adds support for
+ command-line overrides.
+\end{classdesc}
+
+The following additional method is provided, and is the only way to
+provide position information to associate with command-line
+parameters:
+
+\begin{methoddesc}{addOption}{spec\optional{, pos}}
+ Add a single value to the list of overridden values. The \var{spec}
+ argument is a value specified, as described for the
+ \function{\refmodule{ZConfig}.loadConfig()} function. A source
+ position for the specifier may be given as \var{pos}. If \var{pos}
+ is specified and not \code{None}, it must be a sequence of three
+ values. The first is the URL of the source (or some other
+ identifying string). The second and third are the line number and
+ column of the setting. These position information is only used to
+ construct a \exception{DataConversionError} when data conversion
+ fails.
+\end{methoddesc}
+
+
\section{\module{ZConfig.substitution} --- String substitution}
\declaremodule{}{ZConfig.substitution}